DHT22 - switched sensor types?
-
Hi,
i am trying to set up a DHT22 node. This is my first step with mysensors ever. After figuring out some hardware issues, all connection is working, at least for a distance of around 1 meters.
However, i'd like to ask how big can a temperature offset of a DHT22 sensor be? I have a room temperature of around 22°C, however, this sensor shows around 28°C - and a humiditiy of 23%. So, either the measurement tolerance is quite big, or i have somehow switched both readings.
This is the code i have flashed on the node: https://pastebin.com/E2XWu3F3
And this is how it appears in Home Assistant: https://pastebin.com/rLWn91wsIs my code correct? I think i have some weird errors, e.g. only increasing temperature is registered, when decreasing temperature, the value isn't decreasing as well.
-
Hi,
i am trying to set up a DHT22 node. This is my first step with mysensors ever. After figuring out some hardware issues, all connection is working, at least for a distance of around 1 meters.
However, i'd like to ask how big can a temperature offset of a DHT22 sensor be? I have a room temperature of around 22°C, however, this sensor shows around 28°C - and a humiditiy of 23%. So, either the measurement tolerance is quite big, or i have somehow switched both readings.
This is the code i have flashed on the node: https://pastebin.com/E2XWu3F3
And this is how it appears in Home Assistant: https://pastebin.com/rLWn91wsIs my code correct? I think i have some weird errors, e.g. only increasing temperature is registered, when decreasing temperature, the value isn't decreasing as well.
@simonszu Looks like you have the temp and humidity swapped around in the send message part
here is a direct copy of your sketch. you are sending the temperature in the humidity message and humidity in the temp message
send(msgHum.set(temperature, 1)); // this should be humidity #ifdef My_DEBUG Serial.print("T: ") Serial.println(temperature); #endif send(msgTemp.set(humidity, 1)); // this should be temperature
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login