Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASAIR DHT11 sensor type, wrong temperature values below 0C #199

Open
schayg opened this issue Feb 7, 2023 · 0 comments
Open

ASAIR DHT11 sensor type, wrong temperature values below 0C #199

schayg opened this issue Feb 7, 2023 · 0 comments

Comments

@schayg
Copy link

schayg commented Feb 7, 2023

The current DHT11 section of the DHT code -- to my understanding -- handles negative temperatures strangely:
it FIRST transforms the integral part into negative by subtracting from -1, and THEN simply adds the decimals.
Not sure this is how it should be, as the original DHT11 sensor is not certified for negative temperatures.

However, the ASAIR made DHT11, which is now the dominant version on the market, handles the negative values exactly the same way as the DHT12, i.e. the decimal part has the highest bit set to 1 (value & 0x80)=0x80 but no other transforms.

maybe a section could be added to the code, like a new type of DHT11 to accommodate this.
The current code with the ASAIR DHT11 reads wrong numbers below 0C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant