Hey folks, im trying to see if anyone can help me out here. I have 2 vlans and each has its own local ipv6 address. I have the right rules and from a networking perspective things are good .
I think the matter integration with home assistant is broken and very buggy. I have seen this now in two separate instances. I have leviton switches that I would add them apple home, and they would pair just fine. Then i would get a pairing code from apple home to pair with home assistant, and id see failure after failure. Errors like below (note leviton uses matter over wifi)
2025-11-12 22:10:27.219 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 57.
2025-11-12 22:10:31.158 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:28695i with Node: <0000000000000000, 0> S:0 M:212770424] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
2025-11-12 22:10:37.708 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2025-11-12 22:10:38.472 (Dummy-2) INFO [chip.ChipDeviceCtrl] Established secure session with Device
2025-11-12 22:11:44.071 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:28707i with Node: <0000000000000000, 0> S:0 M:212770429] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
2025-11-12 22:11:58.794 (Dummy-2) CHIP_ERROR [chip.native.SC] CASESession timed out while waiting for a response from peer <0000000000000039, 1>. Current state was 1
2025-11-12 22:11:58.799 (Dummy-2) CHIP_ERROR [chip.native.CTL] Session establishment failed for <0000000000000039, 1>, error: src/app/OperationalSessionSetup.cpp:265: CHIP Error 0x00000032: Timeout. Next retry expected to get a response to Sigma1 or fail within 77 seconds
2025-11-12 22:11:58.822 (Dummy-2) CHIP_ERROR [chip.native.SC] Received error (protocol code 1) during pairing process: src/protocols/secure_channel/CASESession.cpp:2379: CHIP Error 0x000000C9: No shared trusted root
2025-11-12 22:11:58.822 (Dummy-2) CHIP_ERROR [chip.native.CTL] Error on commissioning step 'kFindOperationalForStayActive': 'src/protocols/secure_channel/CASESession.cpp:2379: CHIP Error 0x000000C9: No shared trusted root'
2025-11-12 22:11:58.823 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to commission: src/protocols/secure_channel/CASESession.cpp:2379: CHIP Error 0x000000C9: No shared trusted root
2025-11-12 22:11:58.823 (MainThread) ERROR [matter_server.server.client_handler] [281473369808704] Error while handling: commission_with_code: Commission with code failed for node 57.
now recently, my lafaer presence sensor, that works on matter over thread became unresponsive with respect to home assistant. Its own app would see it, but not HA. So i tried to reset it and pair it just with HA, and no go… id get these errors
2025-11-14 19:38:56.232 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 94.
2025-11-14 19:39:10.833 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:41369i with Node: <0000000000000000, 0> S:0 M:2492122] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
2025-11-14 19:39:32.812 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2025-11-14 19:41:48.130 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:41370i with Node: <0000000000000000, 0> S:0 M:2492123] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
2025-11-14 19:42:11.190 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
I reset again and paird with apple home, and works like a charm , so something is really wrong with the matter integration.
Hey, wait - aren’t you the same guy who posted a solution for this issue just a few days ago?
As for me, after reading this, I simply decided to place my HA to the IoT VLAN, instead of fiddeling about with firewall rules, which solved this issue for me.
Also a Unifi user.
haha i am THAT guy haha. ok so this is def a learning experience for me. Very frustrating and frustrating but i’ll share more of what i learned. Again I am NOT a networking expert.
the guide i wrote , is 100% valid for matter over wifi devices. Because they ARE on your network. I realized that for matter over thread. Those devices are NOT on your network. They make their own network. So they are not designed to go over a vlan. They just talk to a boarder router and thats it. They have no access really to anything else. At least thats what i gathered. Hence why they do not work across vlan .
Thats why when my phone is on my IoT vlan, it would not pair (given my thread border router is on my trusted )
I’m not much of a networking guru either
Recently, I started digging into the internet settings I changed some time ago, based on a guide I found in the Vodafone forums.
Here’s my setup:
A Fritzbox in bridge mode acting as a simple modem
A UDM as the main router
The Fritzbox requests a prefix length of /56 from the ISP, while in the UDM’s internet settings, the delegation size is set to /58. Honestly, I have no idea why that is.
As a result, I end up with four subnets automatically assigned to my VLANs.
At least the UDM shows four different Delegation IDs on my VLANs, so I assume these represent different subnets, right?
My phone and my Thread border routers (Nest Hub as the preferred one, plus a HomePod Mini) are in the same VLAN (WiFi).
All of my Matter devices run on Thread.
When HA was on a different VLAN (LAN), I was getting exactly the same error messages as you. After moving it to my WiFi VLAN, I was able to commission my devices to HA.
I’m not running a Thread border router on my HA setup, maybe that’s different from yours?
yesterday I installed the Home Assistant Connect ZBT-1 as the Thread Border Router on my Homeassistant running on a Raspberry Pi. I was able to setup three Aqara LED bulbs via Matter over Thread, but the Matter integration is regularly not available saying that it can’t connect to the Matter server. The logs are as follows:
s6-rc: info: service banner successfully started
s6-rc: info: service matter-server: starting
s6-rc: info: service matter-server successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[20:50:51] INFO: Starting Matter Server...
[20:50:59] INFO: Using 'enu1u1u1' as primary network interface.
[20:51:04] INFO: Successfully send discovery information to Home Assistant.
2025-11-16 20:51:25.374 (MainThread) INFO [matter_server.server.stack] Initializing CHIP/Matter Logging...
2025-11-16 20:51:25.388 (MainThread) INFO [matter_server.server.stack] Initializing CHIP/Matter Controller Stack...
[1763322689.353999][117:117] CHIP:CTL: Setting attestation nonce to random value
[1763322689.485155][117:117] CHIP:CTL: Setting CSR nonce to random value
[1763322690.016072][117:117] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1763322690.045801][117:117] CHIP:DL: Wrote settings to /tmp/chip_kvs
[1763322690.046869][117:117] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_factory.ini
[1763322690.154194][117:117] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_config.ini
[1763322690.156450][117:117] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_counters.ini
[1763322690.230303][117:117] CHIP:DL: Wrote settings to /data/chip_counters.ini
[1763322690.230446][117:117] CHIP:DL: NVS set: chip-counters/reboot-count = 268 (0x10C)
[1763322690.231883][117:117] CHIP:DL: Got Ethernet interface: enu1u1u1
[1763322690.233215][117:117] CHIP:DL: Found the primary Ethernet interface:enu1u1u1
[1763322690.234463][117:117] CHIP:DL: Got WiFi interface: wlan0
[1763322690.234589][117:117] CHIP:DL: Failed to reset WiFi statistic counts
[1763322690.234610][117:117] CHIP:PAF: WiFiPAF: WiFiPAFLayer::Init()
2025-11-16 20:51:30.304 (MainThread) INFO [chip.storage] Initializing persistent storage from file: /data/chip.json
2025-11-16 20:51:30.323 (MainThread) INFO [chip.storage] Loading configuration from /data/chip.json...
2025-11-16 20:51:31.480 (MainThread) INFO [chip.CertificateAuthority] Loading certificate authorities from storage...
2025-11-16 20:51:31.481 (MainThread) INFO [chip.CertificateAuthority] New CertificateAuthority at index 1
2025-11-16 20:51:31.508 (MainThread) INFO [chip.CertificateAuthority] Loading fabric admins from storage...
2025-11-16 20:51:31.513 (MainThread) INFO [chip.FabricAdmin] New FabricAdmin: FabricId: 0x0000000000000002, VendorId = 0x134B
2025-11-16 20:51:31.515 (MainThread) INFO [matter_server.server.stack] CHIP Controller Stack initialized.
2025-11-16 20:51:31.516 (MainThread) INFO [matter_server.server.server] Matter Server initialized
2025-11-16 20:51:31.517 (MainThread) INFO [matter_server.server.server] Using 'enu1u1u1' as primary interface (for link-local addresses)
2025-11-16 20:51:31.575 (MainThread) INFO [matter_server.server.server] Starting the Matter Server...
2025-11-16 20:51:31.647 (MainThread) INFO [matter_server.server.helpers.paa_certificates] Skip fetching certificates (already fetched within the last 24h).
2025-11-16 20:51:31.647 (MainThread) INFO [chip.FabricAdmin] Allocating new controller with CaIndex: 1, FabricId: 0x0000000000000002, NodeId: 0x000000000001B669, CatTags: []
2025-11-16 20:51:32.842 (Dummy-2) CHIP_ERROR [chip.native.DIS] Failed to advertise records: src/inet/UDPEndPointImplSockets.cpp:417: OS Error 0x02000065: Network is unreachable
2025-11-16 20:51:32.890 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 927 ms, for event type 2
2025-11-16 20:51:33.049 (MainThread) INFO [matter_server.server.vendor_info] Loading vendor info from storage.
2025-11-16 20:51:33.114 (MainThread) INFO [matter_server.server.vendor_info] Loaded 369 vendors from storage.
2025-11-16 20:51:33.116 (MainThread) INFO [matter_server.server.vendor_info] Fetching the latest vendor info from DCL.
2025-11-16 20:51:36.325 (MainThread) INFO [matter_server.server.vendor_info] Fetched 368 vendors from DCL.
2025-11-16 20:51:36.359 (MainThread) INFO [matter_server.server.vendor_info] Saving vendor info to storage.
2025-11-16 20:51:36.515 (MainThread) INFO [matter_server.server.device_controller] Loaded 3 nodes from stored configuration
2025-11-16 20:51:38.156 (MainThread) INFO [matter_server.server.server] Matter Server successfully initialized.
2025-11-16 20:51:40.154 (MainThread) INFO [matter_server.server.device_controller.mdns] <Node:4> Discovered on mDNS
2025-11-16 20:51:40.221 (MainThread) INFO [matter_server.server.device_controller.mdns] <Node:6> Discovered on mDNS
2025-11-16 20:51:40.222 (MainThread) INFO [matter_server.server.device_controller.mdns] <Node:5> Discovered on mDNS
2025-11-16 20:51:40.223 (MainThread) INFO [matter_server.server.device_controller] <Node:4> Setting-up node...
2025-11-16 20:51:40.321 (MainThread) INFO [matter_server.server.device_controller] <Node:6> Setting-up node...
2025-11-16 20:51:40.323 (MainThread) INFO [matter_server.server.device_controller] <Node:5> Setting-up node...
2025-11-16 20:51:40.513 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 180 ms, for event type 2
2025-11-16 20:51:40.945 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 116 ms, for event type 2
2025-11-16 20:51:41.013 (MainThread) INFO [matter_server.server.device_controller.mdns] <Node:4> Discovered on mDNS
2025-11-16 20:51:41.449 (MainThread) INFO [matter_server.server.device_controller.mdns] <Node:6> Discovered on mDNS
2025-11-16 20:51:41.479 (MainThread) INFO [matter_server.server.device_controller.mdns] <Node:5> Discovered on mDNS
2025-11-16 20:51:42.590 (MainThread) INFO [matter_server.server.device_controller] <Node:4> Setting up attributes and events subscription.
2025-11-16 20:51:42.672 (MainThread) INFO [matter_server.server.device_controller] <Node:5> Setting up attributes and events subscription.
2025-11-16 20:51:42.834 (MainThread) INFO [matter_server.server.device_controller] <Node:6> Setting up attributes and events subscription.
2025-11-16 20:51:45.816 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 339 ms, for event type 2
2025-11-16 20:51:45.881 (MainThread) INFO [matter_server.server.device_controller] <Node:4> Subscription succeeded with report interval [1, 60]
2025-11-16 20:51:46.028 (MainThread) INFO [matter_server.server.device_controller] <Node:5> Subscription succeeded with report interval [1, 60]
2025-11-16 20:51:47.385 (MainThread) INFO [matter_server.server.device_controller] <Node:6> Subscription succeeded with report interval [1, 60]
[19:55:16] WARNING: matter-server service exited with code 137 (by signal 9).
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service matter-server: stopping
s6-rc: info: service matter-server successfully stopped
s6-rc: info: service banner: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service banner successfully stopped
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service banner: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
-----------------------------------------------------------
Add-on: Matter Server
Matter WebSocket Server for Home Assistant Matter support.
-----------------------------------------------------------
Add-on version: 8.1.1
You are running the latest version of this add-on.
System: Home Assistant OS 16.3 (aarch64 / raspberrypi3-64)
Home Assistant Core: 2025.11.2
Home Assistant Supervisor: 2025.11.2
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
So it seems @jakeshbazi is not the only one with this problem. The logs seem similar to me. Does anyone has a clue?
In your case there are a couple of entries about long dispatch times.
The long dispatch time means that the event loop of the server has been blocked for an extended period of time. Its not clear if this was the reason for the “exited with code 137”, but maybe it is. I can’t really tell if this is a bug, or that your machine is being overloaded. Since you are running a raspberryPi3, then maybe ?overload?