This is a place to show off what went into building my AQI measuring station. https://www.lpb-air.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
simon 897a302314
rebuild with new python version
2 weeks ago
.vscode some housekeeping 12 months ago
aqi_monitor point to new api endpoints 12 months ago
env add umami 2 months ago
helper_scripts some housekeeping 12 months ago
nginx major app rebuild into a single flask application 12 months ago
postgres indexing on epoch_time for faster where queries 12 months ago
web rebuild with new python version 2 weeks ago
.gitignore add umami 2 months ago
.pylintrc ignore unsave import message 11 months ago
LICENSE.md minimum viable product 1 year ago
README.md updated for new comined flask app 12 months ago
deploy.sh specify compose file 8 months ago
docker-compose.yml add umami 2 months ago

README.md

AQI sensor project

social_preview.jpg
This is a place to show off what went into building my AQI measuring station currently publishing to:

lpb-air.com

This site is under constant development. The main purpose is educational.

The webserver is a simple VPS, provisioned with docker-compose.yml.

aqi_monitor

aqi_monitor.ino is the arduino script running on the nodeMCU ESP8266 microcontroller. The microcontroller posts data to the flask backend on a regular interval. Connected to that is:

  • SDS011: pm2.5 and pm10 sensor from Nova Fitness.
  • BME280: Pressure Humidity Temperature Sensor Module.

web

A flask based application that takes the data from the ESP8266 for processing and storage and renders a HTML/CSS/JavaScript frontend from template.
Postgres handles the storage of the measurements. The data is split up into two different tables, one for aqi related data and one for the weather data.
Python interacts with Postgres with the help of the psycopg library.
The flask app is recreating the graphs to visualize the aqi, PM 2.5 and PM 10 values on an interval. Aggregating is done with the Pandas Python library and the graphs are created with matplotlib.
New data is pulled from the backend on a interval with JavaScript and XMLHttpRequest library.

credits

The Lightbox to take a closer look at the graphs is curtesy of Lokesh Dhakar.