Elk M1G Odd Problem

apostolakisl

Senior Member
I recently added some new lines of rules to my Elk and have had troulbes. First some background.

I have a keyfob that closes a relay hooked up to a zone on my panel so that I can initiate rules based on that zone status.

I have three output relays that close each of the three contacts on my remote garage door openers effectively "pushing" the buton.

I have all three garage doors zoned independtly on the security panel.

I have had all of this stuff working just fine for about a year and decided to add some new programming to it.

I wanted to be able to pull out of the garage and push one button on the keyfob, have it close any open garage doors and arm the system. For this to work I had to build delays into the commands. I needed about 20 seconds for any of the garage doors to close before arming so that the garage doors wouldn't get bypassed. I needed about 2 seconds between "pushing" any of the three garage door opener buttons as you can only "push" one at a time.

Rules as follows
Whenever keyfob A (zone x) becomes secure
And Garage door one is not secure
Turn output 1 on for 2 seconds

Whenever keyfob A (zone x) becomes secure
And Garage door 2 is not secure
Then set counter 1 to 2

Whenver every 1 second
subtract 1 from counter 1

Whenever counter 1 becomes 0
Turn output 2 on for 2 seconds

Whenever keyfob A (zone x) becomes secure
And garage door 3 is not secure
set counter 2 to 4

Whenever every 1 seconds
subtract 1 from counter 2

Whenever counter 2 beomces 0
Turn output 3 on for 2 seconds

Whenver keyfob A (zone x) becomes secure
Then set counter 3 to 25

Whenever every 1 second
subtract 1 from counter 3

Whenever counter 3 becomes 0
Arm system to away immediately


OK so this all seems to work fine, seemingly. I did all of this 4 days ago.

