This project is ported to Raspberry Pi Pico: https://github.com/hkoosha/homer2
A project to read out sensors connected to ESP32 and write to InfluxDB and expose for Prometheus. ESP-IDF based.
Raspberry Pi auto configuration included (for Grafana, Prometheus and InfluxDB).
Sensors:
- BMP180
- SHT3X
- S8 (SenseAir)
- PMS5003
- Clone this project.
- Setup esp idf locally.
- Run
idf.py menuconfig
. In homer1 menu:- Wifi: optionally set Wifi SSID and password or disable wifi for debugging.
- Reporting: optionally enable InfluxDB and Prometheus.
- Sensors: enable the sensors you're planning to connect. Configure and take note of the pins you will connect the sensors to here. do NOT enable SGP30.
- Display: if you have an e-paper driver board, enable it here, and configure the pin used for interrupt signal comming from driver board to the main esp32. If you don't have a driver board nonetheless but would like to write the sensor readings to I2c bus you can still use this functionality.
- Connect the sensors to the pins you configured above. All I2C sensors go to the same pins. S8 and PMS5003 each go to different pins because without a mux, UART can only support a single device.
- Connect the power to esp32 and see the readings in serial console or on e-paper.
The Arduino file is located in displayer_esp32 directory. It's writetn for a 7.5 waveshare e-paper display, using the driver board. A proper UI is TBD and not yet written.
You can find the configuration scripts for InfluxDB and Prometheus on a raspberry pi in raspberry directory. If you're not using raspberry you can still get the grafana dashboard scripts from here.
- Make it power consumption friendly.
- SHT3X takes no calibration.
- SGP30 causes panic in interrupt handler of i2c.
Some BMP180 code stolen from:
krzychb/bmp180-tests [APACHE-2.0]
Some S8 code stolen from:
SFeli/ESP32_S8
Some Prometheus ideas got from:
polyfloyd/esp32-sensornode
InfluxDB:
Grafana:
Serial output: