Arm/Disarm Area 2 with single fob button on M1

This may be a dumb question...
 
I want to arm/disarm 2 areas with their own keyfob button. I have the main area(house) assigned to button 1 on the fob...easy enough.  Now i want to assign the secondary area (garage) to a second button...the only way I can see to do this is assign a couple rules to the function of the second button.  Here is what I have:
 
1. WHENEVER  RF KEYFOB BUTTON 2 IS ACTIVATED
     AND Garage (Area 2) ARM STATE = ARMED
           THEN DISARM AREA(S) 2 IMMEDIATELY
 

2. WHENEVER  RF KEYFOB BUTTON 2 IS ACTIVATED
     AND Garage (Area 2) ARM STATE = DISARMED
           THEN ARM AREA(S) 2 TO AWAY IMMEDIATELY
 

It only ever acts on the second rule...what am I missing??
 
Without looking in RP, I want to ask a question of your first rule... ARMED in what mode? I know you can have it check for specific armed modes, or ANY armed mode.
 
In your code if the system starts out armed, 
the first whenever will disarm the system and the second whenever will arm the system immediately afterwards.
 
If the system starts out disarmed,
the first whenever sill do nothing and the second whenever will arm the system.
 
I accomplished what you want to do except that I used the F4 key. Take a look at the following thread:
 
http://cocoontech.com/forums/topic/27510-arming-and-disarming-elk-m1g-with-f-key/page-2?hl=+arm%20+disarm%20+key
 
Mike.
 
There was a long discussion on how rules are executed and the timing of their execution and that can be found here
 
http://cocoontech.com/forums/topic/27708-elk-rules-engine/page-3?hl=%2Brules+%2Bexecution+%2Bevent#entry226755
 
and here are the rules that I used to arm and disarm using th ef4 key
 
ARM AND DISARM GARAGE WITH F4 KEY
 
27        WHENEVER  KEY F4 ON KEYPAD1 ACTIVATES
      AND Garage (Area 2) ARM STATE = ARMED
            THEN DISARM AREA(S) 2 IMMEDIATELY
            THEN TURN Output 101 ON FOR 4 SECS
 
28        WHENEVER  KEY F4 ON KEYPAD1 ACTIVATES
      AND Garage (Area 2) ARM STATE = DISARMED
      AND Output 101 STATE IS OFF
            THEN TURN Output 102 ON FOR 3 SECS
 
29        WHENEVER  Output 102 STATE IS TURNED OFF
            THEN ARM AREA(S) 2 TO AWAY IMMEDIATELY
 
Mike
 
I should mention that your code to use the fob would be simpler than my example above. My situation involved inputting a user code which complicated things and you won't have to deal with that using a key fob.
 
Mike.
 
drvnbysound, I have it set to armed in any mode...looks as though it just shows as ARMED when that's the case. 
 
Mike, Thanks for all this!!!  I knew i had read about phantom outputs...guess I didn't phrase it right while searching this time...didn't use the term 'engine'...
 
I'll test it when i get home tonight.  Sure it will work as it is an example in the document above.  Thanks again!
 
If I remember correctly there was an example that toggled a phantom output which is a nice net way to go.
 
In my case using the F4 key I had a problem with the user-code timer getting stuck spinning endlessly on the keypad lcd and resolved it with the timers that I used. I don't think that this will be necessary with a keyfod because it does not require a user-code to be entered.
 
Good luck, Mike.
 
Ran home during lunch and added the phantom output to the rules.  Works like a charm.  
 
Thanks again for pointing me in the right direction Mike.  
 
Back
Top