How to address two DHT11 in a script? #23013
Replies: 2 comments
-
You need to use |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you very much. You are the best. Now it works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to address two DHT11 sensors in a script for getting their values. the sensors are at DIO4 and DIO5 and the are shown in the WEB gui.

Now I want to read out in a script their data but it is impossible to address both. On one configured sensor it is possible by using:
t1=DHT11#Temperature
f1=DHT11#Humidity
tp1=DHT11#DewPoint
But on two sensors I don't get the values. I tried several possibilities but nothing helps.
t1=DHT11_04#Temperature
f1=DHT11_4#Humidity
tp1=DHT11-04#DewPoint
t2=DHT11_05#Temperature
f2=DHT11-05#Humidity
tp2=DHT11-5#DewPoint
print Innentemperatur: %t1% °C, Außentemperatur: %t2% °C, Innenfeuchte: %f1%, Außenfeuchte: %f2%, Innentaupunkt: %tp1%, Außentaupunkt: %tp2%
Log:
14:35:47.254 RSL: SENSOR = {"Time":"2025-02-16T14:35:47","DHT11-04":{"Temperature":24.7,"Humidity":48.0,"DewPoint":12.9},"DHT11-05":{"Temperature":24.0,"Humidity":51.0,"DewPoint":13.2},"TempUnit":"C"}
14:35:47.260 Innentemperatur: 0.00 °C, Außentemperatur: 0.00 °C, Innenfeuchte: 0.00, Außenfeuchte: 0.00, Innentaupunkt: 0.00, Außentaupunkt: 0.00
How can I read out both sensors?
Beta Was this translation helpful? Give feedback.
All reactions