I’m posting this as an example of how the Program Logic Timer Switch (PLTS) twin timing intervals can be useful.
I have long been aggravated by the way my en-suite bathroom fan operates. As installed by the builder, the fan triggers whenever the bathroom light is switched on. After the light is turned off, the fan keeps running for a period set by its internal timer. The minimum setting is about three minutes - long enough to be annoying when the bathroom is used during the night. There is an isolator switch that disables the fan but, if I turn it off, I forget to turn it on again so then when I use the shower the bathroom gets all steamed-up. Even when the fan runs I have to leave the light switched on for at least 30 minutes after I use the shower to clear the room of water vapour. Then I discover I left it running all day. It’s just a pain!
In a previous house I triggered the bathroom fan whenever the shower pump ran. The current house uses a pressurized water system so has no shower pump. I could fit a flow sensor in the shower feed pipes but they are under the floor.
I needed a smarter way to control the fan. That sounds like a job for a PLTS!
So, I replaced the simple on/off light switch with a Fibaro FGS221 dual relay module behind a dual on/off switch plate. One relay controls the light and the other controls the fan. Each relay is controlled by its own switch and, of course, Z-Wave.
The PLTS is configured like this:
Input Triggers
LightOn: EnSuite Light is turned on
LightOff: EnSuite Light is turned off
FanOn: Ensuite Fan is turned on
FanOff: Ensuite Fan is tuned off
Conditions
Interval: 45:00
Interval2: 5:00
ResetState: Off
SwitchMode: Immediate Toggle/Delayed Reset
Condition Trigger Expressions
Reset: FanOff
Trigger:
Trigger2: LightOn and ((LightOn; Now > 03:00) or (LightOff; LightOn < 10))
Restart: LightOn and (LightOn; Now > 06:00)
Restart2:
On: FanOn
Off:
Actions
On: Switch EnSuite Fan On
Off: Switch EnSuite Fan Off
Here’s how it works now: The fan does not start unless the light is turned on for at least three minutes (3:00 to 3:59) and then it will start with a timer of 5 minutes (Interval2). If the light stays on for over six minutes, I’m probably in the shower so the timer is restarted for 45 minutes (Interval). When the light is turned off, the fan keeps running until the timer completes its countdown. I can also trigger the fan if I chose by turning the second wall switch on and it will run for 45 minutes and then turn off. If I turn the fan wall switch off (or on then off if it’s already off) the fan will stop immediately. The fan can also be triggered to run for 5 minutes by turning the light off then on again within 10 seconds.
It isn’t artificial intelligence but it’s considerably smarter than it was. ;D
Edit: Added trigger for 5 minutes by LightOff/LightOn sequence.