Controlling central exhaust fan


#1

1) Give a description of the problem
I currently have a centralized bathroom exhaust fan that is controlled by three different switches (not a three way configuration). The fan is a retrofit where I had three individual fans, but after remodel installed the centralized fan option. It exhausts two different showers and a water closet. I currently have three pistons controlling the fans successfully. They use variables to flag if the light switch in the area has been on longer than five minutes. The flag to start the sequence is when the light is turned off. The piston will then turn on the fan, wait 30 minutes, turn off the fan, then reset the variable. In isolation this works great, but given all locations are calling the same fan, if two zones are being used at the same time they do not take into consideration each other. I’d like to link the three programs to take into consideration each other and trigger the fan shut off based on the last call to initiate the 30 minutes. I think I can use a single variable to define status, but need to find a way to coordinate the timing as each zone can kill power to the fan. Currently the timing of dan shut off is managed with a WAIT command. The three programs each have their own and a single program can shut the fan off while other zones still need the fan.

**4) Post a Green Snapshot of the piston!
All three current pistons are very similar to the example below, but use a different variable to flag the fan status:



#2

Bump. Thoughts anyone?


#3

Bump. Anyone?


#4

It’s sloppy, I know, but you could probably make an additional piston something like this:

IF Fan changes to off
Then
    Wait 2 seconds
    IF any of the 3 globals are 1
    Then
        Turn on fan
    END IF
END IF

The 2 second wait is to (hopefully) give the other pistons time to update the globals…


By the way, no matter your approach, that is going to be your main hurdle.
Typically, global variables are not written until the very last line of code has executed.


#5

Oh wait… a better approach…

Right after the "Wait for 30 minutes, you can add this:

IF {@masterbath} and {@watercloset} = 0
Then
    Turn off fan
    Set variable {@fiveplus} = 0
ELSE
    Set variable {@fiveplus} = 0
END IF

#6

Will this work given the ‘wait’ command is set on one piston? Do I need to write all fan calls in a single piston and end with the:

IF {@masterbath} and {@watercloset} = 0
Then
Turn off fan
Set variable {@fiveplus} = 0
ELSE
Set variable {@fiveplus} = 0
END IF


#7

*shrugs*

I am going to step back and let someone else jump in…
(hopefully, they don’t make you wait 3 months)