Plugin actions madness

Posted on
Fri Sep 13, 2013 2:36 pm
alistair offline
Posts: 109
Joined: Jul 14, 2006

Plugin actions madness

I know I'm doing something obvious wrong here. I've been staring at it for a while. I just cannot work out what it is.

My end goal is to provide three actions that have a config UI with a picker. The picker has content driven by the plugin.
My plugin *has no device types*.

However, Indigo shows the "Device" pick list for the action, and won't let me edit the action config without picking a device (and there are no devices).
What d****$ thing am I doing wrong? :)

Here's my actions.xml file:
Code: Select all
<?xml version="1.0"?>
<!-- If your plugin wants to add actions to the action step dialog that are independent
    of a device (devices define their own actions), define them here.
-->
<Actions>
    <Action id="lockDoor">
        <Name>Lock Door</Name>
        <CallbackMethod>lockDoor</CallbackMethod>
        <ConfigUI>
            <Field type="menu" id="where">
                <Label>Door</Label>
                <List class="self" method="doorListGenerator"/>
            </Field>
        </ConfigUI>
    </Action>
    <Action id="unlockDoor">
        <Name>Unlock Door</Name>
        <CallbackMethod>unlockDoor</CallbackMethod>
        <ConfigUI>
            <Field type="menu" id="where">
                <Label>Door</Label>
                <List class="self" method="doorListGenerator"/>
            </Field>
        </ConfigUI>
    </Action>
    <Action id="momentaryUnlockDoor">
        <Name>Momentarily Unlock Door</Name>
        <CallbackMethod>momentaryUnlockDoor</CallbackMethod>
        <ConfigUI>
            <Field type="menu" id="where">
                <Label>Door</Label>
                <List class="self" method="doorListGenerator"/>
            </Field>
        </ConfigUI>
    </Action>
</Actions>


Help! :)

-A

Posted on
Fri Sep 13, 2013 2:59 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Plugin actions madness

This works for me... No menu, no config, just the action.
Code: Select all
<?xml version="1.0"?>
<Actions>   
    <Action id="readApcupsd" deviceFilter="self.apcupsdServer">
        <Name>Update UPS States</Name>
        <ConfigUI>
            <Field id="apcupsdAction" type="textfield" hidden="true" defaultValue="readApcupsd" >
                <Label>This should be hidden</Label>
            </Field>
        </ConfigUI>
        <CallbackMethod>actionControlApcupsd</CallbackMethod>
    </Action>
</Actions>

Posted on
Fri Sep 13, 2013 3:40 pm
alistair offline
Posts: 109
Joined: Jul 14, 2006

Re: Plugin actions madness

The challenge is that I want the action config screen for the action, but there's no associated device (so being forced to pick a device before the config screen displays becomes a challenge :shock:)

Posted on
Fri Sep 13, 2013 5:34 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Plugin actions madness

I think Jay actually ran into this very buglet earlier this afternoon. We think it is a data caching problem in the Indigo client. So try quitting the Indigo client and relaunching it. Does the action then show without the device popup?

Image

Posted on
Mon Sep 16, 2013 2:09 pm
alistair offline
Posts: 109
Joined: Jul 14, 2006

Re: Plugin actions madness

Yep - after an unplanned reboot of my laptop (client) it's all fixed :)

I hadn't restarted the server or the plugin, so it's definitely a client issue somehow....

Thanks!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests