I have just gone through the 92 posts of ‘Custom Capabilities for a driver’ and it seems like it would be very helpful if the process was summarised into a concise set of steps that specify the CLI commands and the files that need to be created to add a custom capability and a custom device presentation. (Specifically for the edge driver scenario)
I appreciate the process is evolving, however, even noting the ‘work arounds/expected to change in the future’ would also be helpful. We could even keep the post updated
If There is a better thread for me to work through, please point me in the right direction
Here is the beginning (I am reasonably confident this is correct)
To create <namespace.newCapability> and use in a new edge driver
Add the capability to the profile.yml in your driver (and elsewhere in your driver as necessary). That’s usually enough, but if you need something special like a multi-attribute dashboard or visible conditions then create a device configuration and add the resulting vid and mnmn to your profile.yml.
The steps you shared above to use a custom capability in a driver are not needed anymore. This means you don’t have to create the JSON file, the Hub doesn’t expect the capability from a file.
There was an issue where the capabilities weren’t found and that’s why we needed to include them from a file.
In a driver, you can just reference it as follows:
local capabilityVar = capabilities["your_namespace.capabilityId"]
Yes, you still need to create all the configurations using the API (the CLI helps you with this)
The Device presentation (device-config) is not mandatory, it’s only used when you need a special configuration as Phil said.
Yes, this is updated. (thank you @philh30 for sharing them )
The only comment I can add is:
Editing the translation of the capability (or creating a new one for another locale/language) is needed if you want to modify the labels that appear for the capability. This is something recent, that’s why the documentation isn’t very clear, I already reported that.