Page 1 of 1
NodeMcu with tasmota and two sensor DHT22
Posted: Wednesday 05 January 2022 1:56
by Pietrogramma
Hello guys, I recently discovered Domoticz and I am therefore a beginner. Some time ago I used a Nodemcu, with tasmota firmware, to which I connected two DHT22 sensors (one on GPIO14 and one on GPIO2), one for the internal temperature of the house and one for the external one.
Yesterday, I tried to connect it to Domoticz, via MQtt, but I can read the data of only one sensor, is there the possibility of reading both of them? if you could explain to me, in the simplest way possible (as if you were talking to a child

) how to do it?
Hello and thank you very much
Re: NodeMcu with tasmota and two sensor DHT22
Posted: Wednesday 05 January 2022 8:49
by Dave21w
First Question, Have you added 2 new sensors to Domoticz and then made a note of there IDX value and entered this in the correct field in Tasmota yet ?
Re: NodeMcu with tasmota and two sensor DHT22
Posted: Wednesday 05 January 2022 10:40
by Pietrogramma
Hi Dave, exacltly... I created two sensor temperature+Umidity (one with IDX 1 and other with ODX2) and I inserted in tasmota "Domoticz" the value 1 in the Sensor Temp-Umidity and 2 in sensor temp-umidity-baro, but I read the temperature only in sensor with IDX1
Re: NodeMcu with tasmota and two sensor DHT22
Posted: Wednesday 05 January 2022 13:36
by waltervl
Check with MQTT explorer what Tasmota is sending, see
https://www.domoticz.com/wiki/MQTT#Debugging_MQTT
And check that values that Tasmota is sending are according the rules from Domoticz MQTT
https://www.domoticz.com/wiki/MQTT#Upda ... t_Setpoint
Re: NodeMcu with tasmota and two sensor DHT22
Posted: Thursday 06 January 2022 0:03
by Pietrogramma
I installed in my PC the MQTT explorer and I checked that the two sensors work ( I read their values in MQTT).
Always in the MQTT Explorere, under the IN string of the Domoticz, I read only in = {"idx":2,"nvalue":0,"svalue":"24.8;88.8;3","Battery":100,"RSSI":5}, I don't found any rifeiment about DX1.
In the attach pic, where I must insert the value of the DX1?
I attach a photo whit the valuues in tasmta web of the two sensor.
Thanks and ciao
Re: NodeMcu with tasmota and two sensor DHT22
Posted: Thursday 06 January 2022 9:07
by besix
I do not have AM 2301 because it is not suitable for the outdoors.
You must use the rules in tasmota. Run console and insert
Code: Select all
Rule
ON tele-AM2301-14#temperature DO var1 %value% ENDON
ON tele-AM2301-14#humidity DO publish domoticz/in {"idx":2,"svalue":"%var1%;%value%;1"} ENDON
Then turn on the rule
You can also use the Tasmoticz plug then it should detect two sensors by itself
Re: NodeMcu with tasmota and two sensor DHT22
Posted: Saturday 08 January 2022 16:25
by Pietrogramma
I tried to install the plugin Tasmoticz ( I followed this github
https://github.com/joba-1/Tasmoticz), but the system was in crash (if I goto to the ip of raspberry I see only a black screen and in the url I read
http://192.168.178.30:8080/#/Offline).
Actually i've noticed that often when I install a plugin i have this problem, how can i solve it? is there any operation to do before installing a plugin.
Thanks and ciao
Re: NodeMcu with tasmota and two sensor DHT22
Posted: Saturday 08 January 2022 18:45
by jkimmel
Hopefully you are not on bullseye because many plugins don't work