Jump to content

Clarification on Wait in a Program


BriG

Recommended Posts

Posted

I am an ISY and Insteon newbie. I think I know the answer to this, but I want to confirm. (I could not find a definitive answer in my searches, because the terms got lots of hits.)

 

I want to setup several of my lights to turn off after 30 minutes. And, I want to reset the wait counter if someone turns the light off and then back on, so that second time on gets a full countdown timer. I had initially created the two programs-- one to do the countdown, and the other one to stop the countdown timer when the light is turned off.

 

However, based on my initial reading, I think that the 2nd reset program is superfluous. If the light is switched off, the condition changes which will trigger a a reevaluation of the If statement which will stop the wait timer. Is this correct?

 

PROGRAM Closet Light Timer

If
       Status  'Closet Lights' is On
Then
       Wait  30 minutes
       Set 'Closet Lights' Off
Else
  - No Actions - (To add one, press 'Action')

 

2nd program:

PROGRAM Closet Light Timer Reset

If
       Status  'Closet Lights' is Off

Then
       Stop Program 'Closet Light Timer'
Else
  - No Actions - (To add one, press 'Action')

Posted

The first Program is all that is needed. If the Status of 'Closet Lights' changes to Off while in the Wait the If is reevaluated as False which runs the Else clause and terminates the Program. The next time the 'Closet Lights' are turned On the Program is invoked again starting a fresh 30 minute Wait.

Posted

BriG-

 

Here is a thought, If you change your first program to:

 

If Control 'Closet Lights' is Switched On

 

It will work the same way BUT if you turn on the already on light, it will reset the countdown for another full 30.

 

-Xathros

Guest
This topic is now closed to further replies.

×
×
  • Create New...