PAXControlCreationError

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Thu Aug 01, 2013 9:31 pm
Dog offline
User avatar
Posts: 2
Joined: Aug 01, 2013

PAXControlCreationError

I'm currently trying to write my first plugin for a custom device.

When trying to edit the settings for an action, Indigo throws this message in the event log:

Error (client) dialogForActionId() caught exception: PAXControlCreationError -- Controls must have a UNIQUE id attribute.


Here is the code from my Actions.xml file:

Code: Select all
<Actions>
   <Action id="changeVolume" uiPath="DeviceActions">
      <Name>Audio Volume</Name>
      <CallbackMethod>setVolume</CallbackMethod>
      <ConfigUI>
          <Field type="label">Set the volume</Field>
         <Field type="separator"/>
          <Field id="volume" type="textfield" defaultValue="-100">
                <Label>Volume:</Label>
            </Field>
      </ConfigUI>
   </Action>
</Actions>


The error seems to claim that my action ids are not unique.

According to the notes for the id attribute of Actions.xml here: http://www.perceptiveautomation.com/wik ... ugin_guide
This is a unique id for the event in this Actions.xml file.


Parsing through my code, the only action id seems to be changeVolume.

This leaves me unsure what the problem is. Any ideas?

Posted on
Thu Aug 01, 2013 9:45 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: PAXControlCreationError

The error is a bit misleading here, but by Controls it means Fields. So give each Field (including label and separator) a unique id attribute and it should work.

Image

Posted on
Thu Aug 01, 2013 10:48 pm
Dog offline
User avatar
Posts: 2
Joined: Aug 01, 2013

Re: PAXControlCreationError

Okay, so the problem with my code segment is that I needed to change

Code: Select all
<Field type="label">Set the volume</Field>


to

Code: Select all
<Field id="random" type="label">Set the volume</Field>



Thanks.

Posted on
Thu Aug 01, 2013 11:00 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: PAXControlCreationError

Yes. The separator field should have an id as well. It might let you get away without assigning one, but you'll get the error if you add another separator.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest