Automating Bathroom Fan


1) Give a description of the problem
Fan is not turning off when it should

2) What is the expected behavior?
I have a piston that turns on the bathroom fan 5 minutes after the light in my shower is turned on. The fan should run for 15 minutes then turn off.

3) What is happening/not happening?
The fan is not turning off after 15 minutes. I can watch the Webcore dashboard and see the timer count down to 0, but the fan doesn’t actually turn off. Do I have the turn off command in the wrong place? If I remove the wait time to turn the fan on, it works just fine.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
I turned on logging, but I didn’t see anything from trying to run this piston.


Click on the WITH.
Go to the settings cog at the bottom of the screen. Click on the cog and change TCP to never.


That seems to have fixed it. I tested it at least twice and it worked. Thanks!


As this is a bathroom fan it truely is TCP IP

I crack myself up :laughing:


This would never work for my family… we often take it in turns to use the shower so 15 minutes from light on wouldn’t be enough on all days.

Before I had the humidity sensor (best way to trigger a fan btw) I used this:

light is on
wait 5 minutes
turn on fan
wait 10 minutes
turn off fan

This turns the fan on 5 minutes after the light turns on, and won’t turn the fan off until 10 minutes after the light is turned off.

A fairly typical fan overrun setup.


FWIW Here is my bathroom fan piston that works well. Samples 2 Xiaomi humidity sensors and turns fan on if under global var or comes on for 10 minutes on every #2. Wait, I can’t get that info from WebC0RE yet, Ha! :wink:


I can in my tennants house lol… they’ve got my old setup with a smart toilet seat (electronic bidet seat with various smart sensors and relays bodged in by myself)!!

Touch sensor tells ST someone is sitting.

Flow sensor on the water intake tells ST I’m washing (aka just had a #2)

I can also ask “Alexa, wash my ass” or “Alexa, massage my xxxxx”

And I can set the seat to start warming up 15 minutes before my alarm.

Life was good… I miss my smart home!!!



what humidity sensor do you use to make that kind of piston?



I like the Xiaomi sensors… dirt cheap and I find them very reliable… never skipped a beat!


does those sensor integrate with ST ?



Officially no… they are not even Zigbee certified and the pairing process is a PIA… you have to watch logs in the IDE, copy the device ID and add them manually.

It’s easy once you’ve done it the once though, and they cost a tiny fraction of the competition.



I wonder if you could use the Rooms Manager for this … occupied NO fan, engaged turn on Fan … hmmmm think I just got an idea to try


That’s hardly smart though… wouldn’t want a fan turning on just because I entered the room or turned the light on… that’s old school!

Humidity is the only smart method of controlling a fan… unless we delve into the realm of smart shower valves.


Thinking that if I am in there for more than X min I am either sitting on the throne or in the shower :wink:

Vacant -> Occupied -> Engaged … but yeah Humidity is the way to go … just dont have a spare sensor ATM for weekend insanity while potentially snowed in


Enjoy the snow!


I use the Xiaomi sensors and they work great. Have a shower and the fan is on within 15-20 seconds.


Could you post your piston. I have had one that’s been working great but its been temperamental.

In SmartThings it looked like this…

When I switched to Hubitat I had to modify the previous from (- -10) to (- +10) because it would just keep turning on for no reason.
Now I have the issue of it not turning off so I just added the wait 30 and turn off until I can figure out why its not working like it use to.


I know this site is all about webcore and these pistons are awesome, but I wanted to offer an alternative that works great for me. I use the Dewstop humidity sensor/fan controller. It’s not a connected or “smart” device, but does have an adjustable humidity sensor and adjustable timer. If the timer runs out and it still senses condensation to its setting, it will turn on and start the timer again.