prometheus-esp8266-dht-expo.../README.md

65 lines
2.2 KiB
Markdown
Raw Normal View History

2020-06-27 19:17:33 +00:00
# Prometheus ESP8266 DHT Exporter
2020-06-27 11:44:57 +00:00
2020-06-29 11:39:10 +00:00
[![GitHub release](https://img.shields.io/github/v/release/HON95/prometheus-esp8266-dht-exporter?label=Version)](https://github.com/HON95/prometheus-esp8266-dht-exporter/releases)
2021-06-12 16:54:38 +00:00
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.
2020-06-29 11:39:10 +00:00
## Metrics
| Metric | Description | Unit |
| - | - | - |
2021-09-30 00:33:05 +00:00
| `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` |
2020-06-29 11:39:10 +00:00
2020-09-29 14:24:01 +00:00
## Requirements
2020-09-29 14:24:01 +00:00
### Hardware
2020-09-29 14:24:01 +00:00
- ESP8266-based board (or some other appropriate Arduino-based board).
- Tested with "Adafruit Feather HUZZAH ESP8266" and "WEMOS D1 Mini".
- DHT sensor.
2021-09-30 00:33:05 +00:00
- Tested with a cheap DHT11 from eBay and "Wemos DHT Shield" (using pin 2).
2020-09-29 14:24:01 +00:00
- DHT11 supports a maximum of 1Hz polling while DHT22 supports a maximum of 2Hz polling.
- Both DHT11 and DHT22 support both 3V and 5V at 2.5mA max current.
2020-09-29 14:24:01 +00:00
### Software
- [Arduino IDE](https://www.arduino.cc/en/Main/Software)
- Download and install.
- [esp8266 library for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager)
- See the instructions on the page.
2020-06-27 18:21:31 +00:00
- [DHT sensor library for ESPx](https://github.com/beegee-tokyo/DHTesp)
- Install using the Arduino library manager.
2020-09-29 14:24:01 +00:00
- You can also try the Adafruit one, but that one didn't work for me.
## Building
2020-09-29 14:24:01 +00:00
### Hardware
Using the "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).
### Software
Using the Arduino IDE.
1. Copy `config.default.h` to `config.h` and fill inn the details.
2020-09-29 14:24:01 +00:00
1. Open `src/src.ino` in the Arduino IDE.
1. Set the correct settings for the board.
- WEMOS D1 Mini uses board "WeMoS D1 R2 & mini".
2020-09-29 14:24:01 +00:00
- Adafruit Feather HUZZAH ESP8266 uses "Adafruit Feather HUZZAH ESP8266".
1. Build and upload using the Arduino IDE.
2020-06-27 19:16:23 +00:00
2020-06-29 11:39:10 +00:00
## Version
2020-06-27 19:16:23 +00:00
2020-06-29 11:39:10 +00:00
See `src/version.h`.
It's set manually since no build tools (or CI) other than the Arduino IDE is used.
## License
GNU General Public License version 3 (GPLv3).