Jump to content

Programs "run at startup"


jkraus

Recommended Posts

Posted

OK, I visited this topic many years ago, but revisiting it to make sure I understand.  I think this means that on power cycle the Polisy will check the enabled "run at startup" programs to evaluate the IF condition and run as appropriate the then command.  Do I have it right?  why not always enable programs at start up?

Posted

Running some programs at startup is a way to immediately set certain things to desired initial defaults, where there are not necessarily triggering events that occur. For example you might want to test if your alarm system is armed or disarmed, assume that your sprinklers are off, etc. Regular programs usually run only when certain triggering events happen.

Posted
1 hour ago, jkraus said:

I think this means that on power cycle the Polisy will check the enabled "run at startup" programs to evaluate the IF condition and run as appropriate the then command.

In theory I think this is accurate. 

1 hour ago, jkraus said:

why not always enable programs at start up?

It seems in current IoX it would be enabled (at least evaluated) at startup, but might not rely on having that option selected (on) in the summary window. At least based on the old (trusty?) ISY cookbook it includes this information for reference: 

Quote

9.5.5   Boot/Startup Sequence and Program Execution Order 
When the ISY boots, the True/False state of all schedule programs is determined, and any
schedules which require catching up, are set to run following initialization. If Catch up
schedules at Restart is enabled, schedules are set to run from the beginning of the day;
otherwise schedules are set to run only for the specified Missed Schedule Grace Period.
Note that prior to firmware 2.6.4, the Missed Schedule Grace Period applied only to Time is
schedules, not From/To or From/For schedules; as of firmware 2.6.4 it applies to all
schedules. 

Next, ISY queries all devices and determines their status. During this process, the
True/False state is determined for programs and folders which have conditions, and any
programs which require running are set to run following initialization. Folders with no
conditions are set to True so as not to prevent programs within them from running, since
without conditions a folder's state will never be changed. Programs which have no
conditions are initialized to False, just as a variable would be, since programs, which are
often used as flags, may have their state changed by other programs or directly from the
Program Summary tab, even though they have no conditions. 

Finally, programs which are set to Run at Startup are set to run following initialization.
Note that prior to firmware 2.6.6, a program which was set to Run at Startup would 
actually execute at startup only if its Enabled box was checked; as of firmware 2.6.6 it will
run at startup when set to do so, regardless of the state of the Enabled box. 

At this point initialization is complete, and event processing begins. All programs which
were set during initialization to run, whether schedules, triggers, or Run at Startup, now
begin running, and programs initiated by new events will also begin running. In all cases,
the order in which the programs run is determined by ISY's internal algorithms, and is not
user predictable; specifically, schedules do not necessarily run in chronological order. 

(Source: ISY Cookbook page 183 - Section 9.5.5 - bold added for attention)

It seems that it's more as @Guy Lavoie points out to set a default level or a variable setting. I think some have created a program for a timer since last reboot or something that if the device restarts in the middle of the day their timer needs to be adjusted to be correct for other programs to trigger. 

But I see it more as a way to trigger a single time occurrence that might have happened while the device was off. I don't have any specific examples for my system as most of my "timed" events are set as "from/to" times (i.e. sunset to sunrise). If the device restarts those programs do get evaluated and run based on the IF portion. 

 

Posted

Run at startup is a good idea for any program that has repeats or waits in them to get them going again after a reboot.

Of note, a blank if clause will evaluate as true during "run at startup".

Also, I have it send me an email if the unit reboots, again, a blank if clause so it only triggers on a reboot.

  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

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

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.5k
    • Total Posts
      375k
×
×
  • Create New...