Jump to content

Mysteries of Time Triggered programs


randyth

Recommended Posts

Posted

A few simple questions regarding the deep mysteries time-triggered (Scheduled) programs...

 

Let's say I have a program with no "Conditions," just a scheduled time of "If Time is 9:00:00AM"

 

1) Is the Else block in such a program irrelevant (would never execute)?

2) If I am silly enough to have a "Wait 30 minutes" as the first command in my Then block, would commands following the Wait execute despite the fact that the program's time condition is no longer true (it's no longer 9AM) at the end of the 30 minute wait? In other words, does the completion of a Wait/Repeat command/block only cause non-time Conditions to be reevaluated?

3) Does using a time period (From [time] for [duration] or From [time] to [time]) complicate this at all?

3) What is infinity minus 1?

 

I assume (and my simple tests appear to confirm) the answers to #1 and #2 is yes, but I thought I should ask anyway.

 

Thanks,

-Randy

Posted

Let's say I have a program with no "Conditions," just a scheduled time of "If Time is 9:00:00AM"

 

1) Is the Else block in such a program irrelevant (would never execute)?

 

The Else clause will not execute based on If evaluation which is always True and evaluated only once at the specific time.

 

2) If I am silly enough to have a "Wait 30 minutes" as the first command in my Then block, would commands following the Wait execute despite the fact that the program's time condition is no longer true (it's no longer 9AM) at the end of the 30 minute wait? In other words, does the completion of a Wait/Repeat command/block only cause non-time Conditions to be reevaluated?

 

Statements after the Wait 30 minutes will execute, because of number 1. There is no False evauation of a specific time.

 

3) Does using a time period (From [time] for [duration] or From [time] to [time]) complicate this at all?

 

I don't think it complicates it but it certainly changes things. When the To time (or ending time with duration) arrives the Program is triggered. The If evaluates to False as the time (albeit mill-seconds) has past so the If is False driving the Else clause. If there was a Wait in the Then clause and the Wait time had not expired before the To time or ending time arrives the If is reevaluated to False and the statements after the Wait would not be executed.

 

3) What is infinity minus 1?

 

Context?

Posted

...

3) What is infinity minus 1?

 

Context?

Amusing philosophical question without context. Please ignore. (Ha! I just noticed I did not properly enumerate that final question. Appropriate, I suppose, since infinity is not a number.) :)

 

Anyhow, I have an actual followup question that is somewhat related to my time-triggered questions: Would the [calm down] action in the following example execute...

 

If
 Control 'panic button' is switched On

Then
 Wait 30 minutes
 [calm down]

 

...even though, like a clock reaching 9AM, the pressing of a controller's On button represents a moment in time and so the triggering event (the 'panic button' being pressed) might not actively be "true" after a 30-minute Wait?

 

Thanks again,

-Randy

Posted

"Would the [calm down] action in the following example execute...'"

 

Yes. There is no False to the "If Control 'panic button' is switched On". The Program triggers when an On command is received from 'panic button'.

Posted

Wait! I have another "wait" question.

 

I am programming my thermostat. The program sets the temperature at 5:30 when I get up. Then I have a "wait 2 hours", and the thermostat resets while after I have left for work. Then "wait 8 hours" until it's time to return from work. If I manually adjust the thermostat or adjust it through the ISY, does this upset the wait command? Does it reset the wait time to a new 8 hours?

 

Is this the best way to program the thermostat? Or do I have to write a program for each adjustment time? (four adjustments a day = four times as many programs). What does the "Set Schedule" button do on the thermostat status page in the ISY? When I click on it, I get "Request failed".

Posted

If the only thing in the If section is one specific time the Waits will not be interrupted. If there are checks for temperature along with a specific time the Program will trigger each time the temp changes. The If would be False at that point and drive the Else clause. The Waits in the Then would not complete nor the statements after the Wait.

 

Best to post the Program so the actual If can be seen.

Posted

In the area where I live power outages lasting a second or two is common in the summer when electricity usage soars. I therefore always make my programs with the possibility of a power outage in mind & I try to make my programs "power outage proof". So I just wanted to point out, that if power outages is an issue for you, that program with a wait in it would get interrupted in a power outage & will not continue further until the next day at 5:30. Making the program run at startup is also not going to help since you are using a specific time & not a "from to" time.

 

Sent from my SPH-D710 using Tapatalk 2

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
      37k
    • Total Posts
      371.5k
×
×
  • Create New...