Hi Karl,
kw123 wrote:1. does dev.replaceOnServer() include dev.replacePluginPropsOnServer(props)
replaceOnServer() replaces the entire device instance, which includes everything except states which are merged back in post-replace by the Indigo Server. However, practically speaking you need to use
replacePluginPropsOnServer if you change any of the values inside the properties dict. That is because there is no way to modify the plugin properties on a plugin instance except by using that method. Whenever you use
dev.pluginProps you are getting a copy (not a reference) of the pluginProps. So for example
dev.pluginProps["foo"] = 123 doesn't do anything.
In summary, use
replaceOnServer when you modify an attribute of the device instance (dev.name, dev.description, etc.) and use
replacePluginPropsOnServer to update the plugin properties dict.
kw123 wrote:2. are both required when changing both
See answer to Q1 above.
kw123 wrote:3. does props ( dev = ... & props=dev.pluginProps) has to be refreshed after a dev.replaceOnServer()
No, I believe everything will still be in-sync immediately after the
replaceOnServer() call (until something else modifies a property, state, etc.).