Jump to content

Using Last Run Time instead of Wait


ih574

Recommended Posts

Posted

I have a bunch of programs that check the status of various devices and, depending on status, make voice announcements about their state. I want these programs to run only during specified time frames, which I have in the IF statement. I also use "Last Run Time" parameters instead of "Wait" statements so that I don't have all these programs running in the background for several hours.

 

If
       From     9:00:00PM
       For      2 hours 
   And Status  'GR - GrgBay1 - Sensor' is On
   And Time is Last Run Time for 'Check - Garage Bay1' + 10 minutes

Then
       Resource 'Voice-Announce-CheckBay1'

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


 

Use of the "Last Run Time" causes the program IF to run every ten minutes, even when the time is outside the 9:00pm to 11:00pm window. I see this in the Program Summary tab where these programs' Next Scheduled Run time is always in the next few minutes. I would prefer if these programs were only executed in the time window specified. I recognize there is no issue with these running every 10 minutes, cause they will always fail the IF until the time window is true. However, I would like to have these programs active only during the specified time window to keep the history stats consistent (and to soothe my OCD characteristics). I'd also like to do this without Wait statements.

 

Any ideas about how I can force these programs to run only within the specified windows while not using Waits? It seems like Last Run Time trumps the other schedule parameters. I expect I could put them in a folder that was only active during the window, except that I have different time frames for the checks.

 

r-

 

Tom C.

Posted

It is not a matter of one condition that triggers a Program trumping another condition. Each condition that can trigger a Program causes the Program to Run. The evaluation of the combined If section determines whether the Then or Else clause executes but not if the Program is triggered to begin with.

 

In the example posted

when the From time occurs the Program is triggered

when the To time occurs the Program is triggered

when the device Status changes the Program is triggered

when the Time occurs the Program is triggered

 

Each time the Program is triggered it runs one of the clauses. The evaluation of the If as True or False determines which clause runs but the Program will run one or the other when triggered.

 

As noted a Folder Condition will stop a Program from being triggered.

Posted

You can put it in a folder that enables from 9pm for 2 hours as you had mentioned.

 

You could also split it into two programs. The first program basically says

 

If

time is from 9pm for 2hours

then

enable program with the other stuff

else

disable program with the other stuff

 

But having the program trigger every 10 minutes and run false isn't a problem for ISY.

Posted

Ok. I think I get it. Time based conditions are deterministic and device status/control are events. Any time based "If" condition will show up in the program summary as a "next scheduled run." For some reason, I was mistakenly thinking it would act like a nested condition. Thanks.

 

r-

 

Tom C.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.4k
×
×
  • Create New...