For this project, I used a Particle Photon fixed with 2 sensors to record my refrigerator activity for one month. Sensors consisted of an accelerometer measuring movement and a 'hall' sensor measuring the connection of a closed door to a magnet.
Raw data was collected once per second and sent to Amazon Relational Database System (RDS). By then end of the month, the data exceeded 3 million rows in 2 tables.
Raw data was then aggregated to daily stats using PostgreSQL measuring the number of times the refrigerator door was opened, as well as tracking hardware faults caused by our beloved pet cat.
These daily stats were then available upon request to an API endpoint that returned the result of the query above. This endpoint was hosted on Amazon Elastic Compute Cloud