Jump to content

Can't Figure Out Trigger and Repeat


d529518

Recommended Posts

Can anyone explain why the below program fails to wait the 2 minutes as specified in the Repeat clause? It instead cycles the light on/off every 30 seconds - *never* waiting the requested 2 mins for the 'repeat' clause. I cannot understand what the ISY is doing. Shouldn't it immediately execute the Wait 30 Seconds, then turn lamp on(off), then wait another 2 mins to do the repeat?

 

(Note: below program is only for test purposes. I am only trying to figure out how to predict and control when the IF clause fires. So if it looks like it is performing a useless function, then, yes, that is true.)

 

If
       From     5:28:00PM
       For      15 minutes 
   And Status  'Living Room / Living Room Torchiere Lamp' is Off

Then
       Repeat Every  2 minutes 
          Wait  30 seconds
          Set 'Living Room / Living Room Torchiere Lamp' On

Else
          Wait  30 seconds
          Set 'Living Room / Living Room Torchiere Lamp' Off

 

It would be extremely helpful if someone could explain what is really going on in the ISY behind the 'IF'. For the life of me I cannot get my head around the actual events and conditions that trigger the evaluation of the IF clause. And this is preventing me from making effective programs.

Link to comment

oberkc is exactly right. The Then clause changes the Status of the device in the IF statement. Whenever a Repeat or Wait is encountered the If is reevaluated. Since the Status is now False the Else runs.

 

Two solutions. Change the If Status to If Control which will trigger the Program only when an On command is received from the device.

 

Or move the Then logic into a second Program. Have the Then of the first Program invoke the second Program. That way when the If of the first Program is reevaluated and the Else runs it will not affect the second Program.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...