Jump to content

Why does this program execute after rebooting ISY?


ahwman

Recommended Posts

I have two very similar programs which I created to turn my TV and sound bar on. They both use a variable set by a geofence. The first program turns my TV on/off when I come and go. The second program simply turns my TV on at 9:00AM every morning assuming I'm home. For some reason, the program which is set to trigger at 9:00 am always executes upon rebooting my ISY (assuming I'm within the geofence - 1 means home) or say after a power failure, yet the other launches only when the variable changes accordingly.

 

I have attached screenshots of the programs, any ideas?

 

post-2755-0-72202600-1433773597_thumb.jpg

post-2755-0-30097800-1433773608_thumb.jpg

Link to comment

$iphone is a state variable. The init value is 1. Changes are reported to the ISY via MobiLinc's iPhone geofence feature. 1 means within geofence, 0 means outside of geofence. If you notice both programs utilize the exact same variable in the if statement. The only difference is the second program incorporates an additional if statement based on time of day. So I would think the variable cancels out but for some reason the ISY upon rebooting is executing the program which incorporates the condition based on time of day. Just seems odd...

Link to comment

$iphone is a state variable. The init value is 1. Changes are reported to the ISY via MobiLinc's iPhone geofence feature. 1 means within geofence, 0 means outside of geofence. If you notice both programs utilize the exact same variable in the if statement. The only difference is the second program incorporates an additional if statement based on time of day. So I would think the variable cancels out but for some reason the ISY upon rebooting is executing the program which incorporates the condition based on time of day. Just seems odd...

It would seem upon booting up the init value sets the value that your iPhone is home.

 

In your program you probably use the iPhone=home to stop TV turning on when you are not home. If that program is enabled it will trigger the Then clause and turn on your TV.

 

Usually with this problem you would have the first program call a second program with the time frame or state variable in it. The second program would be disabled so that it doesn't get triggered by lines you intended to be a condition only.

 

Copy and paste your program here and people will help you fix it.. Right click on program and select copy to clipboard)

Link to comment

It is probably that you have "catch up programs at reboot" checked on your configuration page of ISY.  You can change that to the grace period and select a period of time, so it only goes back say 15 minutes, or an hour, or whatever.

Yep, unchecking this did the trick! Thanks so much for the suggestion as I completely forgot about it...

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...