ESP Wroom 32 with 2 DHT22 sensors not working

Baggerfahrer
Posts: 1
Joined: Fri May 10, 2024 2:56 pm

ESP Wroom 32 with 2 DHT22 sensors not working

Postby Baggerfahrer » Fri May 10, 2024 3:05 pm

Hi together!

I kindly ask for support to bring a project with 2 DHT22 sensors to life. I set-up a ESP32 wroom dev board with 2 DHTs, attached to GPIO 27 & 18 GND and 3.3V without adding an additional resistor. I use ESPHome to set it up.

One of the sensors is working fine as expected, the other one sends data only after the first update-interval after a reboot/ after plugging-in the energy, at the second update-interval, the sensor sends only NaN.

See attached the code, which is use in ESPHome, but i think important to mention is, that i set the internal pullup to true for both sensors.

Code: Select all

sensor:
  - platform: dht
    pin:
      number: 27
      mode:
        input: true
        pullup: true
    temperature:
      name: "Keller_Temperatur_aussen"
      id: tempaussen
    humidity:
      name: "Keller_Luftfeuchte_aussen"
      id: luftaussen
    update_interval: 30s
    model: DHT22
  - platform: dht
    pin:
      number: 18
      mode:
        input: true
        pullup: true
    temperature:
      name: "Keller_Temperatur_innen"
      id: tempinnen
    humidity:
      name: "Keller_Luftfeuchte_innen"
      id: luftinnen
    update_interval: 10s
    model: DHT22
Assistance would highly be appreciated.
Many thanks!

Who is online

Users browsing this forum: No registered users and 30 guests