Home AQI monitor

March 5, 2018 by dc

PMS7003 + Raspberry PI + InfluxDB + Chronograf

InfluxDB as a time series data store, Chronograf as a data visualization.

PMS7003 reader and influxdb client code: https://github.com/dawncold/raspberry_aqi



curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
test $VERSION_ID = "9" && echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt update
sudo apt install influxdb
sudo systemctl start influxdb


sudo apt install chronograf

Create database

create database homeaqi

influxdb client code

git clone https://github.com/dawncold/raspberry_aqi.git
cd raspberry_aqi
virtualenv .env
source .env/bin/activate
pip install -r requirements.txt


* * * * * /opt/raspberry_aqi/.env/bin/python /opt/raspberry_aqi/src/raspberry_aqi/raspberry_aqi.py /home/pi/raspberry_aqi.conf

config chronograf

  • add a connection with influxdb
  • add a dashboard
  • add some cells on dashboard
  • add graph on cell

© 2018 | Follow on Twitter | Hucore theme & Hugo