Jump to content

Disabled program Run (If) by another program does not revaulate if conditions change while it is in Running Then State


Recommended Posts

I've got a series of programs that monitor for the garage doors to open.  Once they open ISY runs a program to see if you are within 10 minutes of the start of exit delay (aka leaving home).  Then it checks to see if the security is system is armed either Away or Stay.  The variables that indicate Stay or away or set to 0 indicating not armed within seconds of event (by DSCLink) happening but I am getting text indicating someone may have forced their way into the garage and are awaiting someone to return home.  Per screen captures of the actual event in progress what am I missing? This happens frequently so I ran inside after arriving home  and captured these images while all was in progress and sure enough after 10 minutes I received text saying "possible intruder".  Obviously, I'm doing something very wrong (and am completely blind to it)  or ISY is not seeing the State variable (in this case Armed Away) change from 1 to 0. 



Capture of program that determines if you are exiting are possibly have an intruder




Program it runs as part of else to see if system is armed and gives me 10 minutes to get into house (program Disabled so only run as request by other program)




Evidence that program is running the Then clause




Even though both armed away and armed stay have been set to 0



Link to comment

Program looks fine. With the 10min wait the program should recheck the two variables before sending the email.

Only thing I would recommend is logging the DSCLink sends to the ISY to make sure it's not doing extra variable toggles (doesn't appear to be based on your screen captures)

Link to comment

Hello hart2hart,


The main question is whether or not the variables are being changed or the programs are being executed some other way.


I would slightly change your program:

Control x is Switched on

Or Control y is Switched on


This program is evaluated every time so, in case x is switched off and then y is switched off within 10 seconds, then the program will stop in the Wait.


You might want to consider:


( Control X is Switched On

And Control X is not Switched Off)


( Control Y is Switched On

And Control Y is not Switched Off)




With kind regards,


Link to comment



Thanks to Steve Lee for reminding me to test in smaller segments.  There is nothing wrong with structure or logic of the programs.  It is more fundamental to the fact that the program at issue is disabled.


For anyone else that attempts, hopefully following describes:


A program Runs If a disabled program  and the Then branch of disabled program is evaluated true based on a variable (State1) value.  You can see the disabled program  "Running Then" since it has a wait 10 minute command in the then branch. Now one can change the value of the variable (State1) so that the Then branch is no longer true but ISY does not re-evaluate and hence does not stop the program.  I changed variable (State1) via REST and just by simply updating variable in Admin console with same results.


This behavior was not what I originally expected given that disabled program was "Running Then" but because program was disabled I understand why it would not be in ISY data structure containing programs being constantly (re-)evaluated.


I accomplished required using:




'Garage:Garage Doors Opened So Check for Intruder'


        Control 'Garage / Garage:Double Door is Closed' is switched Off
     Or Control 'Garage / Garage:Single Door is Closed' is switched Off
        Run Program 'Garage:Garage Doors Opened Are We Leaving with Exit Delay' (If)
        Wait  10 minutes
        Run Program 'Garage:Garage Doors Opened Have We Arrived Home' (If)
        Wait  15 seconds
        Send Notification to 'JPaulText' content 'Garage Possible Intruder'
   - No Actions - (To add one, press 'Action')





'Garage:Garage Doors Opened Are We Leaving with Exit Delay'  (Disabled Program)


        $SecSys_Exit_Delay is 1   (variable set direct by DSCLink via REST from DSC Alarm Panel)

        Stop program 'Garage:Garage Doors Opened So Check for Intruder'
   - No Actions - (To add one, press 'Action')





'Garage:Garage Doors Opened Have We Arrived Home' (Disabled Program)


        $SecSys_Armed is 0 ($SecSys_Armed_Away & $SecSys_Armed_Stay  from DSCLink via REST were combined into one variable through simple program already in use)

        Stop program 'Garage:Garage Doors Opened So Check for Intruder'
   - No Actions - (To add one, press 'Action')



There may be a simpler and more straight forward method to accomplish but today it works.  I'm blind for now will consider refactoring later.

Link to comment


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

  • Create New...