You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like the problem is with the number representation (encoding) in memory. Current code expects one thing, while the device returns something completely different when number is negative.
Sensor code has to
a) prefer s16 in initial conversion
b) check hardware temperature limits for the sake of sanity
c) detect sign-magnitude and swap bits for dht22s like yours in this block
Device
Sonoff POW R2
Version
ESPURNA 1.19.0 built 2025-02-18 20:05:14
Bug description
I get invalid data from DHT22 if temperature under 0 C.
404.6°C shows when temperature is -4.6°C.
What can be the problem, and how to fix it?
Steps to reproduce
No response
Build tools used
PlatformIO, VScode
Any relevant log output (when available)
Decoded stack trace (when available)
The text was updated successfully, but these errors were encountered: