.NET API for Nest Thermostat

I just finished a preliminary read-only (think version 0.1) wrapper around the Nest Thermostat API that is used by their mobile phone and web applications. As Nest doesn’t have a formal API yet, the code could break at any time and may not be suitable for any use. However, it is working today. Smile

The project is hosted on GitHub. It uses JSON.NET for parsing the return values from the Nest servers.

There are three projects, with the lib containing the assembly that is used by the two test applications. One is a console app and the other a simple WPF application:

SNAGHTML88bff0b3

(My thermostats are named Zero, One, and Two).

If there’s interest, I plan on adding some methods to the library which allow modification of data (such as the current temperature), and ideally, support for live updates from the devices if I can make sense of the data that is returned.

FYI: I’ve now written a Node version of the API, detailed here.

18 Comments

  1. I just caught my Nest in the middle of updating. Then for 10 minutes it just showed a blue “house” icon.

    Now I see Display Software version 1.0.6 (the last one I noticed was was 1.0.4) and Base Software version 3.5.4 / 1.1

  2. I don’t think I like the software update thing.
    Don’t get me wrong, a proactive update is wonderful. But, ala Apple, there should be notification of what the update is for, even if only “bug fixes”.
    Ideally, a full explanation along the lines of “fixes the issue of XXXXXX which some users are experiencing”.
    Or am I off base?

    1. Not off base. I don’t think it’s unreasonable at all to have a simple list of what’s changed, especially if it’s going to auto-update without consent.

  3. I am very interested in using your API in a Labview application that reads and plots the current temperature with time. Labview can call DOS command line executables that return a string (such as current temperature) and then process it further. Can your program be compiled to run as a dos command, and return a string with the current temperature? It can pass command line parameters to set up log on info etc. I have no knowledge of the programming envioirment that you used, and therefore cannot modify your code myself.

    1. The code I’ve provided as a sample would be usable in a command prompt in Windows with some modifications.

      It used Microsoft’s .NET.

  4. Thanks Aaron. Unfortunately I do not understand .NET. I just need a compiled executable I can pass necessary inputs to, that returns with a string that is the current temp!

  5. These seems way out of my league as you coding geniuses have seemed to crack open the nut that I’ve been hoping someone would crack open. Nest is wonderful. I have a home automation system (Insteon mostly) that is aching to interface with it.

    I’m not exactly sure how to run the projects listed above. I’m not a coder, though I am pretty handy around technology and not a complete idiot, but this seems to be quite complicated. I’m on a mac, so not sure if JSON even works. Downloaded something called Objectify (JSON client for mac) but it doesn’t seem to want to open any of the files in your GitHub project. Please forgive my cluelessness, but any simple way to fire this up so I can send variables to my Home Auto system?

    Thanks in advance for your patience.

    -JP

    1. No, sorry, there’s not a simple way to connect the two without more work. I’ve never tried it on the Mac. In theory, using Mono (.NET for Mac), it might work with some tweaks. Not sure.

  6. Looking at the .NET code and trying to work out what it is doing I’m curious what the nest-login1.txt and nest-status1.txt files contain as the comment says you can create one by grabbing the output of the calls but doesn’t elaborate on what calls.

  7. Within the
    private void btnLogin_Click(object sender, RoutedEventArgs e)

    I’m trying to get some basic functionality working as Nest seem to not forthcoming with a windows phone.

    1. @spotty — do you have a question/comment?

      I’m guessing Nest won’t have a WP experience. Does the web site via the mobile browser work on WP7/8?

  8. Hi Aaron – The web site works horribly on wp7/8 (not really usable) and nest have no plans to support at the moment. I’m looking to create a simple app to turn on/off and move temp up/down. I only have a single Nest.

    I’ve done .net development – just not much in the way of web stuff.

    1. Hmm. Surprised it doesn’t work on WP8 (as that’s supposed to be IE9, basically). Are you trying to create an WP7/8 App, or a web site that you can browse from your phone?

  9. Got the basic connection sorted out. Not I’m trying to undertstand the part about setting the temperature.

Comments are closed.