Skip to content

Gather readings from your Awair air quality sensors and ingest them into InfluxDB

License

Notifications You must be signed in to change notification settings

astundzia/awair-to-influx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awair Sensors to InfluxDB

Simple CLI program that uses the Awair API to gather readings from your air quality sensors and ingest them into InfluxDB. This allows you to visualize air quality trends over time in a tool like Chronograf.

Example of data in Chronograf

Why fork?

I forked and modified this repo so I could run this application within a docker container. I modified a few things to make it more "12 factor friendly" where configuration is done through environment variables.

Setup

Just clone the repository, copy config.example.yaml to config.yaml and fill in the configuration options. You'll need to signup for the Awair developer program in order to get an API key. You'll want to create a new InfluxDB database and add that to the configuration file as well.

You can then install dependencies and run the script -

pip3 install -r requirements.txt 
python3 main.py

While running it will import samples from all sensors every 15 minutes (using the Awair hobbyist plan this is currently the smallest granularity available).

If you need help getting InfluxDB setup, I'd recommend using this TICK stack sandbox.

About

Gather readings from your Awair air quality sensors and ingest them into InfluxDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.1%
  • Dockerfile 5.9%