Associations in Edge drivers?

I’m relatively to writing SmartThings drivers. I’ve installed Groovy drivers, but never written one. I’m currently diving into Edge drivers. I’ve written at Edge driver for Zooz SEN31 RGBW dimmer, and working on a driver for Zooz ZEN32 Scene Controller. Both are basically working. I can write rules to have the ZEN32 turn the ZEN31 on/off, etc. But I want the KEY_HELD_DOWN, KEY_RELEASED notifications to dim the ZEN31. But there looks like there is no way for a rule to a SwitchLevelChange command.

As an option, I thought I would set an Association dimmer control for the ZEN32 and use Z-Wave direct associations for the dim functionality. I added code to my ZEN32 Controller to set associations, and it works for setting associations for Groovy devices since I can find the node_ids in the Groovy IDE. But there are no node_ids listed for Edge devices.

How can I find the Z-Wave node ID for an Edge device?

Or/And how are Associations suppose to work in Edge devices/driver?

A little back history. Why I wanted a custom driver for the Zooz ZEN31 RGBW Dimmer. Two reasons: 1) use Edge driver for local control, and 2) I wanted to control RGB and WHITE separately.

So ZEN31 Edge driver have three components: main, white, and rgb. rgb has a switchLevel and colorControl. White has a switchLevel, and main has a switchLevel, switch, and powerMeter. So main is the master with the switch and master switchlevel, while white and rgb are subs with their own controls.

1 Like

Tagging @nayelyz

Welcome to the SmartThings Community, @WaynesWorld!

Can you provide more details about this part, please? I couldn’t find a specific reference to them in the technical sheet of the device:
https://products.z-wavealliance.org/products/3720

what do you mean by rule? do you want to receive messages from the device when this command is triggered?

I will check with the engineering team if associations are supported in Edge, also about getting the node ID.

Thank you for tagging me, @JDRoberts

1 Like

For the KEY_HELD_DOWN and KEY RELEASED, I was referring to the Z-Wave NOTIFICATIONS from the the ZEN32 Controller. Which get mapped to the “Held down” and “Held” events that can trigger rules. Which I thought could initiate a starting level and stop level change command (Z-Wave SwitchLevelChange command) for the ZEN31 dimmer. But no such stop/stop rule commands.

https://developer-preview.smartthings.com/edge-device-drivers/zwave/generated/SwitchMultilevel/StartLevelChange.html

Using the CLI, run

smartthings devices <your device id> -y 

Z-wave node ID is buried in the data that shows up.

I have a driver in my GitHub if you want a starting point.

1 Like

Association is a solid plan for this.

I have a similar situation, though I can’t go the association route. My zen32 controls two ZigBee RGBW bulbs. Ideally I’d like to use the left pair of buttons as dim up/down for one bulb, and the right for the other. The solution I have in mind is to add two switch level capabilities to the zen32 driver, and use the held/released events to set level there, then use rules to have the bulbs mirror switch level off the zen32. Haven’t gotten around to it yet, but pretty sure it’ll work.

philh30, Thank You! I found the networkID using your suggestion “smartthings device -y” and hard coded the ids just to try. And it worked. Didn’t realize the the YAML (-y) option shows so much more info. And thanks for the link to your ZEN32 driver. I’ll have to take a look. Learning so much and figuring out how all this works. And so many ideas…

3 Likes

@philh30 if you are using Mariano’s Zigbee Light Multifunction driver, you can achieve what you want. I have two CCT lights on Zen32, and I am using main button to toggle on and off both bulbs, and left side buttons for dimming level, and right side buttons for White Temperature control. It works like a charm.
You could program left side to increase/decrease Level for one bulb and right for second bulb, and program same buttons “on hold” to to increase decrease White Temperature

Any update on how z-wave associations will work in Edge?

Hi, @William_Knecht!

In the Edge reference, we can see the commands for associations and multi-channel associations.
Also, in some stock drivers we can see the usage of those commands:

Are you developing an Edge driver?

No I’m not developing drivers I was just wondering how to do this with my devices. I see now with some devices I’ve paired with drivers, there’s an ability to add associations. Is the primary way this will be accomplished via the driver?

I guess you’ve seen the option to create associations in Community-provided drivers, right?
There isn’t a page in the ST app by default that helps you configure all kinds of Z-Wave associations. We have seen others have used SmartApps in the past for this purpose and now, Edge drivers (through the settings page or custom capabilities). So, only those drivers configured to allow setting Associations will help you.

Is there A reason this isn’t going to be an official feature? Most certified Z wave hubs these days do have a standard page in their UI which allows you to query any device for its parameters and association groups and then to set them. They also allow you to create central scenes if the device supports that. It’s just such a surprise to see a feature which is a standard part of the independent third-party zwave specification be missing from the SmartThings UI. :thinking:

Hi @William_Knecht

You can try this driver to Zwave configure parameters and sssociation groups

I haven’t been able to fully test it as I don’t have enough zwave devices to work properly with associations

2 Likes

Sorry, I can’t help you further. I don’t have information about features in the app. I just mentioned it doesn’t exist but I don’t know if it will be added or not. I suggest you contact the SmartThings Customer Support team to ask about this or make a request to have a feature that helps you create associations with any device.

2 Likes

Worked perfectly as far as I can tell so far. Thanks!

One thing I wasn’t super clear on is if you can comma delimit multiple associations at once. But in any case doing one association at a time worked perfectly.

Hi @William_Knecht

You have to do the association one by one, but it is very easy.
You simply change the node number and/or endpoint number, select “Set” again and click execute action.