# For the default capabilities in edgeDriver

**URL:** <https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660>\
**Category:** Writing Edge Drivers\
**Tags:** developers\
**Created:** [July 1, 2023, 8:55am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660 "2023-07-01T08:55:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenjun](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@chenjun](https://community.smartthings.com/u/chenjun)\
**Post date:** [July 1, 2023, 8:55am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/1 "2023-07-01T08:55:25Z")

</div>

Hi,All:  
Are they contained for the attributes ’ voltageMeasurement 'and ’ currentMeter ’ in edgeDriver?

---

<div class="post-metadata">

**Author:** ![chenjun](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@chenjun](https://community.smartthings.com/u/chenjun)\
**Post date:** [July 1, 2023, 8:57am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/2 "2023-07-01T08:57:33Z")

</div>

I added them in my driver, but the error is reported while compiled(for zwave type). Or did I make a spelling mistake?

---

<div class="post-metadata">

**Author:** ![orangebucket](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/orangebucket/32/81590_2.png) [@orangebucket](https://community.smartthings.com/u/orangebucket)\
**Post date:** [July 1, 2023, 6:54pm UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/3 "2023-07-01T18:54:20Z")

</div>

> [@chenjun](#):
>
> I added them in my driver, but the error is reported while compiled. Or did I make a spelling mistake?

I am aware of `voltageMeasurement` as a stock capability but `currentMeter` is a new one on me.

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [July 3, 2023, 2:19pm UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/4 "2023-07-03T14:19:14Z")

</div>

> [@chenjun](#):
>
> Are they contained for the attributes ’ voltageMeasurement 'and ’ currentMeter ’ in edgeDriver?

Hi, @chenjun  
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](https://developer.smartthings.com/docs/devices/capabilities/capabilities-reference/)

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](https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/releases)), you’ll see in this path those capabilities that can be called using `capabilities.capabilityId` after importing `st.capabilities`:

```auto
...\lua_libs-api_v5\st\capabilities\generated

```

---

<div class="post-metadata">

**Author:** ![chenjun](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@chenjun](https://community.smartthings.com/u/chenjun)\
**Post date:** [July 4, 2023, 2:23am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/5 "2023-07-04T02:23:07Z")

</div>

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](https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/releases) is no Z-Wave Capability “voltageMeasurement”, but there is no problem with using the Capability.

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [July 5, 2023, 12:22am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/6 "2023-07-05T00:22:18Z")

</div>

> [@chenjun](#):
>
> Strangely, [there](https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/releases) 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 `...\lua_libs-api_v5\st\capabilities`

---

<div class="post-metadata">

**Author:** ![chenjun](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@chenjun](https://community.smartthings.com/u/chenjun)\
**Post date:** [July 5, 2023, 12:45am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/7 "2023-07-05T00:45:47Z")

</div>

😂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.

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [July 5, 2023, 1:05am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/8 "2023-07-05T01:05:41Z")

</div>

> [@chenjun](#):
>
> I did not find it in the documents: \lua\_libs-api\_v5\_48X\docs.

Ah ok, I’ll report that. Thank you for sharing.

---

<div class="post-metadata">

**Author:** ![chenjun](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@chenjun](https://community.smartthings.com/u/chenjun)\
**Post date:** [July 5, 2023, 1:15am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/9 "2023-07-05T01:15:01Z")

</div>

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:

 ![1688519625967](https://global.discourse-cdn.com/smartthings/original/3X/e/4/e4f0cb96264737150d04b984325eda54de7df9f7.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [July 5, 2023, 1:20am UTC](https://community.smartthings.com/t/for-the-default-capabilities-in-edgedriver/265660/10 "2023-07-05T01:20:47Z")

</div>

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:

> <https://github.com/SmartThingsDevelopers/SampleDrivers/blob/main/custom-capability/src/init.lua#L7>

Below that same file ([here](https://github.com/SmartThingsDevelopers/SampleDrivers/blob/main/custom-capability/src/init.lua#L55)), 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.
