sanders2222 Posted October 9, 2012 Posted October 9, 2012 I put together some routines to allow me to push a KPL button, hop in the car and drive off. The routines would arm the ELK and set the house up in the 'Away & armed mode'. The problem I was having was controlling program execution and folders with a variable (iAway). I found the ELK would only arm half the time, sometimes it would arm then disarm right away, and sometimes would not arm at all. The control was: If ( Control 'Utility Room / Util KPL G Away 10.9D.73.G' is switched On And Control 'Utility Room / Util KPL G Away 10.9D.73.G' is not switched Off ) And $iAway is 0 Then Set Scene 'Lights Upstairs' Off Set Scene 'Lights Down' Off Run Program 'IsArmed' (Then Path) Else - No Actions - (To add one, press 'Action') The arming program was this: If Status 'Utility Room / Util KPL H Vacation 10.9D.73.' is Off Then Set Elk Area 'House Main' Arm Away Wait 10 seconds Run Program 'Away Set' (Then Path) Else Set Elk Area 'House Main' Arm Vacation Wait 10 seconds Run Program 'Away Set' (Then Path) I was pulling my hair and really frustrated after spending 2 half days trying to get the program to work. Finally, I decided to utilize the features in the ELK module and not use variables at all. I replaced the '$iAway is 0' with: And Elk Area 'House Main' 'Arm Up State' is Ready To Arm Now the same code executes correctly 100% of the time. And removing the variable simplified the lines of code and how folders were controlled as well. This is not the first time I have experienced questionable results using variables. I would be surprised if others aren't experiencing issues using variables as well.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.