zwave-js / node-zwave-js

Z-Wave driver written entirely in JavaScript/TypeScript
https://zwave-js.github.io/node-zwave-js/
MIT License
755 stars 613 forks source link

[Bug]: Second Endpoint of Zooz ZEN30 double switch not listed in Target Endpoint dropdown of New Association dialog #4715

Closed laheym closed 2 years ago

laheym commented 2 years ago

Checklist

Deploy method

Docker

Zwavejs2Mqtt version

6.12.0

ZwaveJS version

9.3.0

Describe the bug

Zooz ZEN30 double switch has two target endpoints (one to control the dimmer circuit and one to control the dry relay). This has been confirmed over email by Maggie at Zooz. However, zwavejs2mqtt GUI only lists a single target endpoint (0 - which controls the dimmer circuit) when creating a new group association .

To Reproduce

1) Include Zooz Zen30 double relay 2) Create new group association using a different node 3) Select Zen30 as Target Node 4) Target Endoint dropdown only lists No Endpoint and Endpoint 0 Node58_to_Node62

Expected behavior

Target Endpoint dropdown for Zen30 should include No Endpoint, Endpoint 0 (for dimmer) and Endpoint 1 (for dry relay)

Additional context

To assist debugging I have performed the following procedure

  1. delete container / clear logs / power cycle host / pull latest image / build new container
  2. include the following new nodes
    • Node 58 - ZSE44 (had to try inclusion twice due to #zwave-js/node-zwave-js/issues/4703)
    • Node 59 - ZEN72
    • Node 61 - ZEN30 with 3.10 fw
    • Node 62 - Zen30 with 3.0 fw test-setup nodes
  3. attempted to add a new group association from each node to both versions of the Zen30s. In every combination, the Target Endpoint dropdown lists No Endpoint and Endpoint 0
  4. created various group associations between the on-off switch, dry relay switch (of the other zen30) and dimmer (of the other zen30). I tried setting Target Endpont = No Endpoint and = Endpoint 0. On testing, only the dimmer circuit is of the target zen30 is controlled.

logs.zip

AlCalzone commented 2 years ago

Zooz ZEN30 double switch has two target endpoints

It only reports a single endpoint in the interview though:

2022-06-14T20:50:30.628Z DRIVER « [Node 062] [REQ] [BridgeApplicationCommand]
                                  │ RSSI: -63 dBm
                                  └─[Security2CCMessageEncapsulation]
                                    │ sequence number: 97
                                    └─[MultiChannelCCEndPointReport]
                                        endpoint count (individual): 1
                                        count is dynamic:            false
                                        identical capabilities:      false
                                        endpoint count (aggregated): 0

Endpoint 0 is the root device (the node itself), which per the specs provides access to a subset of the functionality of the real endpoints, but is also often used to control all of them at once (e.g. for multi-channel relays).

I would assume that endpoint 1 is the relay and (the here non-existent) endpoint 2 the dimmer (or vice versa)?

In the past, devices often used endpoints unnecessarily, e.g. 1 = temperature sensor, 2 = humidity sensor, etc. although all of that information would also be provided on the root device. So in order to hide these unnecessary values that tend to confuse users and raise questions, Z-Wave JS has a heuristic when to ignore endpoints altogether. This happens when all of the endpoints have different device classes, i.e. provide entirely different functionality.

We can prevent this through a compat flag, but I need to be sure we're actually talking about endpoints 0+1 (which would be a weird choice IMO) and not 1+2.

laheym commented 2 years ago

Zooz ZEN30 double switch has two target endpoints

It only reports a single endpoint in the interview though:

I've notified the Zooz developers of this discrepancy. Hopefully we will get more information soon.

AlCalzone commented 2 years ago

This should be fixed by #4736

To test, follow the instructions at https://zwave-js.github.io/zwavejs2mqtt/#/device-support/custom-device-files

you'll need these files in the custom config folder:

The 2nd and 3rd go into a new subdirectory templates if that was not obvious.

Don't forget to re-interview the device.

laheym commented 2 years ago

hey AlCalzone, sorry for the delay testing the fix. unfortunately #4736 did not work as expected. I installed the custom config as directed, and reset the container.

I then tried to reinterview node 72, but it got stuck on protocolinfo. So... I tried to exlcude the node, but it stubbornly refused to be exclduded. Eventually, I disconnected power to the device and used remove failed node. I then factory reset the device and tried to do a manual inclusion (as Node 73). Now it is stuck at NodeInfo.

logs attached

zwavejs2mqtt-store (12).zip

laheym commented 2 years ago

it seems that after the update, zen30 is now suffering from the same issue as #4585. I applied #4595 and now the interview works.

the additional endpoints are showing now.... but it's still not quite right. I can make associations to Endpoint 1 (which I presume to be the relay), but when I activate the switch/sensor with associations, the relay doesn't respond. Associations to Endpoint 0 (the dimmer) works as expected. I am not sure if this is a zwavejs problem or a zooz problem though?

updated config file (with #4595) attached

zwavejs2mqtt-store (13).zip

AlCalzone commented 2 years ago

I'm in contact with them anyways, I'll ask about the association issue. Can you show how you defined the association?