Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Triggered Event w/ Elk AreaArm
#1
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.
System: WHS, UPB, Plex, Elk
Drivers: Autopatch, DataLog DB, DTV IP, GC-100, IRA, Logic Server, Variable Driver, Weather Underground
Reply
#2
Can you post a screen cap of the filters setup?
Dean Roddey
Explorans limites defectum
Reply
#3
I thought my explanation may have been confusing!!

Image attached.

I tried each filter individually and it fired on motion each time.


Attached Files
.png   Filters.png (Size: 37.2 KB / Downloads: 17)
System: WHS, UPB, Plex, Elk
Drivers: Autopatch, DataLog DB, DTV IP, GC-100, IRA, Logic Server, Variable Driver, Weather Underground
Reply
#4
There may be an issue with the logical operation. I'll look at that, in the meantime, try this:

1. Get rid of the second filter
2. Check the RegEx value beside the comp value of the first one
3. Set the comp value to

Disarmed|Armed Stay

That will check whether it's one or the other of those.
Dean Roddey
Explorans limites defectum
Reply
#5
This worked. Tested with both Armed/Disarmed and all worked.

Plus...I never knew the Reg Ex even existed. Can use this again elsewhere.

Thanks
System: WHS, UPB, Plex, Elk
Drivers: Autopatch, DataLog DB, DTV IP, GC-100, IRA, Logic Server, Variable Driver, Weather Underground
Reply
#6
Greetings from 32,000 feet,

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.
Reply
#7
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:

LGHT#Sw_FamWall
LGHT#Dim_FamSconce
LGHT#Sw_FamTable

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.
Dean Roddey
Explorans limites defectum
Reply
#8
The longer explanation Dean did in 2007 is in post number 4 of this thread.

I keep a well worn copy handy, and use RegEx values a lot.
Reply
#9
Thanks Dean. So something like wild cards. This is helpful as I've never understood it.
Reply
#10
12 gauge wild cards.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Triggered Event only works every second time znelbok 2 683 10-27-2020, 12:05 PM
Last Post: znelbok
  Global Variables in the Event Server context lleo 1 679 05-16-2020, 11:21 AM
Last Post: Dean Roddey
  [FEATURE] Event Run Action simplextech 4 1,731 01-09-2020, 02:04 PM
Last Post: simplextech
  Media playing from Event simplextech 11 2,905 01-07-2020, 06:09 PM
Last Post: simplextech
  Triggered Event on Timer Question znelbok 7 2,564 12-09-2019, 02:10 PM
Last Post: znelbok
  Editing Triggered Events Possibly Causing Kernel Panic/Crash gReatAutomation 6 2,101 11-08-2019, 01:10 PM
Last Post: Dean Roddey
  Pause / Resume Triggered or Scheduled Actions from the Interface Viewer gReatAutomation 2 1,409 10-30-2019, 01:38 PM
Last Post: gReatAutomation
  Possible Bug with Triggered Events gReatAutomation 3 1,180 09-19-2019, 02:41 PM
Last Post: gReatAutomation
  Triggered Event and Standard Triggers gReatAutomation 5 1,493 08-23-2019, 12:38 PM
Last Post: Dean Roddey
  LogicServer Elapsed Time and Triggered Event gReatAutomation 6 1,644 08-17-2019, 07:53 AM
Last Post: gReatAutomation

Forum Jump:


Users browsing this thread: 1 Guest(s)