I have an odd issue trying to use a DHT11 on ESPhome seting up a new Device (sonoff 4ch R2)
on boot it will reed the DHT11 the first time fine and report the Temp/humidity
but then all i can get is
Requesting data from DHT failed!
Invalid readings! Please check your wiring (pull-up resistor, pin number)
NaN
and i dont get why as im using the exact same code i use elsewhere thats worked fine for months
current Setup is
DHT11 connected to TX pin ( Same as other working Device, Sonoff Duel R2)
i have tried with and without the model specified and set model to auto_detect which it finds as DHT11
but every time i only get the first result then nothing
i also have a Dallas temp sensor (outside temp Garden ) that is working fine connected to RX (same as i do with the Dual)
originally just data pin / power connected on its own but also tried with 4k7 pullup resistor no differnace
just on test bed at min so short wires
every time i get the first reading fine then nothing / NaN
esphome:
name: bedroom2
platform: ESP8266
board: esp01_1m
wifi:
ssid: "WiFi SID"
password: "Pass"
manual_ip:
static_ip: 10.x.x.x
gateway: 10.x.x.x
subnet: 255.255.255.0
ap:
ssid: "BR2-HS"
password: "Pass"
captive_portal:
logger:
baud_rate: 0
api:
ota:
password: "Pass"
dallas:
- pin: RX
update_interval: 30s
sensor:
- platform: dht
pin: TX
model: DHT11
temperature:
name: "Bedroom2 Temperature"
id: BR2Temp
unit_of_measurement: "°C"
humidity:
name: "Bedroom2 Humidity"
unit_of_measurement: '%Humidity'
id: BR2Hum
update_interval: 30s
Logs
[17:16:26][D][dht:048]: Got Temperature=30.8°C Humidity=29.0%
[17:16:26][D][sensor:099]: 'Bedroom2 Temperature': Sending state 30.80000 °C with 1 decimals of accuracy
[17:16:26][D][sensor:099]: 'Bedroom2 Humidity': Sending state 29.00000 %Humidity with 0 decimals of accuracy
[17:16:27][D][dallas.sensor:153]: 'Outside Temp Garden': Got Temperature=24.5°C
[17:16:27][D][sensor:099]: 'Outside Temp Garden': Sending state 24.50000 °C with 1 decimals of accuracy
[17:16:37][D][sensor:099]: 'Bedroom2 WiFi signal': Sending state -63.00000 dB with 0 decimals of accuracy
[17:16:56][W][dht:162]: Requesting data from DHT failed!
[17:16:56][W][dht:060]: Invalid readings! Please check your wiring (pull-up resistor, pin number).
[17:16:56][D][sensor:099]: 'Bedroom2 Temperature': Sending state nan °C with 1 decimals of accuracy
[17:16:56][D][sensor:099]: 'Bedroom2 Humidity': Sending state nan %Humidity with 0 decimals of accuracy
[17:16:57][D][dallas.sensor:153]: 'Outside Temp Garden': Got Temperature=24.5°C
[17:16:57][D][sensor:099]: 'Outside Temp Garden': Sending state 24.50000 °C with 1 decimals of accuracy
[17:17:07][D][sensor:099]: 'Bedroom2 WiFi signal': Sending state -64.00000 dB with 0 decimals of accuracy
[17:17:19][D][sensor:099]: 'Bedroom2 UpTime': Sending state 78.73400 s with 0 decimals of accuracy