Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help with DynamicOverLoad command
#1
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

Devices::GetSemFields
    P1=UPBlight
    P2=LightSwitch
    P3=LVar:Fields
    P4=LVar:Names

LightList:Big GrinynamicOverLoad
    P1=/User/Mobile/LayoutTmp_Lights
    P2="UPBlight.LGHT#Sw_DEV-Foyer_Light",%(LVar:Fields)
    P3=%(LVar:Names)
    P4=Vertical

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
    "UPBlight.LGHT#Sw_DEV-Foyer_Light",%(LVar:Fields)
      <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
Reply
#2
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:

Code:
If Devices::GetSemFields(....)
    // Load the list inside here, where you know the variable got set
EndIf
Dean Roddey
Software Geek Extraordinaire
Reply
#3
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
Software Geek Extraordinaire
Reply
#4
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.
Reply
#5
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)
Reply
#6
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
Software Geek Extraordinaire
Reply
#7
Awesome thanks for the help.
Reply
#8
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
Software Geek Extraordinaire
Reply
#9
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.
Reply
#10
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
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  With Echo integration is it possible to have a set and a query with the same command? ghurty 9 489 07-12-2018, 08:43 PM
Last Post: Dean Roddey
  Command Line Switches for installation/upgrade batwater 3 1,087 03-26-2018, 06:24 AM
Last Post: batwater
  Possible to suspend an ELK zone via a command? ghurty 4 1,403 03-24-2017, 04:59 AM
Last Post: wuench
  Harmony "All Off" Command help IVB 7 2,242 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 1,668 07-03-2016, 08:29 PM
Last Post: Dean Roddey
  Inserting global variable into command string MikeA 2 977 06-26-2016, 10:09 AM
Last Post: MikeA
  Hide Command Button potts.mike 1 1,015 05-06-2016, 12:24 PM
Last Post: Dean Roddey
  Convert, truncate, or round command? IVB 1 808 03-28-2016, 09:32 AM
Last Post: Dean Roddey
  Group to Command Button znelbok 4 1,287 09-23-2015, 07:30 PM
Last Post: Dean Roddey
  What command would I use to write a field value to a variable? ghurty 4 1,378 01-28-2015, 02:57 PM
Last Post: znelbok

Forum Jump:


Users browsing this thread: 1 Guest(s)