PAXControlCreationError

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
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
User avatar
Dog
Posts: 2
Joined: Thu Aug 01, 2013 8:39 pm

PAXControlCreationError

Post by Dog »

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?
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: PAXControlCreationError

Post by matt (support) »

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
User avatar
Dog
Posts: 2
Joined: Thu Aug 01, 2013 8:39 pm

Re: PAXControlCreationError

Post by Dog »

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.
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: PAXControlCreationError

Post by matt (support) »

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
Locked

Return to “Extending Indigo with Plugins and Python”