DHT22 stuck on 99.9% Humidity

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

DHT22 stuck on 99.9% Humidity

#1 Post by sheppy » 20 Aug 2018, 03:04

I've a SOnOff 4Ch with a DHT22 wired to GPIO1 for detecting moisture from a Shower. I'm using mega-20180114 and I think the humidity sticks at 99.9% once it gets that high, whilst the temperature keeps updating. After 38 minutes I rebooted it and the Humidity started moving again.
Is this a known bug?
I would try a later version but thought I'd ask first as its a lot of work to uninstall this one for a reflash

whatsupskip
Normal user
Posts: 105
Joined: 28 Feb 2018, 07:40

Re: DHT22 stuck on 99.9% Humidity

#2 Post by whatsupskip » 03 Sep 2018, 07:22

If the sensor really is at 99.9% humidity then that could be causing problems in itself. 99.9% implies it is actually wet and that could mean short circuits or abnormal mode that is only cleared by a reboot.

I haven't used a DHT22 on such old firmware, but I would first look at preventing the sensor getting that damp.

sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Re: DHT22 stuck on 99.9% Humidity

#3 Post by sheppy » 03 Sep 2018, 07:43

It’s mounted above a shower, so it will get a lot of humidity :) I want it to operate a 2 speed ventilation fan. It doesn’t go directly to 99.9% though. Is there any known version of firmware that has a bug fix that could effect this? Updating is a lot of work with this location so I don’t want to update unless I know which version to install. Sadly OTA updates don’t work on this module or any of my other SOnOff’s

whatsupskip
Normal user
Posts: 105
Joined: 28 Feb 2018, 07:40

Re: DHT22 stuck on 99.9% Humidity

#4 Post by whatsupskip » 03 Sep 2018, 07:58

I am not aware of any bug fix for that. The DHT22 is a very basic (cheap) sensor, so that is why I suspect the problem is with the sensor.

If you can't easily relocate the sensor, an alternative might be to create a rule to reboot the device if the humidity is too high. That might not be an option of the ESP device is doing many other things.

sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Re: DHT22 stuck on 99.9% Humidity

#5 Post by sheppy » 03 Sep 2018, 08:06

I’ll experiment with a reboot, I don’t need any real accuracy with this sensor as long as whatever it says is repeatable. As the humidity lasts after the shower has ended I can safely reboot once the light has been turned out

whatsupskip
Normal user
Posts: 105
Joined: 28 Feb 2018, 07:40

Re: DHT22 stuck on 99.9% Humidity

#6 Post by whatsupskip » 03 Sep 2018, 08:12

I have a humidity sensor in the shower room. It is not located above the shower, it is actually close to the door. It is quite obvious when the humidity is too high in the room, except for the time when my wife placed a wet towel right next to the sensor.

sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Re: DHT22 stuck on 99.9% Humidity

#7 Post by sheppy » 03 Sep 2018, 08:23

That makes sense, it was a particularly insensitive old vent axia sensor mounted nearby that led me to move the replacement sensor nearer.

tykenicol
Normal user
Posts: 1
Joined: 19 Mar 2019, 09:38

Re: DHT22 stuck on 99.9% Humidity

#8 Post by tykenicol » 19 Mar 2019, 09:42

Dht22 get stuck on 99.99% because it get dirty. Was it in mentholated spirits.

sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Re: DHT22 stuck on 99.9% Humidity

#9 Post by sheppy » 19 Mar 2019, 09:45

It was a brand new sensor, I switched to Tasmota and it’s been working fine for 6 months :D

deon.dup
Normal user
Posts: 5
Joined: 08 Sep 2019, 08:58

Re: DHT22 stuck on 99.9% Humidity

#10 Post by deon.dup » 15 Dec 2019, 06:03

I have the same issue now, what is strange though Is that the sensor worked fine for quite a while. We however had a lot of rain, which the sensor measured pretty well, even have great graphs on Grafana. The sensor is mounted on my patio, hence no direct rain just outside temperatures and humidity. The rain has stopped now, but the sensor humidity remains at 98-99%, which is not correct.

I have tried the reboot routine, even shut down of Wemos D1 for a while. No luck! Is this a case of get rid of the sensor, and go more expensive like the Bosch BME280?

whatsupskip
Normal user
Posts: 105
Joined: 28 Feb 2018, 07:40

Re: DHT22 stuck on 99.9% Humidity

#11 Post by whatsupskip » 15 Dec 2019, 22:16

Is the temperature working accurately still?

The humidity part of many sensors seems to be the part most likely to fail.

I am not sure if the DHT22 is just generally a cheap sensor or there are cheap copies being sold in China, but I personally prefer the BME280. I think I have had one BME280 that was out by 0.5C, but the rest have been good. Now that error could be caused by the support components on the board it came on.

deon.dup
Normal user
Posts: 5
Joined: 08 Sep 2019, 08:58

Re: DHT22 stuck on 99.9% Humidity

#12 Post by deon.dup » 17 Dec 2019, 07:35

Yes the temperature is still fine. What is very interesting is that the humidity started coming down to about mid 50%. This morning the weather changed a bit, i.e. it is more overcast, and voila the humidity jumped back to 99.9% again! I move from a DHT11 getting lots of NaN's, to the slightly more expensive DHT22. My verdict both a complete waste of money. So now moving onto the much more expensive BME280.

TD-er
Core team member
Posts: 2777
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: DHT22 stuck on 99.9% Humidity

#13 Post by TD-er » 17 Dec 2019, 08:55

Just a heads up on the BME280.
It is a fine sensor and I am truly amazed by the consistency of the pressure sensor on all my sensors.

But as always there's a BUT.
The sensor itself is quite small, so it heats up rather quickly.
This means you have to make sure it is well isolated from the rest of the circuitry and also do not use thick wires to connect it to the main board as even those may transfer heat.
Also if it is really humid, the sensor may sometimes "flip" its address selectors so make sure you have those set firmly by not leaving them floating.

If the sensor heats up, the reported humidity is also off (as it should be), so I added a temp offset in the BME280 plugin, which also corrects the humidity accordingly.
The idea behind it is, if it has an offset, then it must be in an enclosure heated up by the ESP and/or power regulator, so the added heat is rather constant.
Thus you can subtract some fixed offset in temperature (within some range of course)

deon.dup
Normal user
Posts: 5
Joined: 08 Sep 2019, 08:58

Re: DHT22 stuck on 99.9% Humidity

#14 Post by deon.dup » 17 Dec 2019, 12:31

Thanks for the very good information. To test my setup against your warnings, perhaps if you could comment. I will use a Wemos D1 Mini, with about 4-5m of 4core cable to the BME280. So in other words it is not in the same location of the processor. What concerns me though, is what housing I should use? I guess the Bosch sensor itself need to be protected somewhat against the elements. Again, this will be mounted on my patio, so no direct sun or rain.

TD-er
Core team member
Posts: 2777
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: DHT22 stuck on 99.9% Humidity

#15 Post by TD-er » 18 Dec 2019, 09:22

deon.dup wrote:
17 Dec 2019, 12:31
Thanks for the very good information. To test my setup against your warnings, perhaps if you could comment. I will use a Wemos D1 Mini, with about 4-5m of 4core cable to the BME280. So in other words it is not in the same location of the processor. What concerns me though, is what housing I should use? I guess the Bosch sensor itself need to be protected somewhat against the elements. Again, this will be mounted on my patio, so no direct sun or rain.
That 4-5m wire is not going to work with I2C.

And if you place a cover over it so no rain will fall into the sensor, then it is just fine.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests