The BME680 air-quality monitor from last month’s build post is now on GitHub under MIT:
github.com/jamieede123/airquality
It is a BME680 on a Raspberry Pi Zero W, sampling temperature, humidity, pressure, and a relative air-quality score every 10 seconds into SQLite, behind a password-gated Flask dashboard and a Cloudflare named tunnel. The build post explains how each part works.
What is in the repo ¶
The full project: the collector thread, the scoring with its rolling gas baseline, the derived dew point and sea-level pressure, the SQLite storage with bucketed charts, the Discord and ntfy alerting, and the installable PWA dashboard. Configuration is a single TOML file, and most settings are also editable live from the dashboard.
It runs without hardware. A FakeSensor stands in for the BME680, so the dashboard and the full test suite, 150 tests, run on any machine. The bme680 library is only needed on the Pi itself.
Running it ¶
git clone https://github.com/jamieede123/airquality ~/project
cd ~/project
bash deploy/setup.sh
The setup script enables I2C, installs the dependencies and the tunnel, and registers two systemd services. The README has the sensor wiring, the prerequisites, and every configuration key.
For local development with no Pi:
python -m venv .venv
.venv/bin/pip install Flask waitress pytest
.venv/bin/python -m pytest -v
Links ¶
Code: github.com/jamieede123/airquality
Build write-up: Building a BME680 air-quality monitor on a Raspberry Pi Zero W