Are they contained for the attributes ’ voltageMeasurement 'and ’ currentMeter ’ in edgeDriver?
I added them in my driver, but the error is reported while compiled(for zwave type). Or did I make a spelling mistake?
I am aware of
voltageMeasurement as a stock capability but
currentMeter is a new one on me.
For yours and others’ reference, you can take a look at the documentation to see the official SmartThings capabilities’ names here: Production Capabilities | Developer Documentation | SmartThings
If you’ll certify your device as Works With SmartThings only those capabilities are accepted.
Also, if you take a look at the SmartThings Lua libraries for Edge (here), you’ll see in this path those capabilities that can be called using
capabilities.capabilityId after importing
Thanks! I have add the Z-Wave Capability “voltageMeasurement” into my edgedriver and showed the voltage value correctly.
And there is no Z-Wave Capability for power current, which is supported on hubitat.
Strangely, there is no Z-Wave Capability “voltageMeasurement”, but there is no problem with using the Capability.
What do you mean by this?
That capability is included in the path
...\lua_libs-api_v5\st\zwave\defaults which is where you can find the default handlers for the events related to this capability, from SmartThings and from the physical device.
It is also included in the Lua libraries in the path
Yes, you are right! I found the file …\lua_libs-api_v5\st\zwave\defaults\voltageMeasurement.lua.
I did not find it in the documents: \lua_libs-api_v5_48X\docs.
Ah ok, I’ll report that. Thank you for sharing.
I have created my own capability(Custom Capabilities), but I do not known how to use it in my edgedriver. Where can I read the docs about it? Or where can I read a simple example about it?
The docs about it in the \lua_libs-api_v5_48X\docs:
After you create your custom capability, you can “call” it in your driver as shown in this line of the sample driver about a custom capability:
Below that same file (here), it’s how you would have to define its handlers since there are no defaults for them.
Note: The files in the folders of “presentation” and “capabilities” are for developers’ reference, they don’t need to be included in the driver.
There are no specific docs about this but the syntax required is similar to the one used with standard capabilities in the case of handlers or how you call it.
We normally use
capabilities.capabilityId with the standard ones because they already belong in the library and with custom capabilities we use the format
capabilities["capabilityID"] instead. Consider that the ID of a custom capability includes its namespace.