jkraus Posted January 27, 2012 Posted January 27, 2012 Hi, I simply want to understand the concept because it seems to me that all programs "run at startup" I have a water heater recirculating pump that is scheduled to run between 8am and 10:30 pm. I rebooted the Isy the other day and it seems that this program was not then running. So it the point of "run at startup" to evaluate the "IF" statement immediately when the "run at startup" box is checked? Is so why would anyone NOT want to have their program run at start-up jut need a bit of education here Thx Joe
LeeG Posted January 27, 2012 Posted January 27, 2012 Programs can run at startup because of the "catch up" processing. This attempts to run Programs that may have missed the time based running because the ISY was down. The window of time for "catch up" processing time period is a Configuration option. Run At Startup insures that the Program If will be evaluated at every startup regardless of other factors. Whether the Then or Else clause executes is dependent on what the If is checking. An If section is optional so a Program with Run At Startup with a null If will always run the Then clause at ISY startup.
TJF1960 Posted January 27, 2012 Posted January 27, 2012 Hello Joe, Along with Lee's comments I might add that after a reboot the ISY sets programs either true or false based on their conditions, it doesn't actually run the programs so the Then and Else do not execute. In order for the program to run you either need some kind of trigger in the program that will make it run after reboot or set the program to Run at startup. If you have a lot of programs that require running after reboot you might consider using a trigger as it will probably be easier on you as well as the ISY. Tim
jkraus Posted January 27, 2012 Author Posted January 27, 2012 If you have a lot of programs that require running after reboot you might consider using a trigger as it will probably be easier on you as well as the ISY. not sure what you mean by trigger? Although, to make sure I understand the concept of run at upstart, wouldn't I check all programs to run at startup that are time dependent programs i.e have time as part of the if statement as I would want all those programs to be be in the correct mode depending on what time the reboot happened?
TJF1960 Posted January 27, 2012 Posted January 27, 2012 On programs that may be running or need to run after a reboot I have a program which is enabled to run at startup. That program is called Reboot Email. When the ISY reboots that program will run and send me an email. If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Set Program 'Reboot Email' To Run At Startup Wait 30 seconds Send Notification to 'To Me' Wait 30 seconds Run Program 'Reboot Email' (Else Path) Else - No Actions - (To add one, press 'Action') Then the program waits 30 seconds then turns false. I then insert that program into the conditions of any programs needing to evaluate and run such as: If Program 'Reboot Email' is False And From 3:20:00PM To 6:20:00PM (same day) Then Set 'Devices / Gar Main Lite' On Else - No Actions - (To add one, press 'Action') This program becomes the trigger when the ISY reboots and triggers the program into action if the schedule is correct. During normal daily operation the schedule is the trigger because the program is always false – unless the ISY is rebooting. As far as programs you want to run to catch up, you can check the “Catch up schedules at Restart†button. The thing you have to be careful about with that is there may be some programs you do not want to catch up on…like a coffee maker program or electric blanket schedule for the bed etc. so personally speaking for myself, that is why I unchecked “Catch up schedules at Restart†and started using the Reboot Email program as a trigger. Tim
paauto Posted March 5, 2012 Posted March 5, 2012 Not sure I'm following. Let's say I have a program called "Entry Lights" that turns on a set of exterior entry lights at sunset and off the following morning at sunrise. If the power goes off at 1 AM and then back on at 2 AM, what will happen to the program?
paauto Posted March 5, 2012 Posted March 5, 2012 Follow up question to my previous post. Do you actually set a program to "Run at Startup" in the Then statement or do you select it in the "Run at Startup" column in the Summary tab? Are both approaches the same?
LeeG Posted March 5, 2012 Posted March 5, 2012 To the first question, the Program will trigger at Sunrise. Setting the Enable Run At Startup option from the Summary page or using Enable Run At Startup from a Program accomplishes the same thing.
paauto Posted March 5, 2012 Posted March 5, 2012 Thanks Lee. On the first point, it will only trigger at Sunrise if the "run at startup" option is enable, correct?
paauto Posted March 18, 2012 Posted March 18, 2012 I'm still having issues with "Run at Startup". Our power went out today at 1 PM and came on at 1:45 PM. I have a "morning timer" program that initiates at 6 AM and turns on a few lights (sequentially over the course of a half hour) and then sends an off command in the Then statment at the end to turn them Off. They were off well before the power failed. I have the "Run at Startup" option on. When the power came on, the "morning timer" program began to execute the Then statment, turning on the lights. I also have an "evening timer" program that turns the outside lights on at dusk and off at dawn. "Run at Startup" is enabled and the lights did not come on when the power was restored. Lastly, I have a "Garage Status" program that in the IF statement queries the status of the sensor and, if open, sends me an e-mail. "Run at Startup" is not enabled. I received an e-mail at 1:45 when the power was restored. I can't seem to figure out why some programs are executing both with and without "Run at Startup" enabled?
LeeG Posted March 18, 2012 Posted March 18, 2012 Perhaps some examples will help. I defined three Programs, NONE have the Run At Startup Start1 If From Sunset To Sunrise (next day) Then Set 'ICON Relay 1' On Else - No Actions - (To add one, press 'Action') Start2 If Time is 6:00:00AM Then Set 'ICON Dimmer 1' On Else - No Actions - (To add one, press 'Action') Start 3 If Status 'IO Linc1-Sensor' is On Then Set 'SwitchLinc Dimmer' On Else - No Actions - (To add one, press 'Action') Rebooted the ISY in the afternoon, before Sunset. Start 1 was not run because the time range in the If condition has not arrived. Start2 and Start3 ran at Reboot. The Start2 Status was True as the trigger time had already occurred and the device controlled by Start2 should have been On and was turned On during the Reboot. Start3 ran with a Status of False because the I/O Linc Status was not On. This one can be tricky because the Query will return the actual state of the I/O Linc Sensor which could be opposite to what you think if Trigger Reverse option is being used. I turned On Run At Startup for all three Programs and Rebooted again. The only difference was Start1 was run because of the Run At Startup (even though Sunset had not arrived) but the Status was False because it was not in the time range. The Run At Startup does not override the If Conditions. Look at Run At Startup as an option on a Program that should run at Reboot and perform functions so the If section may not be useful. It can be, there are no absolutes. Look at the Programs | Summary tab. The Last Run Time and Status column will show if the Program Ran and what the Statue (true/false) was.
Brian H Posted March 18, 2012 Posted March 18, 2012 In the configuration tab is Catch Up Schedules at restart checked?
paauto Posted March 18, 2012 Posted March 18, 2012 Brian H - yes, "Catchup" was checked in the Configuration tab. Lee - I think I understand. Start2 ran becuase the IF condition had been met (ie True) whereas with Start2 the condition was not (ie False) Question - when you enable "Run at Startup", did the lights on Start1 come on? I wouldn't think so b/c the status was False. Agree on the garage sensor - they take a lot of fiddling and I did reverse things. I'll look closer at it. Thanks guys.
LeeG Posted March 19, 2012 Posted March 19, 2012 The device controlled by Start1 never turned On during the tests because all reboots were done before Sunset. When the reboot was done without Run At Startup Start1 did not get triggered. The Last Run Time column was not set. When the Run At Startup option was added to Start1 the Program was triggered but the device did not turn On because the If was False.
apostolakisl Posted March 19, 2012 Posted March 19, 2012 An If section is optional so a Program with Run At Startup with a null If will always run the Then clause at ISY startup. I understand this to be true. However, I have found that it does not happen. I had to put a statement in the if that says "from 1am for 24 hours" to get it to run the then at start up despite the "run at startup" being enabled. I also tried having the "else" clause filled with the same command just in case it wanted to run the else, but still it simply didn't run either clause. Here is the program, it sends the weatherbug temp reading to my Elk keypad display. If From 1:00:00AM For 24 hours Then Repeat Every 5 minutes Set Elk Area 'Main House' Display Text on Keypads, Content 'outside temp' Else Repeat Every 5 minutes Set Elk Area 'Main House' Display Text on Keypads, Content 'outside temp'
paauto Posted March 20, 2012 Posted March 20, 2012 Lee I’m still having problems with my “morning timers†program (which is similar to your Start2 example above). My program starts at 6 AM and turns on a couple of lights in my kitchen for 45 minutes, then sends an off command (in the THEN statement). My power went off again sometime this morning, because at 12:30 PM I received an “ISY Reboot†e-mail. I checked the log and the THEN statement in the “morning timers†program ran, with the lights coming on then being switched off 45 minutes later. Based on our postings over the weekend, I had de-selected “Run at Startup†in the Summary tab of the programs. Interestingly, my “exterior lights†program, which runs from sunset to sunrise, never sent an OFF command to the exterior lights. Through the log, I can see the program ran properly last night, turning the lights on. When the power came on, the ISY ran a query on all devices and the Exterior Lights were in the OFF state. I can only surmise that the power went off before sunrise and when it came on the program knew the lights should be OFF. That said, I thought Insteon devices remained in the state they were in prior to a power failure when the power comes back on.
LeeG Posted March 20, 2012 Posted March 20, 2012 Insteon devices no longer return to state before power drop. Just about all the new devices I have read the User Guide for now return to an Off state after a power drop. The Start2 Program ran after reboot without the Run At Startup option. I believe this is the ISY attempt to catch up on things that should have run since midnight but may not have because of the power outage. The Program with the Sunset trigger would not run the Then clause because Sunset had not yet occurred when power came back. EDIT: As Brian mentioned in an earlier post the Configuration option "Catchup schedules at Restart" can be turned Off which will stop the Programs from running again at reboot.
Brian H Posted March 20, 2012 Posted March 20, 2012 Lee G; Thanks for the added information on new device actions.
LeeG Posted March 20, 2012 Posted March 20, 2012 Brian I think I was repeating what you had already posted either here or another OP. Don't know if applies to all devices but did that change not start some time ago. I assumed it had to do with safety, not returning a circuit to powered after a power drop.
apostolakisl Posted March 20, 2012 Posted March 20, 2012 Brian I think I was repeating what you had already posted either here or another OP. Don't know if applies to all devices but did that change not start some time ago. I assumed it had to do with safety, not returning a circuit to powered after a power drop. I don't know about the safety thing. If it were a manual switch it would be powered up when service is restored, and that accounts for 99.99999% of all residential switches out there. Safety would depend on what is being powered, a security light for example that fails to come back on with power restorarion would be less safe.
LeeG Posted March 20, 2012 Posted March 20, 2012 I can turn mechanical switches off before leaving a residence that has lost power. I cannot turn Insteon devices Off. Perhaps it had nothing to do with safety. Perhaps it was just simpler, cheaper.
apostolakisl Posted March 20, 2012 Posted March 20, 2012 I can turn mechanical switches off before leaving a residence that has lost power. I cannot turn Insteon devices Off. Perhaps it had nothing to do with safety. Perhaps it was just simpler, cheaper. True, if you were home, awake, and actually thought to go check it. But my bet is the "Perhaps it was just simpler, cheaper".
apostolakisl Posted March 20, 2012 Posted March 20, 2012 Do you have a comment on why my program several posts above did not run after a power failure until I added the "if" clause stuff? My understanding is that if you have "run at startup" enabled with a blank "if" clause, it executes the "then" clause at startup. As it is currently written (as it is above), it does execute at startup. We had some big time thunderstorms last night and the power went out at some point during the night, and the program was running this am. I do not have the "catchup programs" checked, I have the grace period at 15 minutes.
Recommended Posts