Need help with Elk M1 rule.


Active Member
Okay, I'm trying to come up with a concise set of rules to send alternating text strings every 3 seconds for 10 minutes. Right now I have 5 rules, 4 which are "every 1 second" tests.

I started this whole mess off by setting an output on for 10 minutes and setting a counter to 1, triggered by f5 on a keypad.

Then I have a "every one second" rule that if the counter is not 0, increment the counter.

Then another "one second" rule that tests to see if the counter is 4 and if so, send text-1.

Then another "one second" rule to see if the counter is greater than 6 and if so, send text-2 and set the counter to 1.

And finally, when the output that was on for 10 minutes goes off, set the counter to 0 and send the terminate text string.

Could this be written better and more efficiently, not sure what the effect of "every one second" rules has on the M1 processor.
The only problem you may run into is if other text is being scrolled on the keypad like a trouble or date/time. It may take longer than 3 seconds for everything to display and cycle back around.

Your approach sounds good. Of course there are many ways to write it. Checking the time every second is no problem for the M1.
Im thinking we should have a section for a collection of elk rules and a short description of what they do. E...A sub forum in the security forum for this maybe? then we could see what is going on and how others are using the "features" of the elk and get ideas of our own.
thanks BSR. I know they have that... I hhave read through ALL of them and was hoping for more samples that I could learn from.