WIP
A python client for Raspberry Pi environmental sensors. Currently this is intended for the Pimoroni Enviro, but is extensible to potentially apply to other sensors.
This adapts a subset of the examples from the enviroplus-python repo, combines them into a single service, and also exposes them for eaiser use as a python library.
Currently this is mainly just for learning purposes, and does not (yet) support the Enviro+ gas and PM sensors.
rpi-enviro-monitor
combines the following features into one program, intended to be used as a systemd service:
- Display bar charts for individual sensor metrics
- Display combined sensor readings and device status
- Toggle between display modes using the proximity sensor
- Publish sensor readings via MQTT (optional)
- Configure via a yaml config file
rpi-enviro-monitor
can also be used as a python library, if you don't plan on using it as a service,
or if you want different behavior.
- Raspberry Pi OS 'Bullseye' (not tested on earlier releases)
- Python 3.9+
To install and configure rpi-enviro-monitor
as a systemd service:
curl -fLo install.sh https://raw.githubusercontent.com/JWCook/rpi-enviro-monitor/main/install.sh
./install.sh
Then, update config settings in ~/.config/enviro.yml
as needed.
If the included script doesn't work for you, try the enviroplus-python install script, which accounts for more variations in system configurations.
Then install this package:
pip install --user rpi-enviro-monitor
And see install.sh for optional setup steps.
Requires poetry.
poetry install
- Most features are adapted from the examples in enviroplus-python
- MQTT client is adapted from rpi-enviro-mqtt (also in enviroplus-python examples)
- Example systemd service is taken from rpi-enviro-mqtt