Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Bticino / Legrand K4003C/L4003C/N4003C/NT4003C #7973

Open
CodeForLove83 opened this issue Sep 11, 2024 · 21 comments
Open

Switch Bticino / Legrand K4003C/L4003C/N4003C/NT4003C #7973

CodeForLove83 opened this issue Sep 11, 2024 · 21 comments

Comments

@CodeForLove83
Copy link
Contributor

CodeForLove83 commented Sep 11, 2024

Hi,

unfortunately the device cannot successfully pair with z2m. A few of them complete with success but many others, with the same firmware version, does not complete. z2m completes interview and configuration but then the light on the device is red and after a few seconds become unresponsive and is not possibile to refresh interview/configuration or publish any Zigbee message.

Pairing with Legrand Gateway and Deconz complete with success and the devices can operate without any issue.

I guess fixing Legrand pairing with this device will fix also other issues, that I have and read in other posts, related to Legrand devices (e.g., shutter).

Digging into the problem I noticed there's an issue in handling attribute 0xf000 during pairing, but even with the fix this is not a solution (link).

@Koenkk can you help me here?
Attached you can find Wireshark pcaps of deconz (success) e and z2m (failure).
Archive.zip
If you need I can sniff traffic with Legrand gateway.

Thanks for your precious support.

@Koenkk
Copy link
Owner

Koenkk commented Sep 12, 2024

What the network key for the Deconz sniff?

@CodeForLove83
Copy link
Contributor Author

What the network key for the Deconz sniff?

45:60:60:af:e5:86:d3:d0:ab:26:2e:ae:f2:bf:2c:e8

@Koenkk
Copy link
Owner

Koenkk commented Sep 13, 2024

For some reason, with Deconz it does the read to a Legrand device, with z2m it doesn't do the read at all:

Screenshot 2024-09-13 at 13 49 16

Does it help when only permitting join on a Legrand device when joining it to z2m?

@CodeForLove83
Copy link
Contributor Author

It doesn't work.
The only thing I haven't tried yet is resetting the coordinator and the network, basically starting from scratch. Not sure it makes any sense.
Do you have any suggestion?

@Koenkk
Copy link
Owner

Koenkk commented Sep 15, 2024

