Coder Social home page Coder Social logo

hkoosha / homer1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 815 KB

Home air quality monitoring. esp32 project to read sensors and write to influxdb and prometheus: PMS5003, S8, BMP180, SHT3X

License: Apache License 2.0

CMake 0.88% Makefile 5.29% C++ 84.66% Shell 0.53% Python 8.65%
esp32 pms5003 sht3x s8 bmp180 esp-idf influxdb prometheus airquality airquality-sensor

homer1's Introduction

Update

This project is ported to Raspberry Pi Pico: https://github.com/hkoosha/homer2

What?

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

How?

  • 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.

e-paper display

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.

Prometheus / InfluxDB / Grafana

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.

ROADMAP

  • Make it power consumption friendly.
  • SHT3X takes no calibration.
  • SGP30 causes panic in interrupt handler of i2c.

References

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

Screenshots

InfluxDB:

InfluxDB

Grafana:

Grafana

Serial output:

esp32 output

homer1's People

Contributors

hkoosha avatar

Watchers

 avatar  avatar

homer1's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.