Rule Machine Noob. I've got a a simple rule running that turns on the shower extractor if the humidity goes above a certain level and turns it off after a set time. The rule only allows operation between 06:30 and 22:00 as I don't want the noisy fan running when people could be asleep. All works well.
I'm now wanting to step up a notch and start to learn Rule Machine. It's often quicker to just open the window to clear the humid air and I don't want the routine to try and dehumidify the whole world if the outside humidity is above the trigger point. I'm going to be fitting a contact sensor onto the bathroom window.
Between the hours of 06:30 and 22:00
When the humidity reaches the trigger value AND the window is closed I want the fan to turn on.
When the humidity reaches the trigger value AND the window is already open I don't want the fan to turn on.
If the fan has been triggered as the himidity is above the set level and then the window is opened, I want the fan to turn off.
Between the hours of 22:01 to 06:29
No action if the window is opened or closed
No action if the humidity rises above or falls below a set level.
I've tried a few ways and am getting frustrated with my (lack of) progress. Can anyone point me in the right direction as to how to set this out please?
Thanks, Humid Shower Guy.
You're off to a good start, especially by knowing precisely what you want done, when you (don't) need it, and when things ought to stop. Even better news is that this can be accomplished straightforwardly using two simple RM rules, with no extra rule needed for the 10pm to 6:30am time frame.
The primary rule, shown above, takes into account that you want the fan to be turned on when humidity becomes high (Trigger), only during certain hours (Req. Exp.), but not when the window is already open (Trig. Cond.), and remain on (Delayed Action) for a set interval (15 min.), then turn off.
I would suggest then making a separate rule to turn the fan off whenever the window is opened:
Trigger = Window Contact -> Open
Action = Shower Extractor -> Off
(NOTE: None of this accounts for someone manually turning on the Shower Extractor (fan). For that, I'd propose another simple rule that turns off the fan after 15 minutes of runtime. If you create such an auxiliary rule, you can remove the Delayed Action in the primary one. Likewise, if someone manually turns off the Shower Extractor, no harm done; though the main rule may fire again if humidity once again increases beyond the target level.)
Does this help guide you in the right direction? There are quite a few ways to skin this cat, of course, but by keeping your rules orderly and efficient, you'll avoid the maintenance challenges that come with complexity.
Thanks so much, that's very helpful and shown me a route to explore. I was trying to get it all into one App, as you say, there's many ways of doing things.
I'll try setting it up tomorrow when I'm not "all screened out".
Cheers again.
1 Like