Chili Labs Blog

Hacking SiriProxy to talk to the Nest

by Chris Burris | Dec 11, 2011

I'm a big fan of home automation, as it lets us delegate the mundane tasks of managing appliances and other home-related tasks to computers and custom electronics. So when I heard about the Nest - the internet connected learning thermostat, I was pretty excited.

Nest hit the nail on the proverbial head when they said that current generation of digital thermostats are hard to use and hard to program. Here is a picture of the old Honeywell thermostat we had installed in our apartment in 2009. While it was a step up from old rotary dial from the 1960s, it was a step back in terms of usability:

The Honeywell has some serious usability problems, not least of which are issues with the screen. It is a monochrome liquid crystal display with green back lighting. The contrast is horrible and the sensitivity of the resistive touchscreen is pretty poor that sometimes you have to tap multiple times to get it to respond.

I did program this 7-day thermostat, however it wasn't easy (again, the screen problems contributed to this) and the scheduling was inflexible enough that I largely overrode the schedule. The other problem is it only allows a wake-leave-return-sleep schedule pattern so given my work-at-home schedule it was highly incompatible, hence the manual override.

In any event, when I heard about the Nest learning thermostat, I jumped on the chance to modernize an item in my home. It's a practical item to upgrade, as well as an aesthetic upgrade.

The Nest is great. It was thoroughly easy to install on my single stage heating system (Rc,W) and it literally took all of 10 minutes to remove my old thermostat, install the plastic base plate and wiring terminal block interface, and snap on the Nest. On first "boot" up, the Nest joined my WPA2 network, and download a firmware update. A few second after that we were in business and "learning" commenced.

What is SiriProxy? Since the iPhone 4S was released, some enterprising and creative individuals have reversed engineered the Siri communication protocols (all speech recognition and voice signal processing is done in the cloud).  From these efforts, SiriProxy was born - a modular proxy to intercept communication between the iPhone and the backend Siri servers and allow custom actions to be implemented.  Since SiriProxy is open source, and it is relatively easy to program plugins for it, I took it upon myself to create a plugin which would allow me to say voice commands to my phone and have those commands in turn, interact with the Nest.

The result of a half-days worth of hacking produced the plugin SiriProxy-NestLearning-Thermostat. It is worth noting that I had to run a parosproxy to sniff the Nest iPhone client's RESTful interface protocol and JSON responses. From the responses I was able to code the interactions into the SiriProxy plugin. It's also worth noting that the SiriProxy does not talk directly to the Nest via the local network, but rather, since it is emulating the iPhone app, via the servers.

Currently the plugin can query the Nest to get the current temperature and relative humidity, as well as set the target temperature. Future modifications include switching the mode between "off","heat","cool"

As with most hacks that I do, they are need driven, created to fill a certain useful function. Sure, there is a certain amount of fun, and for-the-hell-of-it attitude, but generally speaking the more mileage and usage I get out of a hack, the more likely I am to expend the effort into it.

blog comments powered by Disqus