Hi, I have a problem with more than one DHT11 at the same board.
When I connect one of them, I use this code:
- platform: mqtt
name: “1”
state_topic: “tele/sonoff/SENSOR”
value_template: ’ {{ value_json.DHT11.Temperature }}’
unit_of_measurement: “°C”
device_class: temperature
- platform: mqtt
name: “2”
state_topic: “tele/sonoff/SENSOR”
value_template: ’ {{ value_json.DHT11.Humidity }}’
unit_of_measurement: “%”
device_class: humidity
When I have two of them, I do not know what to change to make home assistant know which one is it.
Here I can see DHT11-02 and DHT11-05
I tried it from both of you, and it doesnt work either , I added a relay to the board to make sure its connected and comunicate ok. The sensors shows up in main page but there is just -, and switch works.
Hi all,
I thought that I had found the answer to my problem too but after plugging my esp-01 into the the serial connector and checking the interface it came up with this:
I tried 2 other sensors which are fine on their own (after reconfiguring the .yaml each time) but do not work together.
My trouble is that the DHT11 does not have a suffix like yours. Could this be that it is just the esp-01 connected the serial interface without the DHT11 bridge or something else?
Did you set right pin in Tasmota ? Mine is D4 GPIO2
I have this one too, and my problem was, that I broke my sensor, and had to replace it.
The issue was, that they say you can use up to 12v, but in my case, the regulation was not there or did not work, so I fried my DHT11.
I had them working individually (bit of a pain re-writing the .yaml and restarting as I’m on a pi zero and it takes ages to re-boot!) but they don’t play well together.
I’m struggling to find the individual labels for the dht 11’s (dht11-02 etc…) so that I can write it into the .yaml file.
I saw that @Binkoth has a solution but it only seems to be for temperature (see below), maybe I can separate the temp/humidity somehow and forget the json line as this is the part that seems to require the individual labels?
Try to check this, I still know almost nothing about HA :/, but I will try to provide my code, maybe it will help. Check the names, and the number after DHT11-xx ?? Mine is 02 and 05, I see one of your sensors is DHT11-02 and the other you must fill instead of DHT11-05, or if its the same, just try the code.
And also, ? (the names of the boards, like Kitchtemp, must be only for one board) ? I am not sure, but try every board with tasmota named different name like Kitchtemp1 Kitchtemp2. If you have two sensors with two ESP01 and both have the same name, it can cause errors. So, you will have to rename this in yaml code and tasmota and make every sensor unique.
state_topic: “tele/Kitchtemp1/SENSOR”
and
state_topic: “tele/Kitchtemp2/SENSOR”
if you named them Kitchtemp1 and Kitchtemp2.
I am sorry, probably I gave you wrong advice with DHT11-02/05 because you use one DHT for one board yo It should be without the others numbers I hope
- platform: mqtt
name: “1”
state_topic: “tele/name of your board/SENSOR”
value_template: “{{ value_json.DHT11.Temperature }}”
unit_of_measurement: “°C”
device_class: temperature
- platform: mqtt
name: “2”
state_topic: “tele/name of your board/SENSOR”
value_template: “{{ value_json.DHT11.Humidity }}”
unit_of_measurement: “%”
device_class: humidity
And you can see the temperature in tasmota ? It will be weird if it sends empty MQTT if the tasmota has the values.
I tryed now to take the board and add it like new device, I just flashed added mqtt set GPIO and added the line in HA and it worked
I can see the temp in tasmota (web server) and it appears on the HA overview as a temperature dial as living room temp. The living room temp relay clicks on and off according to the desired temp setting too but I am not having any luck repeating this with the other sensor-relay setup.
The aim is to put a sensor in each room to control a heater so that each room has a comfortable climate and not just reliant on 1 central sensor.
The house varies quite dramatically from room to room so I think this would be necessary.
Oh I see. But it should be as the code you already used.
Just copy the code and just rename “name” you want and “state_topic” for the tasmota name of other board, the code doesnt change.
There must be just some stupid mistake I hope.