I have 2 switches that work to fire an RM rule when my security panel goes from arm to disarm (and vice versa).
These HE switches are actually Elk security outputs that are controlled in Elk Rules withing Elk.
output 59 is turned on whenever Elk is armed (any mode)
output 67 is turned on whenever Elk is armed (any stay mode)
Elk has a 3rd output 68 that is turned on by Elk should it be armed in Away mode.
In HE I need these "switches" for an RM rule that knows my security system has been armed AND the mode it is armed in,(Same for disarmed)
How would I write a rule condition that knows these outputs have gone from off to on (output 59 off is true THEN output 59 is on and true.
In other words RM must see both states (a cycle) to evaluate that a switch has cycled from on to off (or off to on) BEFORE it considers it a true condition. Otherwise my RM rule is marking both my rules as TRUE. ie- Both my RM rules for Disarmed Stay and Disarmed Away become true at the same time. It must be one or the other only.
What is the sequence of events as perceived by RM? RM rules are evaluated on state changes of their conditions. Perhaps you could show the Conditions and Rule of what is not working?
This RM page shows both Disarm rules true. This is the problem
Disarmed Away rules. I added a disable rule, but I do not think this is the right way to do this. I prefer RM evaluate the rule False (or True)
Finally the Disarm Stay. This problem also for the Arm rules.
This page is not dynamically updated, so this may or may not be the actual state at any given instant.
Do these Outputs change state? Do a little table that shows their state conditions and what each combination means. You still haven't mentioned what the events are, what are the state transitions that happen.
The outputs changes states via my Elk security panel. I can create Elk rules within this panel to control outputs, lights, locks. A limited HA controller if you will.
So however method I arm my security, (example stay mode), the Elk will use it's rules and arm the system, then change output 59 to on, and change output 67 to on. When the Elk is disarmed, it turns off these outputs.
Now moving to HE, it picks up the output change via it's driver and LAN connection to Elk, and changes the HE devices (output 59 and 67) to on. RM acts on these changes to show me in a dashboard that my system is Armed in Stay mode. Then other RM rules see the RM rule "Arm in Stay" rule is true, and fires it's actions.
That is all there is to it.
Alright, simple enough. What is the problem you have? Presumably, if armed in stay mode, then only those two outputs are on, and the other two are off, correct? So why doesn't your rule that has those two as a condition work? If either is off, the rule should be false.
You could just use a single condition of Switch is on, select both, and select All.
Yes bravenal, simple enough. But if you look at my RM page you can see the confusion in that I have the Disarm Away Rule and the Disarm stay rule BOTH True at this same time once my system is disarmed, So RM will fire actions of both rules at once. I need a way to make them go false after the rule has been true and done it's actions. With my house disarmed they are always true.
Are the switches turning off when disarmed? Is this event being reported? Open a Logs tab, and look at the logs from RM. It will show the events it sees. If it sees an "off" for either switch, it will go to false. If not, it won't. Sounds like "off" is not being reported, or not seen by RM.
Is the driver putting out an event with "off" as the value? Wasn't this driver putting out "Off"? That won't work.
The switches are changing fine. The 2 rules are also poinf False to True fine. So far my only workaround I could come up with is to add a disable rule switch to the 2 rules to make sure only 1 will fire depending on their previous arm state as I show below. This morning (3/30) I disarmed from stay and only the Disarm stay rule fired.
RM logs from these rules show Disarm Stay logged events on 3/30 as expected, and Disarm Away did not log anything for 3/30 (as expected also).
I suppose that is all I can do and live with both these rules just stay labeled as TRUE. At least it's working, I will wait to test the Arm Away bit, but it should also work.
Workaround for what?
Do they both stay labeled that way after you refresh the page.
I don't understand what's going on here. You shouldn't need to disable these rules if everything is working correctly.
What I want to see are the logs from Logs page, not the events.
bravenel while I really do appreciate your efforts to help me out, you just are not grasping what my problem as with this. I did explain carefully , also with pics, you can't help me if you don't see the problem.
Your comment "Workaround for what?" shows the fact you don't see what I am saying about this.
My rules work. My devices work. Logs are not going to show anything more.
Fact: When a rule goes TRUE, it fires the actions.
If I have 2 rules going TRUE at the same time and fireing actions, all hell breaks loose. I cannot have rule Disarm Stay AND Rule Disarm Away fireing at the same time. It's that simple.
My workaround was just as I described. Basically cancelling one rule or the other from fireing actions when they BOTH come true at the same time.
My callout to support was to find a better way that under the circumstances, I could keep one of the rules from turning TRUE based on a disarm event. I will go about it the way I did with using the disable function in the rule page as I showed.
The question is, why are both rules going true at the same time? Aren't these two rules fired by two different pairs of switches? Aren't the two pairs of switches mutually exclusive as to their on state? That is, if one pair is on, isn't the other pair off at that time? You haven't explained why they are both true at the same time. That's what I don't understand.
1 Like
When my alarm system is disarmed, then all these switches are off. No more distinction needed whether my system is armed away or stay. It's a moot point now. Security system is disarmed.
Now both Disarmed Away and Disarmed Stay their respective switches all off, so the rule is True.
Oh, I see. So the flaw is in your logic about how this should work.
You could have a rule that detects the disarmed state by testing all 4 switches for off. It could then fire two other rules in it's false part which would determine which armed state it was in and act accordingly. You really have a 3 value condition which cannot be determined with two rules.
1 Like
I think you hit on something now. I sort of see what you are getting at, but I am unsure how to implement.
Remember I use a total of 3 switches, set on or off by my Elk panel. 59-Arm State ON, 67-Armed in Stay. 68-Armed in Away.
Any combination of 2 of these switches determines the outcome of 4 RM rules. (Armed in Stay, Disarmed in Stay, Armed in Away, Disarmed in Away).
So this new rule would use multiple conditions? Then only use a false action to pick from the correct mode it disarmed from?
It makes some sense, but I can't get my head around how this rule logic would play out.
So, back to basics: Answer these questions:
How many distinct sets of actions do you want to perform depending the state of the alarm system? Is it 4, or is it 3? Do you need to distinguish between the two disarmed states?
Armed Away Mode
Armed Stay Mode-
The Bedtime RM rule activates...
Disarm Away Mode-
Disarm Stay Mode-
As you can see, I need to distinguish between the 2 disarm states. The arming part is fine since there can be only 1 distinct arm mode in RM.
If all 4 switches are off when disarmed, how are you supposed to know which disarm happened? What is the indicator of that?
How about this:
Triggered Rule Disarming from Away:
Trigger Event: Armed Away Mode off
Condition: Armed State off
Rule: Armed State off
Actions: whatever
Triggered Rule Disarming from Stay:
Trigger Event: Armed Stay Mode off
Condition: Armed State off
Rule: Armed State off
Actions: whatever
This assumes that Armed State is turned off before Armed Stay Mode or Armed Away Mode is turned off.
So you think I can still do this with just the 2 rules?
Two Triggered Rules for just the two disarm states. More rules for the other states.