Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trapping Elk F5/F6 Buttons
#21
Each driver will send out different things for user actions. The Tap won't send the same stuff as the Elk. The driver docs define what user actions a driver sends and what the Type and Data values will be. For the Elk, the Type is KeyPress. The Data is in the form keypad/button#.

You have two options, you can use "is this user action" which lets you filter for the type and data, but it doesn't filter for device. In some cases you don't need to because no other device would send out the same stuff. But, to be safe, you probably should. So you can add a second filter "Is User Action Action From". The two filters together will get you only stuff from that device, and of the Type/Data you want.

Another option is to do "Is User Action For", indicating what device and what type, but it will still let through any data value. Then, inside the action, get the data value and react to it yourself. This is sometimes useful if the data you receive can be directly turned into some sort of action parameter. I.e. if there's a 1 to 9 in it, and you need to get that and send out something that has a 1 to 9, just strip out the other bits, keeping the 1 to 9, and turn around and use that in the command you issue.

But, to react to a specific device/type/data combination, the two filter scheme above is probably the best thing to do.
Dean Roddey
Software Geek Extraordinaire
Reply
#22
Sorry for being dense, but how do I get the data from within the action?
------------------------------------
Devices I'm phasing out: ISY, NuVo
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#23
My Elk driver is named...Elk.

I tried:

Is User Action From: Device=Elk

Is this User Action:
Type: KeyPress
Data 01/F6

i set to log invocations and pull up the log monitor. Doesn't look like it's catching it.
------------------------------------
Devices I'm phasing out: ISY, NuVo
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#24
Is the trigger going out, do you see it in the event trigger monitor? Capture one there, then right click in the window and select copy text and paste it here.

Getting the data within the action is done via the Event:: action target, which should be there in all triggered event handling actions. It has commands to extract information from specific types of triggers.
Dean Roddey
Software Geek Extraordinaire
Reply
#25
this is what's showing up.

Code:
TIME: 17:45:01
cqsl.header
{
    v=1
    sysid=A042B2F41B22D606-3EF63F660CBC6F6C
    class=cqsl.useract
    source=cqsl.dev:Elk
}
cqsl.actinfo
{
    evtype=KeyPress
    evdata=01/F6
}

TIME: 17:45:01
cqsl.header
{
    v=1
    sysid=A042B2F41B22D606-3EF63F660CBC6F6C
    class=cqsl.loadchange
    source=cqsl.field:Lighting.LGHT#Sw_Backyard
}
cqsl.loadinfo
{
    state=on
    loadnum=12
    name=Backyard
}

TIME: 17:45:01
cqsl.header
{
    v=1
    sysid=A042B2F41B22D606-3EF63F660CBC6F6C
    class=cqsl.useract
    source=cqsl.dev:Elk
}
cqsl.actinfo
{
    evtype=TaskActivated
    evdata=1
}
------------------------------------
Devices I'm phasing out: ISY, NuVo
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#26
then your Is From Source will be cqsl.dev:Elk, your Type will be KeyPress and Data will be 01/F6
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#27
Actually, the ones that are checking specifically for from a particular device don't use the cqsl.dev: bit. They know it's from a device, so they will look for cqsl.dev: and, if found, pull out the device name that follows and compare it to what you indicated.
Dean Roddey
Software Geek Extraordinaire
Reply
#28
Oh, I was talking about filters. Maybe you were talking about the data extraction commands. There are some low level commands on the Event target that let you just get raw values out of the event trigger, and in that case, yeh, you would use the whole value, prefix included, because you are reading those raw values directly from the trigger.

But there are also dedicated commands for querying info from the various trigger types. Those also know what type of trigger they are dealing with and pull out the trigger specific info. So you wouldn't need to compare against the full raw values for those either.
Dean Roddey
Software Geek Extraordinaire
Reply
#29
When I use 01/F6 as Data, the trigger never fires.
------------------------------------
Devices I'm phasing out: ISY, NuVo
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#30
If you watch in the trigger monitor window, do you see that as the data being sent? It may not use a leading zero, so check that specifically.
Dean Roddey
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Inc Dec buttons Ron Haley 1 776 07-26-2014, 06:44 PM
Last Post: Dean Roddey
  Learn>Videos>Buttons fotofreak 6 1,201 07-20-2014, 06:59 PM
Last Post: Dean Roddey
  Increment Decrement Buttons usage help Shaky 1 765 11-22-2011, 10:24 PM
Last Post: Dean Roddey
  Radio buttons dgeffs 8 1,624 09-11-2011, 07:19 PM
Last Post: batwater
  Overview of Buttons/Images shipped with CQC MavRic 1 645 11-15-2010, 03:13 PM
Last Post: Dean Roddey
  Question about Static Buttons hunt2714 6 951 03-05-2010, 11:10 PM
Last Post: hunt2714
  irregularly shaped buttons? cwilson 4 832 10-20-2009, 11:09 AM
Last Post: Dean Roddey
  What is the best way to change buttons on a tool bar? Acropolis 1 775 04-11-2009, 03:58 PM
Last Post: Dean Roddey
  Phantom Buttons for CQC Austride 1 887 11-08-2008, 11:31 AM
Last Post: Dean Roddey
  Playing sounds when buttons are pressed MikeW 8 1,279 02-18-2008, 10:40 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)