IMO, .enable() and .disable() are a security risk; being able to turn an arbitrary plugin on or off from Python is too dangerous. I don't think that .enable() and .disable() should be made available. However, a plugin developer could effectively add this feature to an individual plugin without too much difficulty (on/off being different than enabled/disabled).
For the OP, you might be able to do what you want using a derivative of this script which enables/disables Indigo devices. I don't believe that HKB has the facility to enable/disable devices through a plugin action, but you could create two custom actions using each bit of the script to turn on/off HKB server devices.
- Code: Select all
# To disable all plugin devices
for dev in indigo.devices.iter("com.eps.indigoplugin.homekit-bridge"):
indigo.device.enable(dev, value=False)
# To enable all plugin devices
for dev in indigo.devices.iter("com.eps.indigoplugin.homekit-bridge"):
indigo.device.enable(dev, value=True)
# To disable a single device
dev = indigo.devices[369921985]
indigo.device.enable(dev, value=False)