Was there a change in action callbacks?

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
berkinet
Posts: 3441
Joined: Tue Nov 18, 2008 2:08 pm
Location: Berkeley, CA, USA & Mougins, France

Was there a change in action callbacks?

Post by berkinet »

Odd thing. I have an action:

Code: Select all

<Action id="phDigitalOutOn">
  <Name>Control a Phidget Digital Output on a Standalone Phidget</Name>
  <CallbackMethod>phidgetOutputControl</CallbackMethod>
  <ConfigUI>
... ...
Under Indigo 5 the callback was defined as: def phidgetOutputControl(self, action, dev):
and it worked. I hadn't used that function in a while but today I got a report of an error. In testing I see that dev is passed as empty. It was not an issue since the devId I need is in the action props anyway. But, I was wondering if something changed, or is maybe broken?
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Was there a change in action callbacks?

Post by matt (support) »

It should be passing in the device instance. I just checked it with the EasyDAQ plugin's actions, and it was working as expected (dev instance was passed in).

Are you selecting the device in the main Action panel UI, or is the device popup defined in your plugin's action UI (XML)?
Image
User avatar
berkinet
Posts: 3441
Joined: Tue Nov 18, 2008 2:08 pm
Location: Berkeley, CA, USA & Mougins, France

Re: Was there a change in action callbacks?

Post by berkinet »

It's in the Action panel UI. Which means it would be passed in the action props, and it is. But, I know that previously I used dev.id to get the device number and it worked. I haven't touched that code in ages.

But, it certainly looks like the issue must be on my end, because the IOM can't pass a device it dopesn't know about.
Locked

Return to “Extending Indigo with Plugins and Python”