I am trying to streamline all my alarm states and run all automation for each alarm state through a triggered event for each. I did have one triggered event using Is Field Change For against Elk.AreaArm1 and then If/Then through each alarm state in the Even Action. It was difficult to go through the long script so I wanted to have a seperate triggered event for each alarm state for readability.
So, I made a triggered event using two filters
Is New Fld Change For against Elk.AreaArm1.Disarmed
Is New Fld Change For against Elk.AreaArm1.Armed Stay
Either one can be true
Everything worked well when arming/disarming. The one caveat was when I walked around and my motions kicked off, the triggered event also kicked off. The CQCEventDump only showed motion triggered, nothing else. the logs were fine. Why is a motion triggering an event when there is no trigger set against a motion detection.
Yes, I am using V1 Elk b/c changing over will take me some time to convert all my actions and templates and I have no time to do it right now.
Dean, can you point me to a good explanation of what the RegEx is with regard to events? I see the check box but have never understood when to check it.
Ugh... I just write up a nice explanation and accidentally hit some hot key combination that sent me to the previous page and I lost it. I hate that.
Anyway, the shorter version is that, without it checked what you type has to be literally matched. With it checked, what you enter is a regular expression that will be used to do the match. It only supports basic regular expression stuff, so:
1|2|3
One of the values in the list, spaces are significant
1,2,3
Each in a sequence, which isn't too useful in this example which is the same as 123, but when each of the steps is itself an expression it does.
[0-9]
[a-z]
[A-Z]
represents one character in a range, either one digit, one lower case char, or on upper.
[0-9A-Z]
You can combine ranges together so it is either one digit or one upper case char.
[0-9]*
Asterisk is zero or more. So zero or more digits
[A-Z]+
Plus is one or more, so one or more upper case chars
.+
dot is any character, so one or more characters of any type
[0-9]?
Question is an optional, so either nothing or a digit
(xyz)
Parens delimit a specific regular expression part, so that it knows (when you combine them together with text, what belongs to a given part of the expression.
That's mostly it. You can combine those all you want, though you have to escape any of the special characters if they are in the stuff you want to find, so [].+?*|-(), all have to be escaped (using a \ character.) And of course the \ character has to be escaped if it's in the stuff to find as well, so \\.)
So, if you wanted to match any light field that is a switch or dimmer in the Family room, it might be:
LGHT#(Sw_|Dim_)Fam.*
So this is literal text with two expressions in it (Sw_|Dim_) and .* so it'll match:
and so forth. The one in the middle needs () around it to divide it from the stuff on either side. The one at the end doesn't since it's at the end, though you could have put it in parens as well.