Closed WillT93 closed 4 years ago
I have notice that DHT22 sensor need power reboot (remove power supply) after flashing or OTA for working properly.
I'm seeing the same behaviour even after a power reboot.
Might be related to #239
I have notice that DHT22 sensor need power reboot (remove power supply) after flashing or OTA for working properly.
Hi, thanks for the suggestion unfortunately in this case that doesn't seem to be helping much :/ have power cycled on several occasions while switching between different power supplies to no avail.
I'm seeing the same behaviour even after a power reboot.
Interesting to see someone else having the same issue, to verify we are in the same boat, have you tried uploading a simple Arduino sketch to the device which reads from the DHT and prints the value to serial? That's what I did to verify that it wasn't an issue with the board or the wiring. Can send you the sketch if you like.
I haven't - the Sonoff is near the ceiling and I don't have the hardware to flash it over serial here.
Hello, My DHT sensor works. I found that I had to specify the model of the sensor in order for it to work. See below. Hopefully this will help.
sensor:
platform: dht
pin: D4
model: AM2302
temperature:
name: "Study temp"
humidity:
name: "Study humidity"
update_interval: 20s
Hello, My DHT sensor works. I found that I had to specify the model of the sensor in order for it to work. See below. Hopefully this will help.
sensor: platform: dht pin: D4 model: AM2302 temperature: name: "Study temp" humidity: name: "Study humidity" update_interval: 20s
CheongKoo, Thanks for your reply and I'm glad your having success, unfortunately I've already tried the solution that worked for you (per the attempted resolutions section of my initial post) with no luck.
Nonetheless, I've since moved to my own custom Arduino code with reporting of temperatures using MQTT and have been running with complete success with that for the past few months so I'm happy with this matter being closed. If anyone else has the same issue and wants to give my solution a go, I'm happy to share the code.
Thanks all, William
name: Bug report about: Create a report to help ESPHome improve
Operating environment/Installation (Hass.io/Docker/pip/etc.):
Windows 10 running ESPHome 1.13.6 Macbook Air running ESPHome 1.13.6
ESP (ESP32/ESP8266, Board/Sonoff):
ESP8266 (ESP01_1M) ESP8266 (Sparkfun Thing Dev)
Affected component:
https://esphome.io/components/sensor/dht.html
Description of problem:
Problem:
Regardless of what I try, I continuously am only able to get the:
error. I have tried every fix I can find online for this to no avail.
Problem-relevant YAML-configuration entries:
Logs (if applicable):
Additional information and things you've tried:
Hardware Link:
The exact sensor board and ESP I have been using are linked here:
https://www.ebay.com/itm/AM2302-DHT22-ESP8266-ESP-01-01S-Temperature-Humidity-Sensor-Wifi-Wireless-Module/192879041070?ssPageName=STRK%3AMEBIDX%3AIT&var=493026967410&_trksid=p2060353.m2749.l2649
Similar Cases:
Seems oddly similar to the second person listed here, however it doesn't seem they ever found a solution. If so, they didn't post it:
https://community.home-assistant.io/t/debug-esphome-sensors/134688
Attempted Resolutions:
The most interesting part of it all though, is that after I upload the following bog-standard Arduino code to the EXACT same device, it spits out the temperature and humidity levels to the console window without a single problem in the world. The only issue seems to be when it's running the code compiled up for it by ESPHome.
Arduino code that seems to work fine, printing to the console.
Apologies for the information overload, I figure if there's any chance of solving this, it's with all the info I can provide, I'm happy to test anything out that you guys suggest, post any code, anything. If I sound desperate, it's cause I am. I've been at this for what feels like forever.
Thank you in advance, William