enable/disable and deviceStartComm/deviceStopComm

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
Sat Jul 14, 2012 2:47 pm
bcall offline
Posts: 59
Joined: May 17, 2012

enable/disable and deviceStartComm/deviceStopComm

I'm trying to track down some unexpected behavior in my plugin. I thought that deviceStopComm was called for a device when that device is disabled in the Indigo UI, and deviceStartComm was called when the device is enabled in the Indigo UI. However, enabling/disabling seems to be calling deviceUpdated (as I expect) but not deviceStartComm or deviceStopComm. I can write some additional code to deal with this, but I wanted to make sure there isn't something else going on. Should deviceStopComm get called when a device is disabled, and deviceStartComm when it is later enabled?

Thanks

UPDATE:

My bad! I overrode deviceUpdated() without implementing the checks for changes to the device Comm properties!
For anyone who might be interested:
Add:
indigo.PluginBase.deviceUpdated(self, origDev, newDev)
To:
deviceUpdated() as defined in my plugin
and everything is good again.

:)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest