With your Nest thermostat, On This Do That.
Warning
This project is no longer under development and archived.
This is Node.js console script uses the Firebase API to subscribe to state changes of your Nest Thermostat. Currently, it toggles a [ WeMo Switch for the electric floor heating system depending on whether the Nest is heating or off, but you can make it do anything you want.
- Copy
config.sample.json
toconfig.json
- Edit
config.json
and fill out your Nest API keys. Get your Nest Product ID and secret here: https://developers.nest.com/products. - Run
npm install
to authorize the script with Nest. - Run nest-ontdt using
node index.js start
I recommend running nest-ontdt from something like Monit or upstart to respawn it whenever necessary. I run nest-ontdt on my Synology NAS using the following upstart
configuration file:
start on runlevel [2345]
stop on runlevel [06]
setuid YOUR_USER
respawn
respawn limit 10 5
exec /usr/local/bin/node /PATH/TO/nest-ontdt/index.js start