Script to save current Nest Thermostat temperature and humidity in InfluxDB. To do so, the scripts makes use of the HomeBridge Nest extension in order to make it easy to access to the Nest services. Using crontab you can take measures periodically and view them using a Grafana dashboard.
Configuring the script is as easy as following these steps:
- Install NodeJS v12+ on your system.
- Install InfluxDB on your system.
- Create a database in your Influx instance.
- Download the script using git.
- Install all the dependencies by running
npm install
. - Modify the
config.js
file to include your Nest credentials. Follow the steps included in this guide to obtain theissueToken
,cookies
andapiKey
values. - Modify the
config.js
file to include your Influx host and database. - Run the script by executing
node index.js
.
To update your InfluxDB periodically with the latest information, you can use crontab. To do so, execute crontab -e
and add the following line:
*/5 * * * * node <PATH>/nest_tracker/index.js >> /dev/null 2>&1
This will update the values every five minutes. You can change the periodicity by changing the initial number of the line. Don't forget to replace <PATH>
by the real path where you have downloaded this repository.