I have noticed two plugin oddities lately and was wondering if theses were issues to be addressed or "normal":
1) When a plugin needs to update multiple device states, as in:
- indigoDevice.updateStateOnServer(key='state1', value='foo')
indigoDevice.updateStateOnServer(key='state2', value='bar')
The two updates are done sequentially. This has the, apparent, side-effect of causing Indigo to send out two calls to
deviceUpdated() for plugins that implement
indigo.devices.subscribeToChanges(). In the first update state1 has the new value and state2 its old value, then in the second update both states have their new value.
The problem, at least in the Group-Trigger plugin, is that this requires extra processing to determine which states have changed (compare oldDev to newDev). No big deal, but, it would be nice, for a variety of reasons, to be able to do atomic state updates like:
- indigoDevice.updateStateOnServer(key='state1', value='foo';key=state2, value='bar')
2) In PluginConfig.xml the field id
showDebugInfo seems to have at least one magical quality. The defaultValue seems to be locked to
false. In the case of the Master-Sprinkler plugin, I wanted to give users a range of logging detail: None, Normal, Verbose & Debug. So, I used a menu. But, since the value for this field id cannot be set, I could not set the default to None, The pulldown always shows --No Selection.
I worked around the issue by changing the field name, and I am not sure it is even a bug... But, was this intended?