Code Monkey home page Code Monkey logo

nestlogger's Introduction

This Python 3 (tested with 3.9.3) script is a template to start working with the Nest API and log data from your thermostats. It can also optionally email you an alert when the relative humidity is above a certain amount. (* See the last paragraph for explanation).

See my Nestools project on github if you would also like the script to control your Nest thermostat: https://github.com/alecvance/Nestools

It does not do any authentication; you will have to do that manually in order to get a token. The steps are generally outlined below. For specifics, see the Nest Developer site.

To get an access token:

  1. Get a Nest Developer account.
  2. Create and register a Nest app from your Nest Developer account and set privileges on your Nest app.
  3. Use OAUTH to setup and authorize your Nest device with the code.
  4. Get the access token for your Nest account to connect to the app.

Once you have a token:

  1. Rename sample.config to nest.config and put your access token in there.
  2. Install Python 3 if necessary.
  3. Run the script from a terminal: "python3 nest.py", or add to your crontab to run periodically.

Each run will append to log file(s); there is a different log file for each thermostat.

The log files show the following per line in order: datetime, inside temperature, inside relative humidity, current state, target temperature.

Temperatures are in Fahrenheit, but can be changed to Celsius with little effort.

If wish to use the email alert system, enter your email address and smtp server and port. You may also wish to adjust the maximum relative humidity (max_rh) before alerts occur.

  • I created this script because our South Louisiana house traps humidity and Nest's "Cool to Dry" feature will not activate if the temperature is less than 75-80 degrees. If Nest engineers lived in a very humid environment like the Gulf Coast, they might realize that this is a ridiculous limitation.

nestlogger's People

Contributors

alecvance avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.