Odd Behavior under v5.1.7

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
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

Odd Behavior under v5.1.7

Post by bschollnick2 »

Matt and Jay,

I'm noticing some real odd behavior here with a plugin. It appears that for some reason deviceStopComm and deviceStartComm are being called, and I don't see any reason for this.

Removing _Test Reader
Processing Device - _Test Reader

The Processing Device line is the first line in deviceStartComm...
The Removing line is in the StopComm...

Is there any reason that Indigo would be triggering these Removals and Adds? There is plenty of updateStateOnServer calls, but nothing that should be able to remove and add a device...

Okay, further investigation leads me to this function...

def update_device_property ( self, dev, propertyname, new_value = ""):
newProps = dev.pluginProps
newProps[propertyname] = new_value
dev.replacePluginPropsOnServer(newProps)
return None

I am assuming, that the dev.replacePluginPropsOnServer, does this? Effectively calling DeviceStartComm and DeviceStopComm?

Can you confirm this? And is there a way to work around that?
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Odd Behavior under v5.1.7

Post by matt (support) »

You need to override didDeviceCommPropertyChange(). Search on it on the plugin guide wiki for the details.
Image
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

Re: Odd Behavior under v5.1.7

Post by bschollnick2 »

matt (support) wrote:You need to override didDeviceCommPropertyChange(). Search on it on the plugin guide wiki for the details.
I've never run into this before...( Interesting... )

Thanks for the quick response...

- Ben
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33
Locked

Return to “Extending Indigo with Plugins and Python”