Custom capabilities for a driver

Both versions work, the only thing is that using the sample of the repo, you need to reboot the Hub after joining/installing the device once. Then, every time you uninstall and install the device again, this error should not appear.



When we change the custom capability presentation, we must generate the device-config again, this is because it compiles the capability presentation of each element defined there.

Instead of creating a new capability, you need to:

  • Verify that your presentation is using the latest version of each capability presentation:
smartthings presentation vid [-j or -y]
  • If it’s using the previous version of the capability presentation you recently changed, use the same device-config input file (this way the VID won’t change) and create it:
smartthings presentation:device-config:create -i dev-config.json //or yaml
  • Verify again the presentation, if now everything is up-to-date but you still don’t see the change in the app, you can:
    • Close and open the ST app. This updates the devices too.
    • Clear the ST app cache from your mobile device settings:
      settings > apps > SmartThings app > storage > delete cache
    • Uninstall and install the device again.
    • Wait for the automatic refresh (every 12 hours)

This workaround is easier than creating a new capability because:

  1. You need to replace the previous ID with the new one in different places (device profile or metadata, device-config, etc.)
  2. At some point, you’ll have a lot of duplicated capabilities and some will never be used.

You can also try to package the driver again with this command:

//Replace <id> for the corresponding ID
smartthings edge:drivers:package /driver-path --channel <id> --hub  <id>