Pimoroni Enviro+ air quality monitor sensors for the open source Traffic Monitor project at glossyio/traffic-monitor.
Based on the amazing work at roscoe81/enviro-monitor (cloned from
73a8e02, version 8.2 Gen
) and the manufactuer's repo at pimoroni/enviroplus-python.
- Run
cd ~/code
- Run
git clone https://github.com/greendormer/enviroplus-monitor.git
- Run
cd enviroplus-monitor
- Run
sudo chmod +x setup.sh
to enable script - Run
./setup.sh
to install service
You will need Traffic Monitor v0.3.0 or greater to feed data into your TM.
Relevant settings for Python script to interact with the Traffic Monitor Node-RED instance.
See config_readme.md for table with full description and TM defaults. Minimum required TM config fields also listed below:
"enable_send_data_to_homemanager": true
in order to send MQTT payloads to specified broker"mqtt_broker_name": "localhost"
to send to Node-RED MQTT broker (assumes port 1883)"indoor_outdoor_function": "Outdoor"
to utilizeoutdoor_mqtt_topic
"enable_display": false
since the AQ sensor will be in an enclosure"outdoor_mqtt_topic": "aq/readings"
for message topic
These need to be configured per-deployment for your location. They are utilized by the Astral package for calculating the times of various aspects of the sun and phases of the moon.
"altitude": 49,
"city_name": "Portland",
"time_zone": "America/Los_Angeles",
"custom_locations": [
"Portland, United States of America, America/Los_Angeles, 45.52, -122.681944"
]