Multiple temp sensor readouts for Thingspeak AND mqtt?
Posted: Wed Jul 05, 2017 2:11 am
Hi all,
I'm brand new to the ESP8266-world, and really rely on other peoples code - so first of all: thank you all for making awesome projects and sharing them!
I have successfully gotten a NodeMCU ESP-12E to send temperature readings from 3x one-wire sensors (18B20) to Thingspeak, using this code: https://github.com/terahurts/ESP8266-DS18B20-Thingspeak/blob/master/ESP8266-DS18B20-Thingspeak.ino
What I like about this code is that it automatically reads out the addresses for the sensors, so it's very easy to add more sensors.
However, I would also like to be able to send the states to e.g. HomeAssistant using MQTT. The HomeAssistant part is not a problem, but I simply don't know how to modify the code to send MQTT commands from the sensors.
Are any of you able to help me? Thanks in advance!
I'm brand new to the ESP8266-world, and really rely on other peoples code - so first of all: thank you all for making awesome projects and sharing them!
I have successfully gotten a NodeMCU ESP-12E to send temperature readings from 3x one-wire sensors (18B20) to Thingspeak, using this code: https://github.com/terahurts/ESP8266-DS18B20-Thingspeak/blob/master/ESP8266-DS18B20-Thingspeak.ino
What I like about this code is that it automatically reads out the addresses for the sensors, so it's very easy to add more sensors.
However, I would also like to be able to send the states to e.g. HomeAssistant using MQTT. The HomeAssistant part is not a problem, but I simply don't know how to modify the code to send MQTT commands from the sensors.
Are any of you able to help me? Thanks in advance!