AirGradient with prometheus exporter and remote display control.
This connects an AirGradient DIY Pro sensor to a WiFi network with an HTTP server to provide prometheus-style metrics and to allow the display OLED display to be programmed remotely.
Urls:
GET /metrics
- prometheus dataPOST /setscreen2
- upload data for the 2nd screen. Variables passed through the POST data:watt / wattavg / water / watertoday / garage / garagetime
- values for the 2nd screenoledInterval
- the ms between oled updates
POST /uploadscreen
- upload additional screens, to be shown on the OLED. Vars:d0 ... d19
- up to 20 different screens- Each screen is in the XBM format / 1024 chars, each bit is a pixel
- Recommend 1 screen updated at a time to keep byte count low.
Default screen setup:
- Show the Airgradient data, all on one screen.
- Show the (next) custom screen, if it exists
- Show the external 2nd screen data, if it has been provided. If no data was provided, go back to #1.
- Show the (next) custom screen, if it exists. Repeat back to #1.
This work is based heavily on:
- Airgradient code: https://github.com/airgradienthq/arduino/blob/master/examples/DIY_PRO_V4_2/
- Jeff's airgraident-prometheus: https://github.com/geerlingguy/airgradient-prometheus
Written for a AirGradient DIY PRO 4.2 with a SGP41 TVOC module.
The oled_updater/ files is an example python script that can generate screens + push the screens to the airgradient OLED.
Use the Arduino software to install the image in the arduino/ directory to the Airgradient system.
- Airgradient installation instructions
- Make any configuration changes necessary in the code, including specifying the wifi settings for the Airgradient in the code itself
- Install the software using a connecton to the internal USB port. The external USB port on the Airgradient only provides power.