Jump to content


Photo
- - - - -

Need help with Elk M1 Rules


  • Please log in to reply
9 replies to this topic

#1 upstatemike

upstatemike

    Cocoonut

  • Registered
  • PipPipPipPip
  • 3590 posts
  • Location:CNY
  • Experience:novice
  • Hardware:Elk M1, HomeTroller, ISY-99, StarGate
  • Tech:INSTEON
  • Audio:Sonos
  • CCTV:ip
  • Phone:POTS

Posted 14 April 2018 - 01:39 PM

I'm trying to convert a Stargate event into an Elk M1 Rule and am having a hard time figuring out how to do it efficiently. All the event does is monitor eleven inputs shared between the Stargate and Elk units and turns on a relay whenever one or more of the inputs is on and shuts the relay off again whenever all the inputs are clear. The inputs monitor eleven lighting zones in the basement and the relay operates an indicator over the door to the basement stairs to let me know if any lights have been left on. Here is the existing Stargate event:

 

Event: Basement Indicator

If

(DI: Basement Stairs) is ON

or (DI: Wood Room)

or (DI: Lab1)

or (DI: Lab2)

or (DI: Lab3)

or (DI: Lab4)

or (DI: Storage Room)

or (DI: Furnace Room)

or (DI: Pump Room)

or (DI: Workshop)

or (DI: Telephone Room)

Then

(RELAY: SG16) ON

Else

(RELAY: SG16) OFF

End

 

How can I replicate this in the Elk M1 without using a whole ton of separate rules?



#2 RAL

RAL

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1782 posts
  • Location:Rhinebeck, NY
  • Experience:average
  • Hardware:Elk M1
  • Tech:X10-PLC
  • Phone:POTS

Posted 14 April 2018 - 02:04 PM

I think you would have to do something like this.

 

Whenever every 1 minute   (or x seconds, if you need faster indications)

  AND Zone 017 IS Secure

  OR  Zone 018 IS Secure

  OR  Zome 019 IS Secure

    ...

    THEN Turn Output 016 ON

 

Whenever every 1 minute

  AND  Zone 017 IS Not Secure

  AND  Zone 018 IS Not Secure

  AND  Zone 019 IS Not Secure

    ...

    THEN Turn Output 016 OFF

 

My assumption is that when a light is on, the zone input is closed, indicating secure status. 

 

So, if one or more of the zones is secure,  the indicator light will be turned on.  If all the zones are not secure, then no lights are on, and the indicator is turned off.



#3 upstatemike

upstatemike

    Cocoonut

  • Registered
  • PipPipPipPip
  • 3590 posts
  • Location:CNY
  • Experience:novice
  • Hardware:Elk M1, HomeTroller, ISY-99, StarGate
  • Tech:INSTEON
  • Audio:Sonos
  • CCTV:ip
  • Phone:POTS

Posted 14 April 2018 - 02:30 PM

That should work... I didn't think of using a time trigger. Thanks!



#4 LakeHouse

LakeHouse

    Cocooner

  • Registered
  • PipPip
  • 68 posts
  • Location:Central Wisconsin
  • Experience:average
  • Software:Elve
  • Hardware:Elk M1
  • Tech:X10-PLC, X10-RF
  • CCTV:analog, ip, dvr
  • Phone:POTS

Posted 28 April 2018 - 05:26 PM

There is no "OR" in the Elk logic rules if I remember correctly.



#5 upstatemike

upstatemike

    Cocoonut

  • Registered
  • PipPipPipPip
  • 3590 posts
  • Location:CNY
  • Experience:novice
  • Hardware:Elk M1, HomeTroller, ISY-99, StarGate
  • Tech:INSTEON
  • Audio:Sonos
  • CCTV:ip
  • Phone:POTS

Posted 28 April 2018 - 06:00 PM

Looks like you are correct... back to the drawing board!



#6 RAL

RAL

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1782 posts
  • Location:Rhinebeck, NY
  • Experience:average
  • Hardware:Elk M1
  • Tech:X10-PLC
  • Phone:POTS

