home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.07k stars 29.73k forks source link

Nanoleaf Essential Bulb NL67 fails to be commisioned #121386

Closed LukaHummel closed 6 days ago

LukaHummel commented 2 months ago

The problem

I tried to add the light multiple times via the companion app. It always fails. I was able to add it to Google Home multiple times and after trying to share the device multiple times from Google Home to Home Assistant it finally succeeded. There seems to be something wrong with commissioning.

What version of Home Assistant Core has the issue?

core-2024.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter

Link to integration documentation on our website

https://www.home-assistant.io/integrations/matter/

Diagnostics information

config_entry-matter-c4fc23b37b387a82f62c1e6342dae736.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-07-06 17:54:30.796 (Dummy-2) CHIP_ERROR [chip.native.SC] CASESession timed out while waiting for a response from the peer. Current state was 1
2024-07-06 17:54:33.792 (MainThread) INFO [matter_server.server.sdk.node_8] Attempting to establish CASE session... (attempt 2 of 2)
2024-07-06 17:54:33.798 (MainThread) INFO [matter_server.server.sdk.node_7] Attempting to establish CASE session... (attempt 2 of 2)
2024-07-06 17:55:16.831 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 17.
2024-07-06 17:55:42.673 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:31744684 on exchange 41438i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-07-06 17:55:43.715 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:31744685 on exchange 41439i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-07-06 17:55:46.837 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-07-06 17:55:46.837 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-07-06 17:55:46.837 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-07-06 17:55:46.838 (MainThread) ERROR [matter_server.server.client_handler] [281472762572880] Error while handling: commission_with_code: Commission with code failed for node 17.
2024-07-06 17:55:50.715 (Dummy-2) CHIP_ERROR [chip.native.SC] CASESession timed out while waiting for a response from the peer. Current state was 1
2024-07-06 17:55:50.722 (Dummy-2) CHIP_ERROR [chip.native.SC] CASESession timed out while waiting for a response from the peer. Current state was 1
2024-07-06 17:56:17.472 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 18.
2024-07-06 17:56:27.473 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:31744688 on exchange 41442i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-07-06 17:56:30.809 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2024-07-06 17:56:47.476 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-07-06 17:56:47.476 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-07-06 17:56:47.476 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-07-06 17:56:47.477 (MainThread) ERROR [matter_server.server.client_handler] [281472762572880] Error while handling: commission_with_code: Commission with code failed for node 18.
2024-07-06 17:56:56.982 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:31744687 on exchange 41441i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-07-06 17:56:58.307 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:31744686 on exchange 41440i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-07-06 17:57:07.438 (Dummy-2) CHIP_ERROR [chip.native.SC] CASESession timed out while waiting for a response from the peer. Current state was 1
2024-07-06 17:57:07.439 (MainThread) WARNING [matter_server.server.device_controller.node_8] Setup for node failed: Unable to establish CASE session with Node 8
2024-07-06 17:57:07.441 (Dummy-2) CHIP_ERROR [chip.native.SC] CASESession timed out while waiting for a response from the peer. Current state was 1
2024-07-06 17:57:07.442 (MainThread) WARNING [matter_server.server.device_controller.node_7] Setup for node failed: Unable to establish CASE session with Node 7
2024-07-06 18:01:54.406 (MainThread) INFO [matter_server.server.device_controller.node_5] Node could not be discovered on the network, returning cached IP's
2024-07-06 18:07:40.668 (MainThread) INFO [matter_server.server.device_controller.mdns] Node 8 discovered on MDNS
2024-07-06 18:07:40.668 (MainThread) INFO [matter_server.server.device_controller.node_8] Setting-up node...
2024-07-06 18:07:40.669 (MainThread) INFO [matter_server.server.device_controller.mdns] Node 7 discovered on MDNS
2024-07-06 18:07:40.670 (MainThread) INFO [matter_server.server.device_controller.node_7] Setting-up node...
2024-07-06 18:07:42.225 (MainThread) INFO [matter_server.server.device_controller.node_8] Setting up attributes and events subscription.
2024-07-06 18:07:45.205 (MainThread) INFO [matter_server.server.device_controller.node_7] Setting up attributes and events subscription.
2024-07-06 18:07:48.421 (MainThread) INFO [matter_server.server.device_controller.node_8] Subscription succeeded with report interval [0, 300]
2024-07-06 18:07:51.009 (MainThread) INFO [matter_server.server.device_controller.node_7] Subscription succeeded with report interval [0, 300]
2024-07-06 18:31:57.417 (MainThread) INFO [matter_server.server.device_controller.node_5] Node could not be discovered on the network, returning cached IP's

Additional information

I updated the bulb via Nanoleaf app before attempting to pair the device.

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `matter` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign matter` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


matter documentation matter source (message by IssueLinks)

marcelveldt commented 2 months ago

See our documentation - Matter is very sensitive to networking issues as it relies on multicast IPv6 traffic to travel freely on your network. Best thing to do is join our discord server (matter channel) to troubleshoot it but I would start by inspecting your network setup. Do you have any (semi) professional networking gear like Unifi etc. ?

LukaHummel commented 2 months ago

Hi @marcelveldt, I might have agreed if it didn't work without a hitch with my Google Home border router directly. Leading me to believe that there's a bug in the Home Assistant implementation. I have read the documents and I currently use the farthest from a 'semi-professional' network setup. I'm using eero (Amazon) devices.

marcelveldt commented 1 month ago

There is no bug - it works for thousands of people and in fact our code is using the exact same SDK as what is in your Google Home. But its very sensitive for network configuration issues/hiccups.

Also sharing from Google Home to other ecosystems can have some issues, did you try adding the device to HA first/only ?

Let's start with a few basic questions:

1) Did you enable IPv6 in your Home Assistant network set-up ? 2) Did you try adding it to HA first and then share to Google ?

LukaHummel commented 1 month ago

Yes, IPv6 is enabled and I tried adding it via HA first. Only when that kept failing I tried to add it via the Google Home app/Google Border Router directly and sharing it from there. Interestingly the sharing from Google Home to HA only worked after a couple of tries. I know Matter can be a bit finicky, but a hundred percent success rate connecting to Google Home and an inconsistent behavior when connecting to HA seems indicative of a bug. Screenshot_20240716-082625.png

marcelveldt commented 1 month ago

99% of the issues with Matter (especially Matter-over-Thread) devices is caused by networking issues. Some network gear filters out multicast traffic between wireless and ethernet for example, that is enough to completely ruin the experience.

Also some switches have super flaky IGMP/MLD snooping implementations resulting in bad experience.