Could you check if the issue also happens with z2m 1.34.0? (Koenkk/zigbee2mqtt#22734 (comment))

@CodeForLove83
Copy link
Contributor Author

Hi @Koenkk, I need to google to find an easy way to downgrade without backup. If you already have the solution, please share :D Conversely, I need to install and configure z2m without HA to test it.

@Koenkk
Copy link
Owner

Koenkk commented Sep 16, 2024

I think it would be the easiest to setup z2m on a laptop, follow e.g. https://www.zigbee2mqtt.io/guide/installation/01_linux.html

@CodeForLove83
Copy link
Contributor Author

Could you check if the issue also happens with z2m 1.34.0? (Koenkk/zigbee2mqtt#22734 (comment))

Hi @Koenkk, unfortunately it doesn't work :( same as latest version. It unpairs right after successful configuration.

Any idea?
Next week I'll try sniffing pairing with legrand gateway.

@Koenkk
Copy link
Owner

Koenkk commented Sep 19, 2024

@CodeForLove83 no clue yet, lets see if there is anything in the gateway sniffs

@CodeForLove83
Copy link
Contributor Author

CodeForLove83 commented Sep 22, 2024

@CodeForLove83 no clue yet, lets see if there is anything in the gateway sniffs

Hi @Koenkk , attached you can find the fresh sniffing from Legrand Gateway and device.
legrand-garage-pairing-OK-onoff.pcapng.zip

I edited this post to add a pcap of the pairing with Z2M of another device but same model.
fail-foto-z2m-latest.pcapng.zip

At first glance it seems no verify and confirm key are exchanged during z2m pairing process.

Hopefully you can fix it. Just let me know if you need anything else.
I can't wait to get your response.

Thanks

@Koenkk
Copy link
Owner

Koenkk commented Sep 23, 2024

  • What is the network key of the gateway sniff?
  • With the deconz pair I also do not see the the confirm key message
  • What Conbee stick are you using?
  • I noticed that another Zigbee network (seems the Legrand one?) is communicating on the same channel (e.g. message 566 from fail-foto-z2m-latest.pcapng.zip. Did you already try with a different channel?

@CodeForLove83
Copy link
Contributor Author

CodeForLove83 commented Sep 23, 2024

Hi @Koenkk

  • e4:a6:98:2e:47:28:bd:e7:d5:db:92:97:d5:61:2d:3f
  • Yes, I did notice that.
  • Conbee3, latest firmware update
  • I haven't tried yet with a different channel - but I've tried to turn the Legrand Gateway off.

Other Legrand devices (~70 devices) are pairing without any issue.
I'm start wondering if there's any Conbee3 firmware issue ...
I ordered in the meantime a Sonoff ZBDongle-E (V2 model, EFR32MG21), it should be delivered by this Friday.

Let me know if you notice anything in the Legrand sniff.
Thanks a lot

@Koenkk
Copy link
Owner

Koenkk commented Sep 24, 2024

Other Legrand devices (~70 devices) are pairing without any issue.

So you managed to pair 70 devices except one to your Conbee III?

@CodeForLove83
Copy link
Contributor Author

CodeForLove83 commented Sep 24, 2024

Well, mostly are pairing fine, others need to do some tricks (mentioned in other posts).

In general pairing Legrand devices is harder with z2m than Deconz.

Nevertheless I really do like z2m and it'd be great to spot the issues and fixing them all to fully support Legrand devices.

I'm obviously open to contribute actively with z2m.

Have you found anything interesting within the Legrand Gateway sniffing?

@Trexano99
Copy link

Today I got the same problem adding a K4003C switch to z2m but maybe i have found a workaround.
Reading the Bitcino documentation, I have found that the devices goes in pairing mode after booting them (so turning down the ac and then after a minute getting it up).
So maybe you can also try my step:

  1. Press the reset button until the switch light flash red
  2. Turn off the alimentation of the switch (from the electric panel) for a minute
  3. Set z2m in pairing mode and turn on the switch alimentation
  4. The switch should pair and not disconnect

I hope this work also for you! Let me know.

@CodeForLove83
Copy link
Contributor Author

Hi, I've already test it out and it doesn't work. Which dongle are you using?

@Trexano99
Copy link

Zigbee Dongle-E flashed with firmware ncp-uart-hw-v7.4.3.0-zbdonglee-115200.gbl

@CodeForLove83
Copy link
Contributor Author

The Legrand gateway can pair with the device without power it off. I've attached in my previous comments the pcap of the sniffing.

I need to figure out if this is a firmware dongle issue or a z2m one.

Let's see what @Koenkk suggests.

@Koenkk
Copy link
Owner

Koenkk commented Sep 25, 2024

One diff I see is that the Legrand gateway does respond to the Node Descriptor Request while z2m doesn't, but neither does Deconz so this cannot be the issue. Can you make a sniff when pairing the device directly to the coordinator? Keep it close to the coordinator and from the frontend only enable joining via the coordinator.

@jetmcquack
Copy link

I don’t know if this is the correct place to post this, but with this same switch I can only read the Power, and Apparent Power. On ZHA it is possible to read the Voltage and the Current, so I think there is definitely something missing with these switches. If you need logs or anything I can provide whatever you need, just guide me!

@agabi10
Copy link

agabi10 commented Nov 28, 2024

@Koenkk I think I might have the same problem with my KG4141AC, but I'm not sure if it's the same happening here or not. In the logs tab I see the following INFO:

zh:controller:device: Device '0x000474000022ecc9' is only compliant to revision '21' of the ZigBee specification (current revision: 23).

Would that message explain why the switch disconnects during the configuring process? Is there something I can do to avoid disconnections? I didn't have any problems with the ones I installed a year ago, and I bought those and the ones I'm trying to add now at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants