python-matter-server icon indicating copy to clipboard operation
python-matter-server copied to clipboard

Unable to Pair Power Strip (SM-SO301U-PA20)

Open KyleStilkey opened this issue 1 year ago • 4 comments

INFO [matter_server.server.device_controller] Node:41 Subscription succeeded with report interval [1, 60] 2025-03-17 10:58:32.126 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:40108r with Node: <0000000000000029, 1> S:63913 M:36127156] (S) Msg Retransmission to 1:0000000000000029 failure (max retries:4) 2025-03-17 10:58:34.951 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 52 and IP fe80::3698:7aff:fe2f:2c60%enp5s0. 2025-03-17 10:58:38.728 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:4536i with Node: <0000000000000000, 0> S:0 M:189960477] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4) 2025-03-17 10:58:45.403 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33 2025-03-17 10:58:45.403 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed 2025-03-17 10:58:45.403 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state 2025-03-17 10:58:45.403 (MainThread) ERROR [matter_server.server.client_handler] [140644853184320] Error while handling: commission_on_network: Commissioning failed for node 52.

I'm unable to Pair this device through Matter. I can through GHome and Alexa through Matter but when attempting to add through Home Assistants it fails at the last step. If I add it to another service and try to pair it through say Alexa or GHome to HA, it just fails to add and says try again.

KyleStilkey avatar Mar 17 '25 15:03 KyleStilkey

Enabling IPv6 in the router (maybe also enable mDNS) and in Synology DSM helped me. Now HA network settings will show the IPv6 address and power strip pairing without problem.

avenom avatar Mar 17 '25 17:03 avenom

Enabling IPv6 in the router (maybe also enable mDNS) and in Synology DSM helped me. Now HA network settings will show the IPv6 address and power strip pairing without problem.

Already is, I have multiple devices connected already through Matter. Matter requires IPv6 to work to begin with. I also do not have Synology.

KyleStilkey avatar Mar 17 '25 17:03 KyleStilkey

For issues with the Home Assistant Matter integration, please create issue reports on the Home Assistant issue tracker. Normally we warn about that in the issue template but somehow Github decided to ignore that.

@KyleStilkey you need to tell about your setup. So for example, we only provide support for running the Matter server as HA add-on and your network needs to be simple/flat. What network gear do you have ?

marcelveldt avatar Mar 19 '25 14:03 marcelveldt

Oh lol I thought I created it there, I think I created it here from the other similar issue, I am running HA through a VM, have 0 problem adding any other Matter devices, have about 30 or so other devices through Matter that work perfectly fine. Was able to add a few more before and after trying to add this power strip multiple times.

So my network goes straight through the VM right into my main OPNSense firewall/router. Wireless devices are connected through my ASUS routers and HA can see everything, I have had almost no issues with the 500+ devices. This installed as a Add-On too, again I have 0 issues with any other devices being added, it's almost like there is a certification issue with the device, but if there is anything we can try let me know.

I will also be trying to add this devices on a HA install I have that is running metal on a x86/x64 machine straight wired into the router and see if the same results happen. That install too has multiple matter devices installed without any trouble and I can see if that has issues grabbing this device.

If we need to move this report over to the correct location too, I can create a bug report in the correct spot.

KyleStilkey avatar Mar 20 '25 02:03 KyleStilkey

Unclear if this is the correct spot for this or not (it seems like an issue with the server rather than the HA integration), but I'm also having what appears to be the same (or very similar) issue:

2025-04-02 21:37:12.636 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 19 and IP fd21:879b:d565:1:7413:d3ba:e505:9eef.
2025-04-02 21:37:16.535 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:5311i with Node: <0000000000000000, 0> S:0 M:225590691] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
2025-04-02 21:37:23.086 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2025-04-02 21:37:23.086 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2025-04-02 21:37:23.086 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
2025-04-02 21:37:23.087 (MainThread) ERROR [matter_server.server.client_handler] [128741987707040] Error while handling: commission_on_network: Commissioning failed for node 19.

From the python-matter-server, I'm unable to ping the IP address of the node, but it also doesn't appear to be an IP address that matches the OTBR IP prefixes, so I'm not sure where it's coming from. I'm somewhat suspicious that's part of the issue.

Commissioning works just fine in Google Home, but if I subsequently try to add it to HA after it also fails.

I only have two Matter devices and both fail in this manner so I can't really check to see what a successful commissioning looks like and if the IP is the same / reachable.

(Also happy to move this to a different place if needed, but since the error is coming specifically from the python-matter-server it seemed like this was a decent starting place)

samphonic avatar Apr 03 '25 04:04 samphonic

I got similar issue while trying to connect yandex socket YNDX-00540BLK

2025-05-20 06:46:31.807 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 3.
2025-05-20 06:47:01.823 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2025-05-20 06:47:01.823 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2025-05-20 06:47:01.823 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
2025-05-20 06:47:01.824 (MainThread) ERROR [matter_server.server.client_handler] [140604670562608] Error while handling: commission_with_code: Commission with code failed for node 3.

datacurse avatar May 20 '25 03:05 datacurse

Similar issue with a Roborock vaccum.

(MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 8 and IP fe80::269e:7dff:fe00:34e2.
(Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:46391i S:0 M:162075789] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
(Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
(Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
(Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
(MainThread) ERROR [matter_server.server.client_handler] [140199486305824] Error while handling: commission_on_network: Commissioning failed for node 8.

Kranzes avatar Jun 11 '25 01:06 Kranzes

Ok so I'm going to update it but leave this open that way we can post this to the correct place or have it for data. It seems as if Home Assistance Matter relies heavily on mDNS. I am running OpnSense and thought I had the service installed and running, but I was having lots of issues on the side of ESPHOME and it not functioning correctly at all.

I have gone back and enabled the service and I also saw my Pass function for devices between different networks was set to IPv4 only and no IPv6. I updated my protocol to allow both IPv4+IPv6 to pass and now the power strip and a handful of other devices connected without trouble. These are the only 2 changes I ever made and Matter devices are now connecting way better.

I've spent the time going through adding everything and only 1 device failed but a repair fixed it, to have a 20/21 all pairing without issues on first try vs certain devices having no problems or needing to be paired like 2-3 times before it would be seen is a much better result.

KyleStilkey avatar Jun 11 '25 18:06 KyleStilkey

For issues with the Home Assistant Matter integration, please create issue reports on the Home Assistant issue tracker.

And also make sure to use the correct QR code: If the device is already paired to an ecosystem then the original QR code on the device should not be used again

Apollon77 avatar Aug 28 '25 07:08 Apollon77