hart2hart Posted December 21, 2014 Posted December 21, 2014 (edited) 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 Edited December 23, 2014 by hart2hart
stusviews Posted December 21, 2014 Posted December 21, 2014 What changes the value of the variable(s)?
hart2hart Posted December 21, 2014 Author Posted December 21, 2014 (edited) DSCLink Screen captures occurred between 6:03 and 6:06. Relevant variable changed at 5:58:53 per listing of variables. Edited December 21, 2014 by hart2hart
io_guy Posted December 21, 2014 Posted December 21, 2014 (edited) 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) Edited December 21, 2014 by io_guy
hart2hart Posted December 22, 2014 Author Posted December 22, 2014 Anyone from UD see where I've gone wrong or is this a genuine issue?
Michel Kohanim Posted December 22, 2014 Posted December 22, 2014 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: If ( Control X is Switched On And Control X is not Switched Off) Or ( Control Y is Switched On And Control Y is not Switched Off) Then ... With kind regards, Michel
hart2hart Posted December 22, 2014 Author Posted December 22, 2014 (edited) Resolved 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' If Control 'Garage / Garage:Double Door is Closed' is switched Off Or Control 'Garage / Garage:Single Door is Closed' is switched Off Then 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' Else - No Actions - (To add one, press 'Action') ---------------------- 'Garage:Garage Doors Opened Are We Leaving with Exit Delay' (Disabled Program) If $SecSys_Exit_Delay is 1 (variable set direct by DSCLink via REST from DSC Alarm Panel) Then Stop program 'Garage:Garage Doors Opened So Check for Intruder' Else - No Actions - (To add one, press 'Action') ------------------------------------ 'Garage:Garage Doors Opened Have We Arrived Home' (Disabled Program) If $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) Then Stop program 'Garage:Garage Doors Opened So Check for Intruder' Else - 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. Edited December 23, 2014 by hart2hart
Recommended Posts