It has happened 3 times now in 4 days that the system randomly arms itself to away. It never did this before. It happened twice last night once at 3am and once at 4am (the system was already on in night mode and switched over). It happened once in the middle of the day (system wasn't on at all). I have also had 2 instances where garage 3 has opened on its own, once while the system was on causing an alarm. I also believe garage 1 opened on its own once but can't be sure it wasn't one of my kids. The one time garage 3 opened we weren't home so I know it wasn't any of us. I have video as well so I know that no one was there pushing the buttons.

What the heck??? Why would these rules by triggering randomly like that. There are no other timers or rules that were running at the time. I also have some other lines of programming in there that I didn't include that turn insteon lights on and chirp the sirens to indicate arming, etc.

I did rewrite the arming delay to using the built in delay instead of the counter which I set the system to arm one minute after (the shortest allowed) the keyfob zone closes. I did that this morning so don't really know if it made a difference.
 
It's been awhile since I worked with ELK rules, specifically counters. You are subtracting 1 from counter 3 every second. Does the counter reach zero and stop or does the count go negative? I don't remember how ELK handles that. It may well be continuing to count down to the max negative value and then wrap back around to the max positive value and then count down to zero arming the system.

Let's assume that counter is wrapping, just change the "count down" rule to include a test that the counter is greater then zero.
 
It is my understanding that the counters don't go negative. I have a bunch of other counters written the same way and haven't had issues with them. That is definitely an idea worth confirming. Although I haven't noticed a pattern to things that you would expect if it were cycling through some range.
 
Well the ELK manual I have doesn't have any specs on the counters. But based on the options in the ELK-RP utility I'm guessing that you are correct and they reach zero and stop. But you could test them just to be sure.

Perhaps you are using the same counter for something else? Do you name your counters to help avoid re-use?
 
Yes, I have named all of my counters. For simplicity I didn't use the names in this blog. I am actually using counter 6, 7, and 8. I went through all of my rules looking for any accidental re-use of the counters but couldn't find any.

The system didn't have any problems last night since changing the counter on the arming from my custom counter to the built-in 1 minute counter. Of course, out of the 4 24 hour periods after putting these rules in, it only had 2 days where there were problems.
 
Check that, I went outside to find my third garage door was open. This must have happened this morning after shutting off the alarm but before going outside. It seems like something is randomly causing these counters to go to zero. The rule I wrote to start the timer is supposed to only work when the door is not secure to start with. I have no rule that opens that door at all. I did use the keyfob this morning after I found it open, and the door closed 4 seconds later just like it was supposed to.
 
I did something similar to you, but I did it a bit differently and it works great.

I have open and close garage door tasks. You don't need to know about the open tasks, so we'll just focus on the close tasks. I have 2 garage doors. I created 3 tasks:
Code:
whenever CLOSE DOUBLE GARAGE (TASK 01) activates and 
  when double garage door is not secure
  then turn output 11 on for 1 second
whenever CLOSE SINGLE GARAGE (TASK 02) activates and 
  when single garage door is not secure
  then turn output 12 on for 1 second
whenever CLOSE ALL GARAGE (TASK 3) activates
 then do TASK 1
 then do TASK 2

Then, set your overhead garage doors zones to Force Armable. Get rid of your delay.

If I arm on Night mode, then it closes my garage doors and arms everything. If I press a keyfob to open the garage, then it disarms the garage and opens the door. I set my garage up as a separate area. When the main house area is armed, it automatically arms the garage area using a whenever rule. I know I could have made the garage area part of the main area, but I didn't because something didn't work like I wanted it to.

You do not need the counters if you use force armable on the zones. It will arm the area without all of the zones secure, and the zones will become armed when they become secure (like the garage door closes). You might want to put in some sort of rule that will alert you if your garage doors are open at like 2am as a failsafe, or build in some logic to make sure the door is shut and notify you if it isn't after the close task is executed.
 
Signal 15,

I had to put the delays in there because I am using the wireless garage door remote to control the doors. It is a single remote with three buttons on it that I rigged-up to output relays on the Elk. The problem is that you can't simulatneously push multiple buttons on it, so I had to put delays in between pushing the three buttons. I assume you have yours hardwired where that woudn't make a difference. I wish I had the forethought to run wires from the openers to the security panel while the house was under construction, but I didn't.

Originally I set up the garage doors on force armable and then discovered that in fact the doors were still getting bypassed. I went to the manual and discovered that force arming only works when you type the code in at the keypad (twice) and can't be used via an outmatic closing method. Since I amusing a single press of a keyfob to do everything I saw no other way but to the delay in there. If you know of a way to get the force armable to work when arming is done via a rule initiated by a zone status change (my keyfob) I would be interested in learning more.

I did do two more things this morning that may help. The first is that I moved all of the counters to different counters (I am using the previously unused counter 8 and 9 now instead of 6 and 7). I also added an "and" statement into the execution command of actually triggering the garage door remote so that it needs to unsecure to both start the timer and to trigger the door when the timer hits zero.

Whenever counter 8 becomes zero
and garage door is not secure
then turn output garage door on for 2 seconds

At least in this way a false count down to zero will only cause the door to close in error (not open) (and yes I have the light beam things installed so it doesn't close on a child or vehicle).
 
I have been thinking about this and I vaguely recall a problem when testing for zero. You could do it all with one counter and check for different counts to get your different intervals.

The keyfob would be used to set the counter to say 30. When the counter reached 27 and garage 1 was open then try to close that door. When the counter reached 24 and garage 2 was open then try to close that door. When the counter reached 21 and garage 3 was open then try to close that door. When the counter reached 1 try to arm the system.

You would of course adjust these counts as you see fit.

What are you going to do if something prevents the a garage door from closing? Do you plan to wait around until you verify that all are closed?
 
Frederick,

Yes, I like that idea of having one counter that you set to trigger multiple things on the way down. It would save some memory and clean up the rules page a bit as well. I am going to make that change right now.

If the door doesn't close, the alarm will end up bypassing it. I doubt that would be a problem becuase you can't get out of our driveway fast enough to not see that the doors are doing the right thing.

I also wrote a rule to send me an email any time any of these counters go to zero just to see if that really is what is triggering the incorrect rule execution.
Lou
 
Mine garage (Area 2) is ONLY armed by a rule, which is probably why the force arming works there. However, I have force arm set on my gun safe, and I can arm with a single keypress. Make sure "bypassable" for the zone is not set. This might have something to do with it.
 
Mine garage (Area 2) is ONLY armed by a rule, which is probably why the force arming works there. However, I have force arm set on my gun safe, and I can arm with a single keypress. Make sure "bypassable" for the zone is not set. This might have something to do with it.

So you can have your garage door and safe open, do whatever you do to run the rule that arms the system, then later on, after the delay clock ticks down and the system is engaged, close the safe door and garage door and they become protected?

So if I turn the bypass off, leave force arm on, I can arm the system with the garage door open using my keyfob and whenever I close the door it will get secured? I will give it a try but I thougt the unit woudn't let you arm it if a non-bypassable zone was not secure when you hit the button to arm.
 
I also wrote a rule to send me an email any time any of these counters go to zero just to see if that really is what is triggering the incorrect rule execution.
Lou

Please let us know what you discover from your testing. I, for one, would be very interested to know what is going on with your system.
 
So I merged the two timers together yesterday and have it count from 5 to 0 with the two garage doors being tripped at 3 and 1 (not 0). (The third garage door is not on a delay)

In addition, the arming delay is now 1 minute set by the built in arming delay timer rather than a custom counter.

I am now 24 hours into these changes and have not had any weird stuff happen yet. The garage doors all close when I push the keyfob and the system arms to away without bypassing the garage doors. I am keeping my fingers crossed.

Also, I have not received any emails of counters going to zero except for the ones that were supposed to.
 
Seems like the set of rules required should be a good deal simpler.

Is the arming delay feature you speak of different from the exit delay feature?

Hope everything continues to function.
 
Back
Top