Humidity/Temperature readings finally visualized

Blogged by Twan as Daily life,Home automation — Twan Sat 29 Mar 2014 6:28 pm

Finally something nice to look at! I have been capturing sensor data from a couple of wireless temperature/humidity sensors (TFA 30.3125) and storing them in mongodb on a raspberry pi. I played around a bit with Rickshaw js to visualize this data.

Since my raspberry pi is not available for the internet ( for now ) I made a screenshot from the humidity to give you an impression

2014-03-29 19_22_37-1984.doublethink_3000_humidity

To store all the readings ( 1 temperature + 1 humidity reading per minute ) I used this article on the mongodb blog for inspiration. I have 1 document per day per sensor and the values are stored like this (temperature):

"values": [
"0": [{"0": 20200,"1": 20200,"2": 20200,...,"58": 20100,"59": 20100}],
"1": [{"0": 20100,"1": 20100,..."57": 20100,"58": 20100,"59": 20100}],

I’m storing the temperature * 1000 because I had problems with floating point numbers on my raspberry pi in mongodb.

TODO: Figure out how to deal with time zones in Rickshaw, it displays the time 1 hour off (luckily we don’t have to get up that early)

© 2009 Twan Sevriens