Info related to st-schema Discovery callback

From the documentation @ Interaction Types Reference | Developer Documentation | SmartThings, it is not clear on the below things

  1. When to be used - on device addition/removal from third party cloud?
  2. No option to specify device addition/update/deleted in the payload?
  3. Will there be a staterefresh request on sending DiscoveryCallback?


Hello @prakash_m,
I’m not sure if this is what are you trying to ask in 1 and 2. But this is what I have:
DiscoveryCallbacks are only adding new devices and updating existing devices and if a device is deleted in your cloud the expectation is that a command response, including stateRefreshResponse have a deviceError for that device specifying that it has been deleted.

Regarding point 3. Yes, a discoveryCallback will trigger a stateRefresh as the discovery reports new devices that are being added for which we need to get states for.
Hope this may help you.