Developer Center > Third Party Device Driver Software Development

Nest Thermostat Device Driver (IronPython)

(1/2) > >>

jleonar:
It seems that a lot of people want an API for the Nest Thermostat.  One guy did a read only version in .Net but his code is pretty fragile from what I can see.  And I don't know a good way to improve his code in .Net as the libraries for scraping don't seem to be nearly as good as python ones.  I plan to implement a python library that does all the heavy lifting for interacting with the Nest website.  Once I have that done, I plan to use IronPython to integrate it into a Elve device driver.  It won't ever be able allowed to be an official driver due to it using python but I thought some people might be interested.

Either way, I am absolutely going to open source the python Nest code.  Just seeing if people would also be interested in the Elve driver when I get around to it. 

Other caveats, I don't plan to initially support more than 1 nest thermostat per account.  More than one would complicate matters and I want to keep it simple less than desirable to start off. 

Is there any interest?  I would also mention that I just began throwing it together this evening.  I have a python script that can login and read the thermostat temp.  I need to do some inspection of HTTP POSTS to determine how to set the temp but it shouldn't be very difficult.  Once I have that, I will need to expand to reading status and things like that. 

When all those basic features are done, I will start looking at an Elve driver.  From my reading, it looks pretty simple to integrate my python code with the device driver using IronPython.  It just needs that I will have to load some DLLs to make it happen. 

John Hughes:
That sounds interesting. You mention scripting... I assume the other driver is using web screen scraping?  If so, as you probably already know, if Nest changes the web page then the scraping could fail.

Does the Nest device not provide a web service?

jleonar:

--- Quote from: John Hughes on July 18, 2012, 03:07:37 pm ---That sounds interesting. You mention scripting... I assume the other driver is using web screen scraping?  If so, as you probably already know, if Nest changes the web page then the scraping could fail.

Does the Nest device not provide a web service?

--- End quote ---

Yep, I was going to use the python mechanize library which functions as a web browser so unless they radically change their page, I could be safe with most assumptions. The bad news is that Nest does not provide a public api or services for their thermostat.  However, there is even better news

Someone who has an iphone decided to integrate SiriProxy with the nest thermostat.  He did data capture between the Nest iPhone app and the Nest Website.  The guy found that they have a RESTful api.  It just isn't published.  This is the API the iphone app and the android app use.  It would likely be relatively stable because otherwise they would need to coordinate changing out apps simultaneously. 

Additionally, I found a person who implemented those RESTful calls in python.  With it being so simple, I am likely going to ditch python all together and implement completely in .NET so the driver will be native for Elve. 

Now, I just need to brush up on .NET and get to work because it should be really simple to implement.   

John Hughes:
Great! If you can use the RESTful web service that would be ideal... and is usually relatively simple compared to screen scraping.

randy.andrade:
Hi there,

Just wondering if any of the described driver development ever took place. I picked up a Nest thermostat a couple months ago, and have so far been very happy with it, but I was curious whether there was any way to integrate it with the rest of my Elve setup. Lo and behold, I found this thread, so I'm just curious if anything ever came of it.

Thanks,

Randy

Navigation

[0] Message Index

[#] Next page

Go to full version