GPS Enabled Thermostat Setter

This project was created as a good excuse to begin learning Python and to create a kinetic sculpture. I find nothing motivates me like the prospect of witnessing something physically working.

The process is pretty simple. My wife and I both have iPhones. A server in my home periodically uses Apple's "Find My Phone" API through Python to create a database of our positions. Another script looks at the most recent positions and determines if either I or my wife is at home or if either of us will be at home in the near future. Of course, if any of these conditions are met, we would like the heat to turn on.

There are many ways to hack a thermostat. Building a kinetic sculpture around it is by far the most convoluted, but also one of the most fun. I think there is a certain elegance to having a machine interface with the heating system the same way we do, by changing the set-temp. When the computer determines that the heating system should be engaged, it adjusts the temp to a balmy 72degrees. When it determines that we are away, it drops the temp to back to 55 degrees.

A challenge that I gave myself with regards to the mechanics was to have at least two moving pieces and have one of those pieces rotate concentrically with the thermostat dial. Since the thermostat is already at the center of its own rotation, it is difficult to put an axel there. To get around this, I built the inner partial gear to mount in a cylindrical track defined by five rollars. The outer partial gear turns the inner one and is driven by a reduced stepper moter in the back. The stepper motor is controlled from the computer.

While not critical to the operation of the heating system, the server also creates a map of our positions over the past two days using Googles PyGMaps Python modules and plots of our distance from home and the resulting heating state of the system.

graph.png
map.png