Charmed Quark Systems, Ltd. - Support Forums and Community
Missing how to tell CQC to read a Lutron keypad button pressed - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3)
+--- Forum: CQC Support (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=9)
+--- Thread: Missing how to tell CQC to read a Lutron keypad button pressed (/showthread.php?tid=10759)



Missing how to tell CQC to read a Lutron keypad button pressed - ghurty - 01-07-2019

Hi,

I am trying to have a Pico button on the Lutron trigger an event. I saw that it has to be programmed as a single control mode. And I saw how to write the command. Im just missing the line of where to get the trigger. By trigger event I set it to Is User Action, but where does it read which button is pressed?

Thank you


RE: Missing how to tell CQC to read a Lutron keypad button pressed - Dean Roddey - 01-07-2019

That will be in the data passed. That is driver specific since there's no way to generalize that. So, inside the event action, use the EventTrig target, which provides some commands to read out the data from various types of events, so there's one for user action type events to read the event type and data values. The driver doc explains the format of the event data.


RE: Missing how to tell CQC to read a Lutron keypad button pressed - ghurty - 01-07-2019

Thank you.
I must be missing it. When I am editing the action, I go to "If" and I can't find any line called EventTrig. I know I just must be missing something. I have the Trig Event set to Is User Action, and then I went to Edit Action. Do you mean "TrigEvent"? If yes, which one from there do I select? I Tried TrigEvent:IsUserActionFor and TrigEvent:IsUserActionFrom and the most fields I got was Driver, and Type. I dont get a value field.
Thank you very much


RE: Missing how to tell CQC to read a Lutron keypad button pressed - Dean Roddey - 01-07-2019

The command you want isn't an If type, it's just a command. If only shows you the commands that return a result. Cmd shows you ones that just do something or query something. The ones you want are the ones that just query information from the triggered event you are processing.


RE: Missing how to tell CQC to read a Lutron keypad button pressed - ghurty - 01-08-2019

Thank you.
I am trying to find it under CMD, and I Looked under TrigEvent and Devices, and I cant find which would be the correct one. I know I need to have two fields, an Event Type and an Event Data, but I dont see any option that gives me those two fields.

Thank you


RE: Missing how to tell CQC to read a Lutron keypad button pressed - Dean Roddey - 01-08-2019

It's TrigEvent::GetUserActionVals(). That gets the values associated with a user action type trigger. You provide it with variables for the action type and the data value.

In this case the data value will hold the info you are interested in.


RE: Missing how to tell CQC to read a Lutron keypad button pressed - ghurty - 01-08-2019

Thank you, I had tried that but it is expecting the value to be a GVar or a LVar.
I had tried Type=ButtonPress
Value=WallPad-1
But it gave the above error. Should I have had it as "LVAR:WallPad-1"

Thank you


RE: Missing how to tell CQC to read a Lutron keypad button pressed - Dean Roddey - 01-08-2019

It's giving you the values, not accepting them. So you should be passing it variables to fill in for you, so:

TrigEvent::GetUserActionVals(LVar:Type, LVar:Value);
If System::Equals(%(LVar:Value), Wallpad-1)
// Do something here for wall pad 1
Endif;

Something along those lines.