Trying esphome and esp8266 stuff for the first time. It’s amazingly easy to get things running.
But…
I have a problem. I have a NodeMCU, a AM2302 temp & humidity sensor, and a soil moisture sensor. The device comes up nicely, joins the internet, OTA works, the soil moisture meter is on a ADC and works very nicely all the time.
When the T&H sensor is working it is quite accurate and fast. When it fails, it reports 1C for temperature and 2% for humidity. Always exactly those numbers.
It always fails after a flash, whether OTA or via USB.
It either always, or almost always works after a power cycle. For a while, anywhere from minutes to hours.
It never goes from failed to working other than a power cycle.
I have tried two different nodeMCU chips, two different AM2302 chips, three different power supplies. I have checked (only with a meter no scope) all voltages at all points. I have tried the AM2302 without pullup (it shouldn’t need one), and a couple different ones. Tried different pings for the T&H digital signal. Nothing changes – it works (or rather fails) exactly the same way each time.
Are there any options for trying to figure out what is happening? Turning on debugging did not show me anything informative. The logging messages are identical for failing or working mode (except the actual values), except that the overall devices mqtt status node says ‘offline’ occasionally when failing (it seems to flip back and forth).
Short of starting over with all new, and different, hardware is there any kind of debugging I can do?
Here’s the sensor definition by the way:
sensor:
- platform: dht
pin: D1
temperature:
name: "Test3 Temperature"
humidity:
name: "Test3 Humidity"
update_interval: 60s