Open Philippe12 opened 1 year ago
I thing that I find the problem. The gpio pilot function take more time than older version, and the Sonoff SI7021 timing is strick. For it I must to modify the code of esphome/components/dht/dht.cpp like this (line 86) :
if (this->model_ == DHT_MODEL_DHT11) {
delayMicroseconds(18000);
} else if (this->model_ == DHT_MODEL_SI7021) {
delayMicroseconds(360);
//this->pin_->digital_write(true);
//delayMicroseconds(40);
} else if (this->model_ == DHT_MODEL_DHT22_TYPE2) {
delayMicroseconds(2000);
} else if (this->model_ == DHT_MODEL_AM2302) {
delayMicroseconds(1000);
} else {
delayMicroseconds(800);
}
same way with 2022.12.0
I have the same issue on ESP32 with Sonoff Si7021 sensor. I get this in my logs, irrespective if I use the pull-up resistor or not:
[16:15:38][W][dht:169]: Requesting data from DHT failed!
[16:15:38][W][dht:060]: Invalid readings! Please check your wiring (pull-up resistor, pin number).
I upgraded ESPHome to v2022.12.1
- same issue there.
However, it does work fine on the Sonoff TH16 hardware (board: esp8285
) flashed with ESPHome v2022.12.0
.
I'm working on. But the timing look like triky.
The problem
I try to use for test the dev branch and I can't communication with DTH (sonoff SI7021).
Which version of ESPHome has the issue?
2023.1.0-dev
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2022.11.2
What platform are you using?
ESP32
Board
sonoff thr316d
Component causing the issue
DHT one wire
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
I can do some test.