Custom capability changes not updating quickly

How long does it take for a capability update to be recognized by a driver that uses it? I’ve noticed that if I update my capability with new commands, it can take a significant amount of time before I’m able to reference that capability command in my driver code. It will tell me that the command value is nil, i.e. myCustomCap.commands.myCommand will be nil despite it being updated when using the SmartThings CLI to retrieve the latest capability JSON.

The steps I take to update the capability are:

  • Create the Yaml file
  • Run smartthings capabilities:update -y -i PATH_TO_MY_YAML
  • Add code in my driver to reference the new command in the Yaml file
  • Build and install and try to run in the SmartThings app on my phone
  • Error occurs

I have also tried a combination of uninstalling the driver and reinstalling it after making capability changes, un-enrolling/re-enrolling to the channel, to no avail.

Hi @kevin.k it takes some time to see the updates reflected. these are some workarounds

  1. Create a new capability with the same configuration (except for the name, it must be different), then replace the old capability with that one in your profile, that way you can see the change you made faster.
  2. Delete the driver package, update the “package key” value, and build the driver package again
  3. Wait two hours after updating your capability and then, reboot the hub