NodeMcu with tasmota and two sensor DHT22

Moderator: leecollings

Post Reply
Pietrogramma
Posts: 5
Joined: Monday 03 January 2022 19:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

NodeMcu with tasmota and two sensor DHT22

Post 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
Dave21w
Posts: 382
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: NodeMcu with tasmota and two sensor DHT22

Post 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 ?
Pietrogramma
Posts: 5
Joined: Monday 03 January 2022 19:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NodeMcu with tasmota and two sensor DHT22

Post 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
User avatar
waltervl
Posts: 5902
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: NodeMcu with tasmota and two sensor DHT22

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Pietrogramma
Posts: 5
Joined: Monday 03 January 2022 19:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NodeMcu with tasmota and two sensor DHT22

Post 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
Attachments
Cattura2.PNG
Cattura2.PNG (45.06 KiB) Viewed 2013 times
Cattura.jpg
Cattura.jpg (124.01 KiB) Viewed 2013 times
besix
Posts: 99
Joined: Friday 25 January 2019 11:33
Target OS: Linux
Domoticz version: beta
Location: Poland
Contact:

Re: NodeMcu with tasmota and two sensor DHT22

Post 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

Code: Select all

Rule1 1
You can also use the Tasmoticz plug then it should detect two sensors by itself
Pietrogramma
Posts: 5
Joined: Monday 03 January 2022 19:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NodeMcu with tasmota and two sensor DHT22

Post 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
jkimmel
Posts: 129
Joined: Monday 25 November 2013 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Mallorca
Contact:

Re: NodeMcu with tasmota and two sensor DHT22

Post by jkimmel »

Hopefully you are not on bullseye because many plugins don't work
Rfxcom
Raspi 4
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest