inovermyhead Posted November 5, 2020 Posted November 5, 2020 How are time intervals in a program IF statement evaluated? I have a small heater in a bedroom closet that I want to turn on (plugged into a insteon on/off module) but only when I'm likely to be going into the closet, i.e. in the morning or late evening. I understand how to program a schedule, so my question is how does the ISY evaluate the IF statement? Only once when the time hits the "FROM" time? Every minute thereafter, until the "TO: time is reached + 1 and the IF statement turns false? I ask because it seems that if the IF statement is reevaluated frequently or every minute it could impose a significant burden on the ISY, while its busy trying to run other programs....
larryllix Posted November 5, 2020 Posted November 5, 2020 1 hour ago, inovermyhead said: How are time intervals in a program IF statement evaluated? I have a small heater in a bedroom closet that I want to turn on (plugged into a insteon on/off module) but only when I'm likely to be going into the closet, i.e. in the morning or late evening. I understand how to program a schedule, so my question is how does the ISY evaluate the IF statement? Only once when the time hits the "FROM" time? Every minute thereafter, until the "TO: time is reached + 1 and the IF statement turns false? I ask because it seems that if the IF statement is reevaluated frequently or every minute it could impose a significant burden on the ISY, while its busy trying to run other programs.... Not quite. ISY evaluates the From and To only twice at the two times. When another trigger in the If section triggers an evaluation of the If section, a From/To is evaluated and is True between the two times, and False outside of the From/To times. Also From will run Then, and To will run Else sections when used alone. A single time trigger is true only when it is being evaluated because it triggered the evaluation. This means two event triggers will never evaluate to True simultaneously. If ....At time 3:30 PM ....AND .... Switchlinc is switched On can never run Then, as both events can never be true at the same time. While one is being evaluated as a trigger the other condition is always False.
Recommended Posts