Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Action command help
I am starting a new thread, to not clutter the driver development thread for Radio RA2, and the issue is likely my limitation in understanding the commands, syntax.
So there is a field change trigger based on which I am trying to make a timed field write.

The trigger looks like this in the CQCEventDump


My action script looks like this:
TrigEvent::GetEvField(%(TEvRTV:NewFldVal), LVar:DimLevel)
// getting the dimmer level from RTV

If System::Equals(LVar:DimLevel, 25, Case)
    Devices::TimedFldChange(RadioRA2.LGHT#Sw_FBFan, True, False, 1)
This is not working, in the log I am getting
"The path '25' is not well formed."
"Scheduled/Triggered Event 'name' failed"
You don't need to call GetEvField. That is allowing you to access arbitrary info within the event. The %(TEvRTV:NewFldVal) token already contains the actual field value that was sent (25 in this case.) So that's why it's complaining about the path 25, because it expects a path like /cqsl.fldval/val which refers to a particular value in the event info. But you already have that info so you can just use it directly. You don't even need to put into a local var or anything, just use it as is.


If System::Equals(%(TEvRTV:NewFldVal), 25, Case)
Dean Roddey
Explorans limites defectum
Thanks Dean, it was that simple, and it works!

So is what is the best way to do a case logic structure and the action editor.
If need to evaluate the NewFldVal against several different cases?
Just have the required number of If...Then clauses?
Yeh, there's no real equivalent to a switch or case type construct. Where possible, arrange it so you don't have to, as in my previous update of your original scenario. If you are trying to convert the incoming level to an on time, try to do it by math instead, for instance.

But, short of that, you have to just try each value.
Dean Roddey
Explorans limites defectum

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to copy/paste command button on template Deane Johnson 1 842 04-17-2020, 02:18 PM
Last Post: Dean Roddey
  Where's the Action Editor? Deane Johnson 4 1,839 07-30-2019, 02:50 PM
Last Post: Dean Roddey
  User Action on ZWave Keypad jkmonroe 18 8,342 04-04-2015, 05:46 AM
Last Post: jkmonroe
  How to put a pause in an Action list? Deane Johnson 10 5,006 11-30-2014, 11:22 AM
Last Post: Dean Roddey
  If ... Else to create toggle command? finish.06 3 2,372 06-12-2014, 07:13 AM
Last Post: Dean Roddey
  VRCOP User Action Configuration potts.mike 30 10,461 05-11-2014, 09:06 PM
Last Post: potts.mike
  Interface Reload Command DaveB 1 1,824 02-17-2013, 12:30 PM
Last Post: Dean Roddey
  HAI driver: RawCmd command ControlFreak 0 1,643 01-19-2012, 01:06 PM
Last Post: ControlFreak
  Best way to implement a timed action/macro brathnach 3 2,332 04-11-2011, 07:20 PM
Last Post: Dean Roddey
  Syntax for variable action khill 8 3,713 03-23-2011, 08:26 PM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)