We got a Nest thermostat and I spent the better part of a couple days working on logging and displaying the data. I used the Nest API for thermostat information, Weather Underground API for weather information, MongoDB for storage, and D3 for visualization. There’s also a little PHP glue in there which I plan on replacing with something else (probably node.js).
The system is currently in cooling mode. The green line is inside temperature, the orange line is outside temperature, the pale green is the target temperature, and the green shaded areas represent times when the system was cooling.
Every 15 minutes the script hits both Weather Underground and Nest. Right now I just throw the whole response tree into Mongo so I can decide later what I want to use.
This is the first time I’ve used both D3 and Mongo so the code isn’t very clean or pretty. I’ll put it on github once I’ve had a chance to organize it a bit better. I’m still struggling with formatting the time labels the way I want.
The weather icons are from Weather Underground and only appear when the weather conditions change. However while the URLs for ‘partly sunny’ and ‘partly cloudy’ are different the icons are the same so there are still some repeats.
Further improvements I’d like to add include a legend,humidity data, the ability to zoom/pan through the data, and the ability to show/hide some of the lines.