Firmware for a Wemos d1 Mini to export metrics from a connected environmental sensor via a Prometheus compatible interface.
firmware | ||
README.md |
ESP-Exporter 📈
Simple firmware to Export the Measurings of a DF Robot Environmental Sensor with a Wemos D1 Mini in the form of a Prometheus-compatible
/metrics
-endpoint.
Usage
You can obtain the current metrics from <ip>:9100/metrics
:
you@some ~> curl http://esp:9100/metrics
# HELP temperature_celsius Temperature in Celsius
# TYPE temperature_celsius gauge
temperature_celsius 29.87
# HELP pressure_pa Atmospheric pressure in Pascals
# TYPE pressure_pa gauge
pressure_pa 94785
# HELP altitude_meters Altitude above sea level in meters
# TYPE altitude_meters gauge
altitude_meters 581.15
# HELP humidity_percent Relative humidity in percentage
# TYPE humidity_percent gauge
humidity_percent 25.55
# HELP co2_ppm Carbon dioxide concentration in ppm
# TYPE co2_ppm gauge
co2_ppm 426
# HELP tvoc_ppb Total Volatile Organic Compounds concentration in ppb
# TYPE tvoc_ppb gauge
tvoc_ppb 3
To use it in Prometheus, add the following scrape config:
scrape_configs:
- [...]
+ - job_name: esp-exporter
+ static_configs:
+ - targets:
+ - "<your-ip>:9100"