Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help with DynamicOverLoad command
So I have finally decided to make an interface and use the webRiva capability. I have not made screens before so this is all new to me. I have been watching some of the videos which have been really helpful. 

A problem I am running into is trying to create a list of all the light switches in my house. I am using an overlay that onload uses the DynamicOverLoad function with variables for the field list and names.  Below is overlay onload action


LightList:Big GrinynamicOverLoad

The error I get is this
08/24 16:34:54-LAPTOP-V167N9IC, CQCIntfView, CQCRunActionThread6
    CQCKit, CQCKit_ThisFacility.cpp.653, Failed/Data Format, Error: 6257/0/0
    Token expansion failed during command processing. Reason: Variable LVar:Fields was not found
      <CQCIntfView> CQCIntfEng_ActEngine.cpp - 742
      <CQCIntfView> CQCIntfEng_View.cpp - 6155
      <CQCIntfView> CQCIntfEng_View.cpp - 3172


The weird thing is if I replace all the references to my UPB lighting driver with my HUE lighting driver everything works as expected. Though I do get the same error if try to get a list of my security zones from my elk driver.

I assume I missing something here being new at this.

Any help would be appreciated
I'm guessing that maybe the UPB driver you are using is not the V2 compatible version? In that case it probably will depend on the lights being correctly marked when created with a semantic type, and maybe that's not being done. My system is in flux at the moment but I can look at that in a day or so.

The Hue is V2 compatible and that may be the difference. It just goes by the V2 field names in that case so it would always get those right, even if they weren't semantically marked (though probably they are that as well.)

The Elk driver should work I would think. I think that the fields should be marked correctly, and presumably you are using the V2 compatible version as well, right?

Looking at the code, GetSemFields returns a result. If it returns False, that means it didn't find any fields of that type on that driver, and so it never sets the variables, so you could get that field doesn't exist. Leaving aside why it didn't find any fields probably you should do:

If Devices::GetSemFields(....)
    // Load the list inside here, where you know the variable got set
Dean Roddey
Explorans limites defectum
One thing that may be an issue is that the action command is asking for fields with read/write access. So anything write only or read only it would not pick up.

Another is that light switch really means switch, not dimmer. If the UPB lights only support dimmer fields and not off/on fields, they wouldn't get picked up by LightSwitch, you'd have to use Dimmer in that case. The Hue will likely have both dimmer and switch fields for each light.

If you double click the UPB driver to bring up the driver monitor tab for it, you can see the assigned semantic types in one of the columns.
Dean Roddey
Explorans limites defectum
The V2 stuff was my first thought too. But both the UPB driver and the Elk Driver are V2 at least according to the driver info/stats.
From what I see the driver shows semantic field types are boolean for the UPB driver.

Attached Files
.png   UPB Driver.PNG (Size: 75.04 KB / Downloads: 3)
OH, but they are marked boolean switch, not light switch. That was probably some early mistake by the original author and it's never been an issue until now. I can fix that and send you an updated version once I get my system back up and running.

The Elk security zones may be due to the read/write requirement, since those guys are read only. I probably should update the semantic fields query to include a required access parameter so that you can choose what you want. I'll look at that as well.
Dean Roddey
Explorans limites defectum
Awesome thanks for the help.
Give this attached one a try. So import, then reconfigure the driver to pick up the changes. It was indeed incorrect, in two ways. It was setting dimmers to the LightSwitch type, instead of the dimmer type. And setting the toggles to be BoolSwitch instead of LightSwitch.

The latter may be an issue in that everything that is a toggle may not be a light. We may have to come up with some way to let you tell the driver which toggles are actual lights. But, first, let's make sure this takes care of your immediate issue.

Attached Files
.cqcdrvpack   UPBV2_SemTypeFixes.CQCDrvPack (Size: 16.77 KB / Downloads: 1)
Dean Roddey
Explorans limites defectum
This new version of the driver works. All my UPB lights are listed in the overlay.

On slightly different but related topic, is there a way to get all light switches, regardless of driver, to load in the same overlay using a single template and dynamic overload command? I am trying to make really simple interface for my phone that I can see what lights are on/off and control them.
You mean for any one driver? If so, just make the action a global action, and you can then pass in the moniker of the driver you want to target instead of hard coding it.

If you mean for multiple drivers, that would be trickier. You'd have to make the call multiple times and concatenate the lists together, correctly to retain the right format. If that's too trick for the action system, it might require some CML.
Dean Roddey
Explorans limites defectum

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable Action "Find" command or alternate Shaky 3 527 11-02-2021, 08:19 PM
Last Post: Shaky
  Sonos - PlayFovorite command NightLight 22 6,710 05-10-2019, 09:32 PM
Last Post: kblagron
  template timeouts and LoadOverlay command Shaky 9 3,683 04-29-2019, 07:46 PM
Last Post: kblagron
  Hiding Command Buttons on template kfly 5 2,918 12-14-2018, 06:52 PM
Last Post: Dean Roddey
  Pause Command Seems to be Short kblagron 1 1,233 12-01-2018, 09:04 AM
Last Post: Dean Roddey
  With Echo integration is it possible to have a set and a query with the same command? ghurty 9 4,683 07-12-2018, 08:43 PM
Last Post: Dean Roddey
  Command Line Switches for installation/upgrade batwater 3 2,860 03-26-2018, 06:24 AM
Last Post: batwater
  Possible to suspend an ELK zone via a command? ghurty 4 3,132 03-24-2017, 04:59 AM
Last Post: wuench
  Harmony "All Off" Command help IVB 7 4,557 07-24-2016, 10:38 AM
Last Post: Dean Roddey
  When I invoke a command, the Elk trigger works, but when doing it at keypad, doesnt ghurty 7 3,965 07-03-2016, 08:29 PM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)