An NodeMCU (esp8266) based multi sensor reporting temperature, humidity and luminance via MQTT topics. Perfect to be added to a HomeAutomation system
To reduce network traffic and network load the multi sensor only report status after a predefined interval or when the configurable threshold is met.
Parameter | Default value | Description |
---|---|---|
reportInterval | 600 000 ms | Time in milliseconds between reports (600 000ms = 10min) |
thresholdTemperature | 0.5 | Threshold level in Celsius (*C) to send report to Homey |
thresholdHumidity | 1 | Threshold level in Humidity (H) to send report to Homey |
thresholdLuminance | 100 | Threshold level in Luminance (Lux) to send report to Homey |
Needed Arduino Libraries to be included in IDE. Install them either from GitHub repositories directly or within the IDE application itself Sketch > Import Library
Library | Link to GitHub |
---|---|
library for MQTT | https://github.com/knolleary/pubsubclient |
Adafruit TSL2561 Luminance sensor | https://github.com/adafruit/Adafruit_TSL2561 |
Adafruit Unified Sensor | https://github.com/adafruit/Adafruit_Sensor |
DHT22 sensor for esp8266 | https://github.com/beegee-tokyo/DHTesp |
MQTT Topics to be sent to the Broker
Topic | Description |
---|---|
MultiSensor/Luminance | sensor value in lux |
MultiSensor/Temperature | sensor value in celsius |
MultiSensor/Humidity | sensor value in humidity |
- version 1.0 - First release
- version 1.1 - Minor updates | increased reportInterval and cleaned up some code
- Sensor calibration configuration parameters
- Minimum reportInterval configuration parameter to minimize reports when Luminance quickly change
- Adafruit TSL2561: https://www.adafruit.com/product/439
- Adafruit DHT22: https://www.adafruit.com/product/385
- NodeMcu: http://nodemcu.com/index_en.html