How do I turn off a bathroom exhaust fan when humidity is below a threshold

Tried using the “Smart Humidity Fan” solution - but looks like I will need to replace my DHT22 its stuck at 97.1% humidity - goes from -1% to 97.1% and stays there until the bathroom is dry.

I rolled my own using ESP-8266 and ST_Anything, its pretty snappy turning on, then I have min delay on turning off. I have been using the X-10 sensors they are not bad batteries last a couple of months, longer on less used ones, but their timing can be unpredictible, 4 of them are quite acceptable, however 2 are about 2.5 slower than they should be

I used webcore to make a piston: If the fan is on, and the light is changed to off, wait 45 minutes then turn the fan off. This allows the fan to run for a limited time after someone leaves the bathroom after a shower, or for some “other” reason that does not involve humidity.


I pretty much did something similar to this. My bathroom lights turn on with motion and turn off after 5 minutes of no motion. My fans are on a timer to turn off I think 20 minutes after the light goes off whether its turned of manually (which we usually do) or if its left to time out from motion (which my 8 year old mostly does). Has worked like a charm for 2 years now.


That app I posted above actually uses humidity levels from the Aeon Multisensor 6 I have installed in there. If it rises too fast, indicating a hot shower, then the fan turns on. It turns off when the humidity goes back down. It is pretty hands off as far as I am concerned. It has been working great since January when I installed the sensor.

1 Like

This sounds really cool but only solves part of the problem… I have not been able to find a Z-Wave or Zigbee bad smell sensor…:nauseated_face:


Maybe a sensor for methane gas? Haha.:grinning:


Thanks - that app worked really well as a starting point for me. It didn’t have motion sensor trigger so I added it. I have also developed a fault in my DHT22 sensor it goes from -1 to 97.1 and back - at around 60% humidity level with no stops in between. Which actually works out well for me because it acts like an automatic hot bath detector. :slight_smile: That app and ST_Anything are a great combo

1 Like

Does anyone use this automation? It looks like it’s supposed to monitor the switch state and if turned on manually, it is supposed to turn off the fan after X minutes. Mine doesn’t seem to be doing that correctly. Is there something I’m missing? The switch is a GE Zwave+ switch.

The manual on/off was something that was someone picky (flaky) on what device it would work on. There was a parameter for programmatically or manually but I believe ST has removed this from their code. It still works on limited devices such as the GE Switches but not reliable on Dimmers (12xxx series). Not sure about the ZWave+ 14xxx series.

If you haven’t installed webCoRE yet, I strongly suggest that you do. It is a very powerful rule engine that you can create your own Piston (rules, works like custom apps).

That’s odd. It doesn’t seem to be working with my GE switch. I’m using the 12722 switch. If I understand your post correctly, ST removed the ability for the device to monitor manual state changes for devices and then take action based on that change?

I installed webCoRe this morning, but I feel like a caveman confronted by an iPhone when just trying to control a few lights. I’m not sure where I would start to mimic the functionality of the program above. I posted on the webCoRe forum this morning for some help and am awaiting a response.

I’m not sure my humidity sensor is working out too well, since it only updates every 8 minutes. I have the Aeotec Smart Sensor.

I have found that the Zooz Multi 4-in-1 works GREAT for humidity sensing. My fan usually turns on within 3 minutes of the humidity rising over the set threshold. Tagging @TheSmartestHouse

WebCoRE is best configured in a desktop browser or larger screen. The phone works but its just easier, for me at least, to do it on a desktop. Easier to copy and paste, move sections, select devices, etc.

The logic of webCoRE follows the “If-This-Than-That” concept. Well, at least at its bare minimum. It can do alot more! Just think your automation out and use the “If” blocks for conditions and/or triggers. Use the “Action” block for what you want to happen. One HUGE rule of thumb is to only have 1 “Trigger” per block. If you add a trigger to any blocks, then you will need at least 1 trigger in all blocks. If you don’t use any triggers at all then the conditions will act as triggers once all conditions are met.

Think with Triggers, something has to happen. Think with conditions, the Piston is monitoring each condition so when they all become true then it executes the Action…

Light “Changes” to on is a Trigger. Light “Is” on is a condition. Remember, only 1 trigger per block unless separated by “Or”.

The below Piston can be imported using the import code. I built the Piston in less than 2 minutes. It will turn on the fan if humidity rises above a set value. It will turn off the fan after 10 minutes if it was turned on manually but only if the humidity is below a set value. Finally, it will turn off the fan no matter what after 20 minutes. Each section runs on its on because I chose “asynchonous” by clicking the “With” and then the gear to configure how the Action sections executes. Once you get a handle on it, you will see how simple webCoRE is.

1 Like

Thanks for sharing your set-up @rontalley! Glad to hear the sensor is working well for you!

Thanks for the help. I’m actually getting a list together of things to buy now that I seem to have a reliable controller. I moved over from the Zipato and am learning that it was an absolute piece of junk. There seems to be some quirks with the ST and wireless door sensors, but I’m trying to work that out now. Either way, ST seems much more reliable and has motivated me to automate more stuff!

I’ll pick up one of their sensors. Is it this one? I had no idea that TheSmartestHouse was Zooz. Zooz support is bar none the best support I’ve ever encountered in the world of technology.


Yep that’s the one. Depending on where you install it, you can opt to hard-wire it with a little bit of soldering. I’ve done this to as many sensors as I could. Can use the same power adapter for a bunch of these sensors as they hardly take any juice. Will save money and time changing batteries!

Does that run up into your attic? I don’t have any easy way to get wires to where the sensors would go. Might just have to pony up for the batteries.

Hopefully I get a little use out of them before needing batteries.

The new version uses a single CR123A battery so it will last much longer on it than on the 2 AAA batteries from the previous version. You should get around a year of battery life with average use.

1 Like

Yep, goes up to the attic where I plugged the power adapter in a socket that was up there. That same power adapter has about 12 sensors on it.

I still have a bunch of sensors with batteries that I am constantly changing. Wish I could hard wire them all but if they last for at least 9 months then I am ok with that.

1 Like

Holy cow, that’s a lot of battery powered sensors! Sounds like you might be just the person to ask about them. Do you have a sensor of choice for different things (motion, doors, etc?).

I’m also having issues wrapping my head around the wireless sensors. Every set of instructions I’ve read, tells you to pair the device with the hub when you’re a few feet away. If that’s the case and you move the sensor to its final location, will it get it’s routes updated? Basically, how will it ever know about the rest of the mesh network, if it doesn’t know its neighbors?

I know you can do a network repair, but my understanding is that wireless sensors don’t wake up for the repair.

Perhaps I’m getting off track and should open a new thread?

I can attest to this. I installed a Zooz 4 in 1 in my bathroom over a month ago to measure humidity and control the bathroom fan. It has the CR123A battery. As of this date the battery level still reads 100%! The humidity control works great. I am using it with a DTH from @krlaframboise.

I am using a Webcore piston similar to the one posted by @rontalley above. The current settings that seem to work now (in San Antonio Tx) are… turn on fan upon a rise in relative humidity above 55%. Turn off fan upon a drop in relative humidity below 54%. Turn off fan if fan stays on for 30 minutes for any reason. I may have to adjust the setpoints during the winter months. We will see.

1 Like

I use that automation.