Jump to content

Single Mobilinc dashboard button to show alarm status and arm/disarm


rccoleman

Recommended Posts

Posted

<posting this in the Mobilinc forum at Michel's suggestion>


 


I'm trying to do something that feels simple to me, but I just can't figure it out.  I basically want a Mobilinc (iOS) dashboard button that both shows the current alarm status (armed/disarmed) *and* lets me toggle the status by tapping it.  Essentially what the giant red/green button does in the Mobilinc Elk plug-in, but on the dashboard.


 


Simple requirements -


 


* The dashboard button should always show the current alarm status (armed/disarmed), regardless of how it got that way (keypad, ISY admin console, program, etc).


* Tapping the dashboard button should toggle the alarm state: If it's armed, disarm it.  If it's disarmed, arm it in Away mode.


 


I can write programs to do either one of these things, but not both together on the same button.  I've tried all sorts of combinations of integer and state variables, disabled programs, and any other clever tricks that I can think of and I just can't make it work without unintended side effects.  Is there an easy way to do this that I'm just not seeing?


 


Thanks,


Rob


Posted

Hi Rob,

 

Thinking through this problem this morning, it's tricky. Here's how I'd approach it and see if this will get you on the right track:

 

- Create a program that is just status only. IE True = Armed, False = Disarmed. 

- In MobiLinc set this program to the Dashboard and make it toggle between True/False when tapped.

- In MobiLinc you can rename True/False to Armed/Disarmed.

 

That should take care of the MobiLinc side.

 

For the ISY side, think about this:

- Write a program (program 1) that listens to the status program's true/false state and will arm/disarm the ELK accordingly.

- Write another program (program 2) that listens to the ELK arm/disarm state. 

- When program 2 fires, first disable program 1 and then set the status program to true/false armed/disarmed based on the ELK status.

- At the end of program 2, reenable program 1.

 

I think that should get you closer. The disabling/enabling of program 1 will prevent the ISY from a possible feedback loop as you reset or set the status program based on actual ELK status. 

 

Wes

Posted

Thanks, Wes. That's along the lines of what I was trying to do, and the feedback loop was the main problem that I needed to solve. Enabling and disabling the program may be exactly what I need. I'll give it a try.

 

Rob

Posted

For those following along at home, I finally had some time to play with this.  There are some strange quirks in the way that the ISY communicates with the Elk that make it even trickier than I originally expected, but I think I have something that works well enough for me.

 

 

Elk Armed Program (triggers when alarm is armed)
Alarm Arm State - Elk Armed - [ID 0016][Parent 0022]


If
        Elk Area 'House' 'Arm Up State' is Armed Fully


Then
        $i.Alarm_Armed  = 1
        Run Program 'Alarm Arm State - Mobilinc' (If)


Else
   - No Actions - (To add one, press 'Action')
Elk Disarmed Program (triggers when alarm is disarmed)
Alarm Arm State - Elk Disarmed - [ID 0018][Parent 0022]


If
        Elk Area 'House' 'Armed State' is Disarmed


Then
        $i.Alarm_Armed  = 0
        Run Program 'Alarm Arm State - Mobilinc' (If)


Else
   - No Actions - (To add one, press 'Action')

Mobilinc Dashboard Program, set to "Toggle True/False":

Alarm Arm State - Mobilinc - [ID 004F][Parent 0022]


If
        $i.Alarm_Armed is 1


Then
        $i.Alarm_Armed  = 1
        Run Program 'Alarm Arm State - Set' (If)


Else
        $i.Alarm_Armed  = 0
        Run Program 'Alarm Arm State - Set' (If)

Set Alarm State (sets the alarm state)

Alarm Arm State - Set - [ID 0015][Parent 0022]


If
        $i.Alarm_Armed is 1


Then
        Set Elk Area 'House' Arm Away


Else
        Wait  5 seconds
        Set Elk Area 'House' Disarm
 
The main challenges were -
  • It looks like the ISY sends my passcode to the Elk when arming.  If, in the first program, I trigger on Arm Away, it arms as expected, and then I see a message in the event viewer that my passcode was accepted by one of my keypads and the alarm immediately disarms.  I don't require a passcode to arm my alarm, so this is just an annoyance.  I found that if I trigger on Armed Fully, I don't have this problem.  I really thought that there was something wrong with the logic that was sending me down the "disarm" path unexpectedly, but I think it's just this weird artifact of the ISY->Elk communication.  Comments welcome, of course.
  • I had to create two separate "Elk status" programs because of the sequence of states that the alarm goes through as it arms (detailed here).  Combining them would have sent the execution down the wrong path as it steps through the sequence.  I might have been able to do it differently by enabling/disabling programs, but this seemed to be more straightforward.
  • I had to add a delay in the Else/Disarm branch of the last program because it essentially disarms twice if the command comes from somewhere other than Mobilinc and that cuts off the "disarm" voice announcement.  It did disarm the alarm, but I want the verbal confirmation, too.  The delay also has the unwelcome side effect of delaying the disarm operation through Mobilinc, but I don't think that'll affect my real-world usage.

I'm sure that I'll have a Eureka! moment at some point and decide that this is overly complex, but it'll do for now.

 

Rob

 

Archived

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

×
×
  • Create New...