Problem: I find that after a visit to the bathroom I often forget to either: a) turn off the bathroom light and fan after I have left the bathroom, or, more frequently, remember to turn off the light but understandably leave the fan running and then ultimately walk by hours later with the fan STILL running - reminding me of my forgetfulness, wasting electricity.
Ideal Operating Solution: When I turn on the fan, I would like to leave it run for one of two periods.... first, for a maximum amount of time, no matter what - for say 30 minutes. Secondly, if I have quickly exited and remembered (rare) to turn off the light, have it run for only like, maybe 15 minutes. It should take into account the notion that I might be IN the bathroom, taking a shower and not do anything to disturb that tranquil moment either - well, much. At least not leave me in the dark!
I devised a set of macros to not only do that, but to also make sure I don't forget the light on too... and it has the added benefit of making sure that someone does not dally crazily long in the shower. Here is is:
AHP Ver. 3.236
O/S Vista
Bathroom fan/light control macro
Modules: F1 Bathroom Fan X-10 Wall transmitter
F2 Bathroom light X-10 Wall transmitter
Both the light and fan will need an in line module - Appliance for the fan and light for the light.
Macros: Light on Flag set - Triggers on F2 ON and sets flag 10
Light off Flag set - Triggers on F2 OFF and clears flag 10
Bath fan timer - starts when the fan (F1) is turned on
Bath fan timer 2 - if Light ON - picks up and acts one way if the bathroom light is ON
Bath fan timer 2 - if Light OFF - picks up and acts one way when the bathroom light is OFF
Macro contents: Flag Set on Light ON
Triggers on F2 ON - (no conditions)
Sets Flag 10
Stores in interface
Flag clear on Light OFF
Triggers on F2 OFF - (no conditions)
Clears Flag 10
Stores in interface
Bathroom fan timer Macro 1
Triggers on F1 (bath fan) ON (no conditions)
Delays 5 minutes
Turns Bath Timer 2 - lights ON Module (Macro) F3 ON
Delays 10 seconds
Turns Bath Fan Timer 2 if Light is OFF Module (Macro) F4 ON
Stores in interface
Bathroom Fan Timer 2 - if Light is OFF
Triggers on F3 (sent by the Bath Fan macro)
Conditions - Receive F3 ON, and Flag status of Flag 10 is CLEAR
Delay 10 minutes
Turn Bath Fan off (F1 OFF)
Clear Flag 10 [insurance]
Stores in interface
Bathroom Fan Timer 2 - if Light is ON
Triggers on F4 (sent by Bath Fan Macro)
Conditions - Receive F4 ON, and flag status of flag 10 is SET
Delay 15 minutes
Bath Light F2 OFF
Delay 3 seconds
Bath Light F2 ON [Note: this is the 10 minute warning]
Delay 10 minutes
Bathroom light F2 OFF
Bathroom Fan F1 OFF
Clear Flag 10 [I know this is technically redundant, but a safety measure]
Stores in interface
Operation: If I walk into the bathroom, and turn on the light and fan, the Macros will set a flag (flag 10 - light ON) and start the Bath Fan Macro. Nothing will happen for 15 minutes. If before that I have departed the bathroom and turned off the light but also left the fan on, the "Bath Fan Timer Macro 2 - Light off", will have already seen that the light is off (flag 10 will have been cleared by my action in turning OFF the light) and the macro will thusly turn off the fan at roughly the 15 minute mark. Mission accomplished.
IF the light is still on however, the above macro will not run due to the "light off" (flag 10 clear) condition not having been satisfied.
Then, another path is taken. 20 Minutes after I turned the fan and light on, if the light is still on,the "Bath Fan Macro -if Light ON" will become proactive. This takes into account that I might yet be IN the bathroom, and so it does not leave me in the dark, but gives me a 10 minute warning to "get going". It does so by turning the light quickly on and off - once. This will serve as a warning that in 10 minutes the fan and light will be turned off. This a reminder that I need to GET out of the shower! And, as warned, in 10 minutes, the light and fan will be turned off (and the flag 10 cleared) at roughly the 30 minute mark. Mission accomplished.
Seems like a lot of work for something so simple, but I hope to pay for it in energy saved.