Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.48 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.48 KB

Air quality monitoring

When should I open my window for fresh air? Here is the answer!

This repository provides a ready to install app for air quality monitoring with an SGP30 Air Quality Sensor and a raspberry pi.

Setup

You will need:

Flash already built image

If you just want this to work, you can install the latest image from the latest build and flash it to an sd card.

Install from source

You may want to use poetry for an easyer installation.

If you already have a Raspberry Pi set up, you can install the package from source like this:

# get the source
git clone git@github.com:randombenj/air-quality-monitoring.git
cd air-quality-monitoring/qualitair

# install dependencies
poetry install

# run it!
poetry shell
cd ..
python -m qualitair

Desktop notification

If you want to get a desktop notification (on Ubuntu) when to open windows, you can simply add this cronjob:

* * * * * CO2=$(curl -s http://RASPI_IP:8080/\?limit=1 | jq '.measurements[0].co2') && test $CO2 -gt 1100 && XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send "Open windows!" "CO2: $CO2"

Note that you will need to install jq for this to work.