Posted 28 April 2018 - 09:08 PM

Looks like you are correct... back to the drawing board!

 
The simple solution is to use separate rules to turn on the Output that controls the indicator light.
 
i.e.
 
Whenever Zone 17 Becomes Secure
  Then Turn Output 016 ON
Whenever Zone 18 Becomes Secure
  Then Turn Output 016 ON
...
 
This gives you the same result as if you had an OR operator.  You don't need to use time as a trigger, since the change of state of just the single zone will trigger the rule.
 
I know you said you'd prefer not to use separate rules, but this approach doesn't really use any more rule space than if you were able to write everything as a single rule.   


Edited by RAL, 28 April 2018 - 09:09 PM.


#7 Work2Play

Work2Play

    Cocoonut

  • -=Gold Supporter=-
  • 4877 posts
  • Location:Northern California
  • Experience:guru
  • Software:Elve
  • Hardware:Elk M1, RUC-01
  • Tech:X10-RF, UPB
  • Audio:AirPlay
  • Video:XBMC
  • CCTV:ip, dvr
  • Phone:3CX, Asterisk, FreePBX, Grandstream, Ooma

Posted 28 April 2018 - 11:30 PM

I used to do something kinda similar to keep track of all exterior doors.  I had a rule for each zone - when it became not-secure, it'd increase a counter - and whenever the zone became secure, it decreased the counter.  If the counter hit zero, the alerts turned off.  As long as the counter was >=1, then it would turn on an output that would beep the keypads.  

 

I have indoor-only cats, but contractors and kids kept leaving the damned doors open - this was hugely helpful, and brought a little extra attention to the fact that I had a good security system to strangers in my house.

 

I'm not running an Elk right now - but if you need rule examples, I probably have a copy cached on the other computer...  I think it'd work perfectly for what you're trying to do.



#8 upstatemike

upstatemike

    Cocoonut

  • Registered
  • PipPipPipPip
  • 3590 posts
  • Location:CNY
  • Experience:novice
  • Hardware:Elk M1, HomeTroller, ISY-99, StarGate
  • Tech:INSTEON
  • Audio:Sonos
  • CCTV:ip
  • Phone:POTS

Posted 29 April 2018 - 07:46 AM

I can do a rule for each zone but with eleven inputs involved that seems like a lot of rules. Maybe doesn't take up much rule space but what about rule count? Is there a limit to the number of rules?

 

Reminds me just how well designed the Stargate rules engine is!



#9 RAL

RAL

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1782 posts
  • Location:Rhinebeck, NY
  • Experience:average
  • Hardware:Elk M1
  • Tech:X10-PLC
  • Phone:POTS

Posted 29 April 2018 - 04:45 PM

I can do a rule for each zone but with eleven inputs involved that seems like a lot of rules. Maybe doesn't take up much rule space but what about rule count? Is there a limit to the number of rules?

 

Reminds me just how well designed the Stargate rules engine is!

 

Elk doesn't document the limits of the rules engine very clearly, but my understanding is that the M1G has a limit of 528 rules (a rather strange number).   Each Whenever, AND and Then clause counts as a rule. Earlier I said that writing things as separate rules doesn't really use any more rule space.  So that isn't quite true - I'd forgotten that the Then clauses count as rules.

 

If you were able to write all those OR conditions for 11 inputs into a single rule, it would total 13 rules.  Writing them separately as 11 separate rules takes up 22 rules. A small difference overall in this particular case.



#10 upstatemike

upstatemike

    Cocoonut

  • Registered
  • PipPipPipPip
  • 3590 posts
  • Location:CNY
  • Experience:novice
  • Hardware:Elk M1, HomeTroller, ISY-99, StarGate
  • Tech:INSTEON
  • Audio:Sonos
  • CCTV:ip
  • Phone:POTS

Posted 29 April 2018 - 07:39 PM

OK at least I know I can do it on the M1 if the Stargate ever fails but for now I'll leave it on the single Stargate event for easier editing and management.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users