Skip to content

randombenj/air-quality-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Air quality monitoring with an SGP30 and a Raspberry PI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published