This is an interface to the Nest Thermostat via a php script.
It uses Guillaume Boudreau's Unofficial Nest Learning Thermostat API (
https://github.com/gboudreau/nest-api) to get/set information on the Nest Thermostat as required.
The Nest WidgetThe widget design is based on the Weather Underground and Security Alarm System widgets.
The widget:
1) Displays Nest Thermostat Heating information
(Current Temperature, Target Temperature, Humidity, Battery level, Nest Status, Heating ON/OFF, Nest IP address, Nest Serial number)
2) Allows you to set the Target Temperature
3) Allows you to Set/End Away
Notes1) You will need a working PHP environment to use this interface.
2) The unofficial Nest API requires your Nest userid and password. Supply these via the Nest Thermostat program options (step 8a/8b below); these are stored in a configuration file (nestInterface.cfg). Your nest password is encrypted. If you need to re-create this file, just repeat step 8b below; this forces the Nest Thermostat program to re-create this file.
3) This Nest Thermostat program only covers Nest heating (not cooling). I do not have cooling on my Nest thermostat so could not test that
4) If you have more than one Nest Thermostat you will have to add the Nest serial number when you setup the widget. If it is left empty the Unofficial Nest Learning Thermostat API selects your default Nest device. Find the Nest serial number by logging in to the Nest website, selecting a Thermostat and then choosing Settings > Technical Info.
Installation1) Create a <nest-interface> directory (program defaults to /usr/local/bin/nest) and extract the Nest interface scripts [1] in to it
2) Download Guillaume Boudreau's Unofficial Nest Learning Thermostat API (
https://github.com/gboudreau/nest-api/archive/master.zip)
3) Extract this in to your <nest-interface> directory. It will extract in to a subdirectory called <nest-interface>/nest-api-master
4) Import the Nest Thermostat widget [2]
5) Extract the Nest Thermostat widget images [3] in to <your-homegenie-directory>/html/pages/control/widgets/nest/thermostat/images
6) Import the Nest Thermostat program [4]
7) Enable the Nest Thermostat program
8 ) Select the Nest Thermostat program and set the program options
8a) Enter your Nest userid
8b) Enter your Nest password
8c) Set the number of Nest thermostats you require
8d) Check the widget refresh interval
8e) Set the min/max temperature values appropriately (defaults are set for Nests that use the Centigrade temperature scale)
8f) Set DEBUG to TRUE just while you initially setup the widget
8g) Check the paths to the PHP binary and your <nest-interface> directory are set correctly
9) Restart the Nest thermostat program - you should get notified that "The nestInterface.cfg file has been (re)created".
10) Add a Nest Thermostat widget to a homegenie dashboard, give it a name and leave the nest serial number box blank
If all is OK, the widget should display correctly, so...
11) If you need to, add another Nest Thermostat widget to a homegenie dashboard, give it a name, but this time enter the nest serial number in the box provided.
When you are happy all is working...
12) Set the DEBUG option to FALSE
Problem diagnosisIf the widget does not display properly:
1) Try using the widget refresh button a couple of times.
2) Check the DEBUG option is set to TRUE on the Nest Thermostat program and then search the Homegenie log file for 'Nest Thermostat DEBUG' to find further information.
Any feedback and bug reports welcome.