Nest-Scrape

This program logs into to the Nest website and retrieves the thermostat, temperature sensor, and humidity measurements, and the external temperature. It's a workaround for the fact that the Nest API doesn't allow retrieval of the temperature sensor measurements.

It works by starting the firefox browser in headless mode, and controlling it via the marionette protocol to perform the login. After login, it scrapes the web UI to retrieve the sensor information and prints it out two lines: a line of comma-separated headings, and a line of comma separated measurements, like so:

Time, Dining Room Thermostat Int. Temp., Bedroom 1 Int. Temp., Bedroom 2 Int. Temp., Upstairs Hallway Int. Temp., Dining Room Humid., Home Ext. Temp.
Jan 14 14:54:16 2019, 20, 18.5, 18.5, 19.5, 31, -8
    

Alternately it can output JSON:

{"InternalTemperatures":[{"Label":"Dining Room Thermostat","Value":20.5},{"Label":"Bedroom 1","Value":18.5},{"Label":"Bedroom 2","Value":19},{"Label":"Upstairs Hallway","Value":19.5}],"ExternalTemperatures":[{"Label":"Home","Value":-21}],"Humidities":[{"Label":"Dining Room","Value":29}]}
    

Source Code

Find the source code on Github.

Download

Pre-packaged binary versions are available which include the compatible version of firefox. See the README file in the package for usage instructions.

Linux 64-bit: Version 0.1
Linux 32-bit: Version 0.1