A python program that sends emails when the AQI has passed a specified threshold.
Tested with an sds011 sensor on a raspberry pi zero w.
More information about the sensor can be found here: https://aqicn.org/sensor/sds011/
Dependencies
- Python
- python-aqi (install via pip)
- pyserial (install via pip)
Usage
- Plug the air monitor in a usb port
- Confirm that the usb device in the airMonitor.py is correct, and change if needed.
- Configure email settings. (emailPassword, emailSender, smtpServer, emailPort, emailReceiver)
- Configure other settings as needed. (emailTimeout, aqiThreshold)
- Install dependencies
pip install python-aqi pyserial
- Mark the program as executable
chmod +x airMonitor.py
. (Note: skip this step on windows) - Run airMonitor.py
./airMonitor.py
. (Note: on windows runpython3 airMonitor.py
)