Jump to content

How do I set program priority when multiple programs exist?


RichTJ99

Recommended Posts

Posted (edited)

You are missing Parens:

If
( 
       Status  'Main House / Master Bath / Main: MBath Toilet Light' is not Off
     Or Status  'Main House / Master Bath / Main: Mbath Shower' is not Off
     Or Status  'Main House / Master Bath / Main: MBath Keypad' is not Off
)
    And Control 'Leak - Motion - Trigger - Spr / Main: Trigger Drive-Opened' is switched On
 
Then
        Run Program 'Driveway Alarm Master Bath' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

Without the parens, the AND is only joining with the line above not the 3 lines above.  This makes the program trigger if either of the first 2 devices turn off regardless of the Control message from the last device.

 

What you were saying there is:

 

If the toilet light is not off

 

or

 

If the Shower light is not off

 

or

 

If the keypad is not off and Drive-Open switched On

 

Then run the next program - the next program will re-trigger this since it turns on toilet and shower lights.

 

-Xathros

Edited by Xathros
Posted

"Why would that cause a loop?  I ask because the basement main control is part of the basement scene but works. "

 

Xathros' response, above, is the same as I would suggest. It is one of those logic priorities, similar to the mathmatical "distributive" property we all learned in the fifth grade, but forgot by the sixth. Logical AND trumps logical OR.

Posted

So to confirm:

If
       -(
       |     Status  'Main House / Master Bath / Main: MBath Toilet Light' is not Off
       |  Or Status  'Main House / Master Bath / Main: Mbath Shower' is not Off
       |  Or Status  'Main House / Master Bath / Main: MBath Keypad' is not Off
       -)
    And Control 'Leak - Motion - Trigger - Spr / Main: Trigger Drive-Opened' is switched On
 
Then
        Run Program 'Driveway Alarm Master Bath' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

Posted

You got it sir!

 

-Xathros

Posted

Thanks!  I have it turned on & have yet to be in the bathroom when the driveway alarm works but the ISY hasnt crashed so I think I might be good to go!

Posted

Anytime.  Happy to help.

 

-Xathros

Guest
This topic is now closed to further replies.

×
×
  • Create New...