Device Driver "Capability" Question

I'm using an ST generic Zwave dimmer to learn on and "customize" it for my linear WD500Z-1 dimmer switch.

I have read the ST documentation many times and cannot find the purpose of the capability section in the metadata. One entry is especially confounding "Health Check" as I can find no other reference to it and it does not appear anywhere else in the code.

Any help would be appreciated.

Thanks
John

The capabilities section defines what standard device attributes and commands are implemented within a device. This allows Apps to know exactly what to expect from each device. Apps also use capabilties to query lists of devices that support a specific capability.

Here is the documentation. But be warned, ST has been making numerous changes lately to these documents, so consider them a guideline as to what capabilities exist. Also, Hubitat has not implemented all of these capabilities.

http://docs.smartthings.com/en/latest/capabilities-reference.html

Oh, and far as "Health Check" is concerned, just remove it from Hubitat Drivers as I do not believe that capability is supported. On ST, it has probably caused more issues that it has solved. It was intended to help notify users if one of their devices had stopped responding (e.g. dead battery.)

3 Likes

@ogiewon

Thanks for the response, however I kind of understood what the document says. What I don't get are the implications for including them (or deleting them).

For instance, on my simple dimmer switch example, I can comment out Capability "light" and every thing I know to check still works (on, off, refresh, set level).

I was also thinking the inclusters carry some of the same information.

Hence my confusion.

Thanks
John

Capability "Light", "Bulb", and "Switch" all implement the exact same commands (on, off) and have the same attribute (value). So, those three are somewhat redundant.

I would recommend you stick with just "Switch".

In Hubitat, when you add a capability to a driver, its commands are automatically exposed as web page buttons and text boxes (for arguments) in the device's web page. The attributes are also displayed on that page, once they have received an initial value.

Custom Attributes and Commands can also be added, however you pretty much need custom Apps in order to use them. When adding custom Attributes and Commands, you have to explicitly declare them as well in the metadata section of the driver (along with capabilities.)

You're learning quite a bit, very quickly! Many of us have been ST users since ~2014, so much of this information we just take for granted.

Hi Dan,

Thanks for the info on the redundant capabilities. I was able to test each capability and (as you know) I found each creates a button(s) in the device page and options in the rules machine. Left on my own it would have taken me a looooong time to sort that out.

I still have a long way to go but you helped me a lot.

Regards
John

In regards to light, bulb, outlet and switch specifically, here the four of them are synonymous from a functional perspective, and the primary distinction being the ability to filter them by type within apps.

Hi Mike,

Cool. Thanks for the clarification.

John