ESPHome DHT22 temperature stalling

I acquired two DHT22 sensor ‘shield cards’ along with two ESP01 modules from AliExpress. After significant recalibration using a filter, both seemed to work properly, at least while they were located inside near my weather station display which I used as a reference for calibration. Once I moved them to the greenhouse, I noticed that over 24 hours the temperature reading would stall resulting in a flat line on the history graph for several hours. It does not occur at any particular time or temperature although it is usually in the high 70s to 90 degree range. Once it recovers there is a step change to either a higher or lower temperature.
So far I have swapped the two ESP01 modules and finally the DHT22 modules. In both cases the anomaly persists. The swap of the DHT22 modules has so far resulted in the stall lasting a shorter period of time but still significantly long.
I will probably resort to a using the BME280 series sensor with a different ESP module.

To date I have added the RSSI sensor to this device which showed no correlation to the stall issue. Also added a reset button to force communication and determine if some part of the software was hanging. The initial comms happens after reset but no comms seem to happen after that, at least as far as I can discern using Wireshark to capture data.
While I initially observed this happening at various temperature readings the device is now stalling consistently at 86.9°F. The device is reporting in °C and conversion happens in HA. There is a -11.8° offset filter applied which means that the actual reported temperature is about 42.3°C, almost half of the documented upper range. This is just an excercise now as I am implementing a different solution using the AdaFruit SHT45 breakout module.

This could be a wireless connection issue?
Did you check the WiFi signal strength of the ESP in Home Assistant?

If you are referring to the ESP-01 DHT22/DHT11 modules, they suck. :slight_smile:

Don’t waste your time.

My experience with them: Sensors

Use a ESP board of your choice with a DHT22 sensor wired in, or use a BME/P 280 but be aware they have self heating issues.

I have not found a way within HA to determine the SSI value. In any case when the device goes offline, such as when I disconnect the USB power, the history graph shows a definite break in the data.

Update:

Added RSSI sensor to the thermometer device. There is no correlation with the temperature stall and the RSSI values.

Check this out: WiFi Signal Sensor
This is an example:

# - WiFi signal strength sensor
sensor:
  # Send WiFi signal strength to HA
  - platform: wifi_signal
    name: $friendly_name WiFi Strength
    update_interval: 60s
1 Like

Thanks, that works for monitoring the SSI. Unfortunately, there does not seem to be any correlation to this problem.

Have you graphed the RSSI over the same period?

Yes, while the temperature reporting is stalled, if I reset the device, there’s an immediate response on the network when it reboots.

This doesn’t answer the question. Have you graphed the RSSI over the same period? “Reset the device” can cover a lot of possible conditions that would stop the data. So, graph the RSSI. If it goes flat, then you are losing WiFi connection. If the RSSI fluctuates normally while the data stops, then you may have a bad sensor.

If you have replaced all the components and see similar results, then I would want to see a SCHEMATIC of your connections. Hand drawn with pencil and paper works fine, just please, no Fritzing junk- I won’t even look at those.

Also- how are you powering the ESP boards?

The RSSI never goes ‘flat’ and as to a bad sensor, I have two of these and they both have this problem.
Not going to pursue this any longer. I believe there is a SHT-45 waiting in my mailbox at this moment.
I suppose you get what you pay for most of the time.