Z-wave Supervision updated guide?

I'm struggling to understand how Z-wave supervision should be handled by community drivers.

I've read the guide here from 2022:

And read more recent discussions here:
https://community.hubitat.com/t/2-3-9-x-z-wave-s2-supervision-encapsulation-c-7-and-up/138319
and

Also since 2022, the Command-Retry feature was added so it can potentially conflict with supervised events getting re-sent.

Some context:

What I'm doing is when the SupervisedReport is successful, I pass the session cmd as a zwaveSupervisedEvent()

That is then handled in the driver for a custom action:

I'm not really dealing with "re-sending a packet" if it fails... @bcopeland is this something that has changed since 2022? Is this done automatically now?

The only part that has changed is that ZWaveJS handles all the supervision and other encapsulations automatically. So if you use ZWaveJS it's not needed at all. But if the drivers are used with hubs that aren't on ZWaveJS then supervision is recommended, but not required except on received packets.

If you aren't re-sending then there is no point in using outbound supervision.

It's the only way I get the driver to work :slight_smile:
When I don't use supervision, and encapsulate the command without supervision :

I get a SupervisionGet with the SwitchBinaryReport at value:255

Notice the endpoint is 0 but that's not what I sent, should be endpoint 1.

String switchBinarySetCmdTest(Integer value, Integer ep=0) {
    if(state.supervise) {
        // works
        return secureSupervisedCmd(zwave.switchBinaryV1.switchBinarySet(switchValue: value), ep)
    }
    return secureCmd(zwave.switchBinaryV1.switchBinarySet(switchValue: value), ep)
}

The secureCmd() seems to trigger a SupervisionGet() and I get endpoint 0....

String secureCmd(String cmd) {
	return zwaveSecureEncap(cmd)
}
String secureCmd(hubitat.zwave.Command cmd, ep=0) {
    sCmd = zwaveSecureEncap(multiChannelEncap(cmd, ep))
    return sCmd
}

The SupervisionGet is the device sending the hub a supervised transmission, this will happen regardless if you are using outbound supervision or not.

Are you saying that if you use outbound supervision then the response is on the correct endpoint (1)? Could be a firmware bug on the device itself in that case.

I think I see some of my code in there :wink: , or at least based off my code.

When I use a supervised command for relay 3 / endpoint 3:

I get a SupervisionReport for that command so I know it was succesful.

When I don't use supervision, just multiChannelEncap for endpoint 3. The device is sending SupervisionGet but for endpoint 0.

I am using your code here from the Zen16 :slight_smile:

The relay is: Firmware Version 1.04

I guess I can try 1.20

I think maybe you need to set a multichannel lifeline association, group 1, set to node 1:0
Some of the devices will behave different if its a single channel lifeline on a multichannel device. The hub will set a standard lifeline when the device is paired but I have all my drivers confirming and fixing it if needed (set to multichannel for MC devices).

You could try switching to my driver and running configure to set the lifeline if you want.

I could test it on my driver but I am fairly certain you will see two differences:

  • Without outbound supervision, the report response should be MC encapsulated with the correct endpoint, as well as supervisionGet encapsulated. It would have to have the endpoint in there or my driver would never work.
  • With outbound supervision I think you will see an additional binaryswitch report coming in (with MC and supervisionGet) along with the supervision response.

My driver does not do outbound supervision so the second bullet is an educated guess.

Thanks! I will look into this. My plan with associations is to expose them in the data section for each driver similar to what I think you did for Config Vals.

Then use an 'Association' app to change associations between devices.

You would not normally expose group 1 though, that is the lifeline association.

Inovelli already has an app they made. You just need to have the correct functions in the driver for it to work with it. It does not implement multichannel associations though. At one time they said I could fork it and add that feature myself if I wanted.