Code Monkey home page Code Monkey logo

airthingsnest's Introduction

Automation for Airthings + Nest Thermostat

Use Airthings measurements to control Nest Thermostat to ensure healthy air and comfortable temperatures.

This is mostly just the Airthings and Nest libraries to get you started. You'll need to impliemnt your own logic to control fans or HVAC.

Fan Thresholds

  • Radon >= 2.7 pCi/L / >= 100 Bq/m3
  • PM2.5 >= 10 ug/m3
  • VOC >= 250 ppb
  • CO2 >= 800 ppm
  • Humidity 25% >= x >= 60%

Adjust AC if...

  1. AC is on, but the measured temp from Airthings does not match Nest

Requirements

Hardware

  • Airthings View Plus. I've only tested it with the View, but it should work with other devices
  • Nest Thermostat

Setup

  • Smart Device Management (SDM) API - There are several steps to get API access. I followed this article. Note: to get API access, you must pay a one-time $5 fee to Google.
  • Airthings API - You'll need an Airthings account to generate an API key.
  • Python/Pipenv
  • Optional: update values in config.yaml
  • If running locally, setup environment variables. If running via GitHub Actions, setup repo secrets.
    AIRTHINGS_CLIENT_ID
    AIRTHINGS_CLIENT_SECRET
    NEST_PROJECT_ID
    NEST_CLIENT_ID
    NEST_CLIENT_SECRET
    NEST_REDIRECT_URI
    NEST_CODE
    NEST_ACCESS_TOKEN
    NEST_REFRESH_TOKEN
    
  • If running for the first name you'll need to run nest.get_code() and add the output to the env variable NEST_CODE.

airthingsnest's People

Contributors

erickatwork avatar

Watchers

 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.