finding things

Posted on
Wed Oct 28, 2020 3:17 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: finding things

Are you in the Edit Event Settings sub-dialog of the Trigger dialog? I just copy/pasted the lines you posted above into the Z-Wave Plugin and it worked, once I created a new Trigger in Indigo for a Trigger that has settings (Edit Event Settings button is visible and enabled in Trigger dialog):

Code: Select all
   Z-Wave                          Called getEventConfigUiValues(self, pluginProps:UiValuesDict : (dict), typeId:zwaveCommand, devId 0:
   Z-Wave                          Called getEventConfigUiXml(self, typeId:zwaveCommand, devId:0,  eventsTypeDict:Item : (dict)
     zwaveCommand : (dict)
          ConfigUIRawXml : <?xml version='1.0' encoding='UTF-8'?>
<ConfigUI><Field defaultValue="false" hidden="true" id="mode_matchBytes" type="checkbox" /><Field defaultValue="" hidden="true" id="description" readonly="true" type="textfield" /><Field id="targetDev" type="menu"><CallbackMethod>eventZWaveCommandReceivedUiChange</CallbackMethod><List class="self" method="getTriggerDevices" /><Label>From:</Label></Field><Field id="commandReceived" type="menu"><CallbackMethod>eventZWaveCommandReceivedUiChange</CallbackMethod><List class="self" dynamicReload="true" method="getTriggerCommands" /><Label>Received:</Label></Field><Field alignWithControl="true" alwaysUseInDialogHeightCalc="true" defaultValue="" id="matchBytes" type="textfield" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Label>Match bytes:</Label></Field><Field alignWithControl="true" alwaysUseInDialogHeightCalc="true" fontColor="darkgray" fontSize="small" id="instructionsLabel1" type="label" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Label>Match bytes can use * to match 0 or more bytes, and ? to match exactly 1 byte.</Label></Field><Field alignWithControl="true" alwaysUseInDialogHeightCalc="true" fontColor="darkgray" fontSize="small" id="instructionsLabel2" type="label" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Label>For example:</Label></Field><Field alignWithControl="true" alwaysUseInDialogHeightCalc="true" fontColor="darkgray" fontSize="small" id="instructionsLabel3" type="label" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Label>* 0x7D ? 0x84 0x07 *</Label></Field><Field alignWithControl="true" alwaysUseInDialogHeightCalc="true" fontColor="darkgray" fontSize="small" id="instructionsLabel4" type="label" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Label>would trigger on packet:</Label></Field><Field alignWithControl="true" alwaysUseInDialogHeightCalc="true" fontColor="darkgray" fontSize="small" id="instructionsLabel5" type="label" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Label>0x01 0x08 0x00 0x04 0x00 0x7D 0x02 0x84 0x07 0x0F</Label></Field><Field alwaysUseInDialogHeightCalc="true" id="logRecentPackets" type="button" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Title>Write Recent Packets to Log</Title><CallbackMethod>logRecentPackets</CallbackMethod></Field><Field alignWithControl="true" alwaysUseInDialogHeightCalc="true" fontColor="darkgray" fontSize="small" id="logLabel" type="label" visibleBindingId="mode_matchBytes" visibleBindingValue="true"><Label>This will write the last 60 seconds of incoming packets to the Event Log Window. You can then copy/paste the packet you want to match into Match Bytes above.</Label></Field></ConfigUI> (string)
          Name : Incoming Command Received from Device (string)
          SortOrder : 0 (integer):

Image

Posted on
Wed Oct 28, 2020 4:22 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: finding things

I see, mine are simple triggers, no edit options..
So the methods are only called when in event configUI ?!

I guess I need to rethink


Karl

Posted on
Thu Oct 29, 2020 8:45 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: finding things

The methods are only called right before the plugin UI is presented (it's used at runtime to build the plugin's visual dialog). If there is no UI (i.e. no Edit Event Settings... button), then those methods will not get called.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 4 guests

cron