Examples how to connect NodeMCU/ESP8266 sensors to Domoticz using MQTT
Examples how to connect NodeMCU/ESP8266 with sensors to Domoticz using MQTT.
NodeMCU_MQTT_1-Wire_temp/NodeMCU_MQTT_temp.ino reads temperature from a 1-Wire sensor and sends the data to Domoticz using MQTT.
NodeMCU_MQTT_DHT22/NodeMCU_MQTT_DHT22.ino reads temperature and humidity from a DHT22 sensor and sends the data to Domoticz using MQTT.
These examples are using Domoticz installed on a Raspberry Pi.
See: https://www.domoticz.com/wiki/Raspberry_Pi.
In addition to Domoticz a MQTT broker has to be installed.
The Mosquitto MQTT broker is installed on the same Raspberry Pi.
The installation is described in the download section of https://mosquitto.org/
Domoticz needs to subscribe to the Mosquitto MQTT message broker that is now running locally. Under Setup/Hardware add a device:
To create the sketch for the NodeMCU the appropriate Arduino NodeMCU board package and libraries has also to be installed.
Common for both examples above: