Using Thread (Matter) devices

Hi! I’m now trying for a long time to connect Matter/Thread devices to HA but it just doesn’t work. So I am asking myself if I just got something wrong in my head.

I’m using HA in a docker container on a synology NAS. I am also using the python-matter server in a docker container which is nicely connected and integrated to HA.

As a thread border router I have a Homepod Mini and a Aqara Hub M3 in the same network, than the synology NAS. I can add Matter/Thread devices without any problem to Homekit and the Aqara Hub - but not to HA. The only device I can add via Matter to HA is the Aqara Hub itself, which doesn’t help in any way but shows me, that basically Matter is running, right?

Do I need something else? Do I need additional hardware like the ZBT Connect attached to the NAS? Or is it a setup or network problem?

The matter server shows the following log:

2024/09/06 09:41:51,stderr,e[32m2024-09-06 07:41:51.247e[0m (MainThread) e[1;30mERRORe[0m e[34m[matter_server.server.client_handler]e[0m e[31m[140309338730128] Error while handling: commission_with_code: Commission with code failed for node 34.e[0m
2024/09/06 09:41:51,stderr,e[32m2024-09-06 07:41:51.246e[0m (Dummy-2) e[1;30mWARNINGe[0m e[34m[chip.ChipDeviceCtrl]e[0m e[33mFailed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect statee[0m
2024/09/06 09:41:51,stderr,e[32m2024-09-06 07:41:51.246e[0m (Dummy-2) e[1;30mCHIP_ERRORe[0m e[34m[chip.native.ZCL]e[0m e[31mSecure Pairing Failede[0m
2024/09/06 09:41:51,stderr,e[32m2024-09-06 07:41:51.246e[0m (Dummy-2) e[1;30mCHIP_ERRORe[0m e[34m[chip.native.CTL]e[0m e[31mDiscovery timed oute[0m
2024/09/06 09:41:21,stderr,e[32m2024-09-06 07:41:21.641e[0m (Dummy-2) e[1;30mCHIP_ERRORe[0m e[34m[chip.native.-]e[0m e[31msrc/inet/UDPEndPointImplSockets.cpp:416: OS Error 0x02000065: Network is unreachable at src/controller/SetUpCodePairer.cpp:280e[0m
2024/09/06 09:41:21,stderr,e[32m2024-09-06 07:41:21.241e[0m (MainThread) e[1;30mINFOe[0m e[34m[matter_server.server.device_controller]e[0m Starting Matter commissioning with code using Node ID 34.

Because there is a “network not reachable” I would assume that there is some kind of a network problem. But how can I figure out, where to search? ipv6 seems to be enabled.

I have the feeling that I have already read through every hint on the net without success. Perhaps I have a different problem. I am grateful for any help!

I have just added my first matter over thread device without a problem, so can only tell you how it looks for me (different setup). I have Eero mesh devices (which have thread) over my house and my main use case for this was to use one in my home office, which is at the bottom of my garden and currently reliant on WiFi. The border routers show up in the thread integration configuration. I have no primary network showing (I wasn’t clear if this was needed… seems not in my case). Aside from that, I had to set up the matter server via the matter integration, so i think using the HA built in one. Adding the device (by going into add device → matter) didn’t work first time by scanning the QR code on the box, but when i scanned the one on the Eve smart plug and had my phone by it, it did, so not sure if proximity to the device is needed. Works like a charm and really quick to respond. Just a shame there aren’t many options for Matter over Thread yet, so i am stuck with WiFi for a bunch of things for now.

Edit- i did also click the “Send Credentials to Home Assistant” button in the thread integration. I do not know if this was needed.

Thank you, doesn’t help. I did all of this before and the setup worked. But I can’t add Matter/Thread devices.

Update. I just added successfully another new Matter device, which doesn’t use Thread (Govee LightStrip). But the Aqara Device which uses Matter over Thread doesn’t work. Looks like it has something to do with the Thread configuration.
The thread integration is loaded. The Aqara Hub and the HomePod are shown as BorderRouter in the preferred network.