Jump to content

Program logic conflicts - Chapter 2


sanders2222

Recommended Posts

The 2nd part of my ‘Away’ program problem happens when I return. I am not understanding the ISY logic as programs run when they are not suppose to. I am using wait and notification commands to help me debugging and understanding the logic.

 

On my return, a garage motion sensor detects motion if the Away flag is true and my return ‘Arrive In’ program executed Sat Nov 28 10:01:27 PST 2009.

Program ‘Arrive In’
If
   - No Conditions - (To add one, press 'Schedule' or 'Condition') 
Then
    Run Program ‘Limited Out’
    Set ‘Hall Main’ 45%
    Set ‘Kit Main’ 45%
    Wait 50 seconds
    Run Program Flag Away (Else Path)
Else
-	No Actions - (To add one, press 'Action') 

 

The Limited Out program is suppose to turn on the outdoor lights, but only during prime time, which is a parent folder condition.

Folder Conditions for ‘Outdoors’
If
    Program “Flag Away’ is True
Then 
    Allow the programs in this folder to run

However, the program also executed Sat Nov 28 10:01:27 PST 2009, turning my outdoor lights on in mid-morning. My ‘Flag Prime’ was last set to FALSE on Fri Nov 27 23:02:00 PST 2009. I also disabled the ‘Limited Out’ but it still executes. I don't understand how the program can still run.

Program ‘Prime Time’
If
    From Sunset – 30 minutes
    To      11:02:00 PM (Same day)
Then
    Run Program ‘Flag Away’ (Then Path)
    Enable  Program ‘Limited Out’
Else
    Run Program ‘Flag Away’ (Else Path)
    Disable  Program ‘Limited Out’

Based on these results and my Program Summary, why do my outdoor lights turn on when the folder condition is FALSE and program disabled? What am I missing here?

Link to comment

The issue is that you are manually running the Else path of the Flag Away program.

 

If I understand the ISY logic correctly, folder conditions and "enabled" status only determine if the ISY is going to evaluate the 'If' part of the program as part of its routine chores. Directing it to go to the Else path of a program bypasses that restriction.

Link to comment

fitzpatri8

Thanks for clarifying the logic behind folder conditions. That said, can you show an example how I would write a program to light outdoors when I get home only if it’s ‘Prime Time’ (e.g. 'Flag Prime' is True)?

It seems my arrival procedure could look like this (when ‘Flag Away’ program condition is True)…

Program ‘Arrive In’ 
If 
   - No Conditions - (To add one, press 'Schedule' or 'Condition') 
Then 
    Run Program ‘Arrive Out’ (If)
    Set ‘Hall Main’ 45% 
    Set ‘Kit Main’ 45% 
    Wait 50 seconds 
    Run Program Flag Away (Else Path) 
Else 
    -  No Actions - (To add one, press 'Action')

Then ‘Arrive Out’ would need logic to test for ‘Prime Time’ and might look like this:

Program  ‘Arrive Out’
If
    Program ‘Flag Prime’ is True
Then
    Run Program ‘Limited Out’ (Then path)
Else
    -  No Actions - (To add one, press 'Action')

But the problem I see is this program would run any time ‘Flag Prime’ becomes true. That is not necessarily what I want. I could make this a child program to my folder that applies to programs only when I’m away (e.g. Flag Away is True). Can you check for the status of a program? E.g. when it is running, is the status always ’True’? If so, my program could look like this...

Program  ‘Arrive Out’
If
          Program ‘Flag Prime’ is True
    And Program ‘Leave’ is True
Then
    Run Program ‘Limited Out’ (Then path)
Else
    -  No Actions - (To add one, press 'Action')

Any other suggestions?

Link to comment

Archived

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


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