Jump to content

Lookin for ideas.......


Zellarman

Recommended Posts

Posted

Well, first off, let me start by saying I'm guilty of trying to fix the un-broke. I had a program working to my satisfaction, and then only b/c I concerned myself with the 'what if' my ISY goes down (for any reason). So instead of using programs to control an exhaust fan, I put it in a scene controlled by a switch. Works fine, only I want it to stay on for a period of time after someone leaves the room, which was what the original programs did. Now I'm running a program that turns the fan on when the bathroom switch is shut off, waits a period of time then shuts the fan off. Only glitch is if someone returns to the bathroom within that period of time, the fan shuts off while the lights are still on. I was thinking of writing a secondary program to actually shut the fan off, and use the new BETA programming line run(if) in the main program to reference it. My problem would be to figure out how to make this secondary program run ONLY if directed by the main program, and not just wnen the if condition is met.

Posted

Zellerman,

 

If I understand correctly, your bathroom exhaust fan (presumably controlled by an InlineLinc, SwitchLinc, or something similar) is a responder in a scene of which the bathroom light switch is the controller. So when the light is switched on, the fan turns on; when the light is switched off, the fan turns off. You use a program that watches for the light switch being turned off, and then turns the fan back on, waits a period of time, and turns the fan off. The problem is to prevent the fan being turned off by the program, should the lights be turned back on.

 

Is all of that correct? If so, try this program:

 

If
       (
            Control 'Main Bath Lights' is switched Off
         Or Control 'Main Bath Lights' is switched Fast Off
       )
   And Control 'Main Bath Lights' is not switched On
   And Control 'Main Bath Lights' is not switched Fast On

Then
       Set 'Main Bath Fan' On
       Wait  10 minutes 
       Set 'Main Bath Fan' Off

Else
  - No Actions - (To add one, press 'Action')

Though it is not shown, the parenthesis are an And ( .. ) parenthesis, and the line Control 'Main Bath Lights' is switched Off is an Or condition. This program watches for the light switch being turned off or fast off, then turns the fan on, waits 10 minutes, and turns the fan off. If the light switch is turned on during that period, the program stops running the Then clause, so the fan does not get switched off. When the light is again switched off, the sequence begins fresh.

 

You don't have to watch for the Fast Off. If you leave that out, you no longer need the parenthesis:

 

If
       Control 'Main Bath Lights' is switched Off
   And Control 'Main Bath Lights' is not switched On
   And Control 'Main Bath Lights' is not switched Fast On

Then
       Set 'Main Bath Fan' On
       Wait  10 minutes 
       Set 'Main Bath Fan' Off

Else
  - No Actions - (To add one, press 'Action')

Though not shown, the line Control 'Main Bath Lights' is switched Off is now an And condition, rather than an Or condition. With this program, turning the light fast off will not turn the fan back on. This might be useful if you want to have that option.

Posted

Yes, that's the scenario exactly, and your suggestion worked perfectly! Thanks for the help Darrell. All I had to do was add

 

And (

Control 'BB Switch' is not switched On

Or Control 'BB Switch' is not switched Fast On

)

 

To the IF condition of the program controlling the exhaust fan

Guest
This topic is now closed to further replies.

×
×
  • Create New...