An IoT Prometheus exporter for measuring temperature and humidity, using an ESP8266 (Arduino-compatible) with a Wi-Fi module and a DHT (temperature + humidity) sensor.
Metric | Description | Unit |
---|---|---|
iot_info |
Metadata about the device. | |
iot_air_humidity_percent |
Air humidity. | % |
iot_air_temperature_celsius |
Air temperature. | °C |
iot_air_heat_index_celsius |
Apparent air temperature, based on temperature and humidity. | °C |
- ESP8266-based board (or some other appropriate Arduino-based board).
- Tested with "Adafruit Feather HUZZAH ESP8266" and "WEMOS D1 Mini".
- Tested with ESP8266 Mini from Jaycar (XC3802)
- DHT sensor.
- Arduino IDE
- Download and install.
- esp8266 library for Arduino
- See the instructions on the page.
- DHT sensor library for ESPx
- Install using the Arduino library manager.
- You can also try the Adafruit one, but that one didn't work for me.
-
Adafruit Feather HUZZAH ESP8266
- Wire the DHT sensor power to the 3.3V and any GND on the ESP and wire the data output to e.g. pin 14 (aka D5).
-
Jaycar ESP8266 Mini
- Set
DHT_PIN
to11
- Set board to
LOLIN(WEMOS) D1 R2 & Mini
in Tools -> Board.
- Set
Using the Arduino IDE.
- Copy
config.default.h
toconfig.h
and fill inn the details. - Open
src/src.ino
in the Arduino IDE. - Set the correct settings for the board.
- WEMOS D1 Mini uses board "WeMoS D1 R2 & mini".
- Adafruit Feather HUZZAH ESP8266 uses "Adafruit Feather HUZZAH ESP8266".
- Jarcar ESP8266 Mini uses
WeMoS D1 R2 & Mini
- Build and upload using the Arduino IDE.
See src/version.h
.
It's set manually since no build tools (or CI) other than the Arduino IDE is used.
GNU General Public License version 3 (GPLv3).