Problem connecting Matter/Thread devices

Hi

Up until now I have been using ZigBee devices, but Ikea switched all products to matter and I need new light bulbs, so I thought should not be be a problem, might even be nice with my Shelly devices. It seems there is more to it though…

My setup:

  • Home Assistant Green with 2x ZBT-2, one for ZigBee, one for Matter/Thread
  • Matter Server and OTBR are Installed
  • there is no other Matter or Thread network
  • for the Companion App, GrapheneOS does not seem to work for Matter, getting “Matter is currently unavailable”, even with Play Services installed
  • On my old Xiaomi Android phone I did: Settings > Companion App > Troubleshooting > Sync Thread credentials, the log confirms it uses the right ha-thread-xyzu Thread network
  • my network uses VLANs, I figured out I need to be on the same VLAN with my smartphone, although, it always connects via 5GHz, not 2.4 GHz
  • sometimes I get a pop-up about a Matter device being ready to connect
  • I enabled IPv6 on my opnsense firewall for the network and added a DHCPv6 pool, also set a static IPv6 on Home Assitant, local DNS is only setup for IPv4 though
  • when trying to add a Matter devices: “No. It’s new.” > scan QR-code > “Connecting to device…” > “Generating Matter credentials…” > “Checking connectivity to Thread network ha-thread xyzu” > and then fails “Can’t reach device” and “Make sure that your phone is connected to Wi-Fi”

Following the OTBR logs, it looks like an addressing problem, but I can’t figure out what or how to fix it. “WARNING: IPv6 routing/forwarding is not enabled! Make sure the Home Assistant host has IPv6 forwarding enabled.” → don’t know how, or at least editing /etc/sysctl.conf does not work.

How can I fix this? Or is there a way to add devices directly from Home Assistant Green, like by adding a BT dongle to it?

[02:32:42] INFO: Stable mode, enabling mDNSResponder.
[02:32:42] INFO: The otbr-web is disabled.
/run/s6/basedir/scripts/rc.init: info: hook /etc/s6-overlay/scripts/enable-check.sh exited 0
s6-rc: info: service mdns: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service mdns successfully started
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
[02:32:43] INFO: Starting mDNS Responder...
Default: mDNSResponder (Engineering Build) (Apr 10 2026 12:15:35) starting
-----------------------------------------------------------
 Add-on: OpenThread Border Router
 OpenThread Border Router add-on
-----------------------------------------------------------
 Add-on version: 2.16.7
 You are running the latest version of this add-on.
 System: Home Assistant OS 17.2  (aarch64 / green)
 Home Assistant Core: 2026.4.2
 Home Assistant Supervisor: 2026.03.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service banner successfully started
s6-rc: info: service otbr-agent: starting
[02:32:43] WARNING: IPv6 routing/forwarding is not enabled! Make sure the Home Assistant host has IPv6 forwarding enabled.
[02:32:43] INFO: Setup OTBR firewall...
[02:32:44] INFO: Migrating OTBR settings if needed...
2026-04-13 02:32:44 ha01 asyncio[252] DEBUG Using selector: EpollSelector
2026-04-13 02:32:44 ha01 zigpy.serial[252] DEBUG Opening a serial connection to '/dev/serial/by-id/usb-Nabu_Casa_ZBT-2_E072A1FB8144-if00' (baudrate=460800, xonxoff=False, rtscts=True)
2026-04-13 02:32:44 ha01 serialx.platforms.serial_posix[252] DEBUG Configuring serial port '/dev/serial/by-id/usb-Nabu_Casa_ZBT-2_E072A1FB8144-if00'
2026-04-13 02:32:44 ha01 serialx.platforms.serial_posix[252] DEBUG Configuring serial port: [0, 0, 2147486896, 0, 4100, 4100, [b'\x03', b'\x1c', b'\x7f', b'\x15', b'\x04', 0, 0, b'\x00', b'\x11', b'\x13', b'\x1a', b'\x00', b'\x12', b'\x0f', b'\x17', b'\x16', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00']]
2026-04-13 02:32:44 ha01 serialx.platforms.serial_posix[252] DEBUG Setting low latency mode: True
2026-04-13 02:32:44 ha01 serialx.platforms.serial_posix[252] DEBUG Setting modem pins: ModemPins[dtr rts]
2026-04-13 02:32:44 ha01 serialx.platforms.serial_posix[252] DEBUG Setting TIOCMBIS: 0x00000006
2026-04-13 02:32:44 ha01 zigpy.serial[252] DEBUG Connection made: <serialx.platforms.serial_posix.PosixSerialTransport object at 0xffff924d4750>
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=0, network_link_id=0, flag=2), command_id=<CommandID.RESET: 1>, data=b'\x02')
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Sending data b'~\x80\x01\x02\xea\xf0~'
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Immediately writing b'~\x80\x01\x02\xea\xf0~'
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Sent 7 of 7 bytes
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Event loop woke up reader
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Received b'~\x80\x06\x00p\xeet~'
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Decoded HDLC frame: HDLCLiteFrame(data=b'\x80\x06\x00p')
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Parsed frame SpinelFrame(header=SpinelHeader(transaction_id=0, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_IS: 6>, data=b'\x00p')
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x08')
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Sending data b'~\x83\x02\x08\xbc\x9a~'
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Immediately writing b'~\x83\x02\x08\xbc\x9a~'
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Sent 7 of 7 bytes
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Event loop woke up reader
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Received b'~\x83\x06\x08`\xb7c\xff\xfeZ\xe0.\xa9\xc6~'
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Decoded HDLC frame: HDLCLiteFrame(data=b'\x83\x06\x08`\xb7c\xff\xfeZ\xe0.')
2026-04-13 02:32:44 ha01 universal_silabs_flasher.spinel[252] DEBUG Parsed frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_IS: 6>, data=b'\x08`\xb7c\xff\xfeZ\xe0.')
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Closing at the request of the application
2026-04-13 02:32:44 ha01 zigpy.serial[252] DEBUG Waiting for serial port to close
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Closing connection: None
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Closing file descriptor 7
2026-04-13 02:32:44 ha01 serialx.descriptor_transport[252] DEBUG Calling protocol `connection_lost` with exc=None
2026-04-13 02:32:44 ha01 zigpy.serial[252] DEBUG Connection lost: None
Adapter settings file /data/thread/0_60b763fffe5ae02e.data is the most recently used, skipping
[02:32:45] INFO: Starting otbr-agent...
[NOTE]-AGENT---: Running 0.3.0-b067e5ac-dirty
[NOTE]-AGENT---: Thread version: 1.3.0
[NOTE]-AGENT---: Thread interface: wpan0
[NOTE]-AGENT---: Radio URL: spinel+hdlc+uart:///dev/serial/by-id/usb-Nabu_Casa_ZBT-2_E072A1FB8144-if00?uart-baudrate=460800&uart-flow-control
[NOTE]-AGENT---: Radio URL: trel://end0
[NOTE]-ILS-----: Infra link selected: end0
49d.17:13:58.067 [C] P-SpinelDrive-: Software reset co-processor successfully
49d.17:13:58.082 [C] P-RadioSpinel-: RCP => [C] Platform------: Reset info: 0x3 (EXT)
49d.17:13:58.083 [C] P-RadioSpinel-: RCP => [C] Platform------: Extended Reset info: 0x301 (PIN)
00:00:00.038 [N] RoutingManager: BR ULA prefix: fdac:1a8c:207e::/48 (loaded)
00:00:00.038 [N] RoutingManager: Local on-link prefix: fd45:3c14:2982:11a2::/64
00:00:00.081 [N] Mle-----------: Role disabled -> detached
00:00:00.106 [N] P-Netif-------: Changing interface state to up.
00:00:00.126 [W] P-Netif-------: Failed to process request#2: No such process
00:00:00.128 [W] P-Netif-------: Failed to process request#6: No such process
Connection to 172.30.32.1 8081 port [tcp/tproxy] succeeded!
s6-rc: info: service otbr-agent successfully started
s6-rc: info: service otbr-agent-configure: starting
Done
00:00:00.365 [W] P-Daemon------: Daemon read: Connection reset by peer
[02:32:45] INFO: Enabling NAT64.
Done
00:00:00.406 [W] P-Netif-------: Failed to process request#7: No such process
Done
Done
s6-rc: info: service otbr-agent-configure successfully started
s6-rc: info: service otbr-agent-rest-discovery: starting
[02:32:46] INFO: Successfully sent discovery information to Home Assistant.
s6-rc: info: service otbr-agent-rest-discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
00:00:27.098 [N] Mle-----------: RLOC16 3400 -> fffe
00:00:27.850 [N] Mle-----------: Attach attempt 1, AnyPartition reattaching with Active Dataset
00:00:34.350 [N] RouterTable---: Allocate router id 13
00:00:34.350 [N] Mle-----------: RLOC16 fffe -> 3400
00:00:34.352 [N] Mle-----------: Role detached -> leader
00:00:34.352 [N] Mle-----------: Partition ID 0x5829afaf
[NOTE]-BBA-----: BackboneAgent: Backbone Router becomes Primary!
00:00:36.754 [W] DuaManager----: Failed to perform next registration: NotFound
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
Default: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to ff02::fb on interface fe80::d40a:8ff:feb6:cc0b/vetha984bb2/15
00:04:58.349 [N] RouterTable---: Allocate router id 32
00:05:02.757 [N] MeshForwarder-: Dropping (reassembly queue) IPv6 UDP msg, len:574, chksum:fe1f, ecn:no, sec:yes, error:ReassemblyTimeout, prio:normal, rss:-64.0, radio:15.4
00:05:02.757 [N] MeshForwarder-:     src:[fd6c:90d9:1278:2ee2:95fc:8a11:b:b753]:49154
00:05:02.757 [N] MeshForwarder-:     dst:[fd6c:90d9:1278:2ee2:da02:e500:b98d:fbc3]:53543
00:06:40.737 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:96, chksum:9320, ecn:no, to:ca7c5b7fd9274f87, sec:no, error:NoAck, prio:net, radio:15.4
00:06:40.737 [N] MeshForwarder-:     src:[fe80:0:0:0:c410:967e:8f26:2a2]:19788
00:06:40.737 [N] MeshForwarder-:     dst:[fe80:0:0:0:c87c:5b7f:d927:4f87]:19788
00:06:40.970 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:96, chksum:0c08, ecn:no, to:ca7c5b7fd9274f87, sec:no, error:NoAck, prio:net, radio:15.4
00:06:40.970 [N] MeshForwarder-:     src:[fe80:0:0:0:c410:967e:8f26:2a2]:19788
00:06:40.970 [N] MeshForwarder-:     dst:[fe80:0:0:0:c87c:5b7f:d927:4f87]:19788
00:06:42.746 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:96, chksum:9fde, ecn:no, to:ca7c5b7fd9274f87, sec:no, error:NoAck, prio:net, radio:15.4
00:06:42.746 [N] MeshForwarder-:     src:[fe80:0:0:0:c410:967e:8f26:2a2]:19788
00:06:42.746 [N] MeshForwarder-:     dst:[fe80:0:0:0:c87c:5b7f:d927:4f87]:19788
00:08:15.772 [N] RouterTable---: Release router id 32
00:20:24.721 [W] P-RadioSpinel-: Error processing result: NoAddress
00:20:24.721 [W] P-RadioSpinel-: Error waiting response: NoAddress
00:20:24.721 [W] P-RadioSpinel-: Error waiting response: NoAddress
``

The phone needs to support Matter or you need a dedicated Bluetooth dongle for your Matter server (No other part of HA will be able to use it), which will make it possible to commission directly in the Matter server app’s GUI.
The dedicated Bluetooth adapter is set in the Matter Server app’s configuration.

The frequency band is not important.
What is important is that HA, The Matter server and the Thread Border Router are all on the same network and have IPv6 enabled.

Thx, I missed the option to set the BT adapter. I was no able to use a Shelly PM1 Gen4 as BT adapter it seems and I was able to connect 1 Ikea Bilresa device. I also ordered a USB BT dongle, will try that tomorrow. But it seems something else is missing, as I cannot add any more devices. I always get the same errors. The one that worked also had those errors but no timeout at least.

2026-04-13 20:51:57.278 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 30.
2026-04-13 20:51:57.280 (Dummy-2) CHIP_ERROR [chip.native.CTL] Error, Long discriminator is required
2026-04-13 20:51:57.281 (Dummy-2) CHIP_ERROR [chip.native.CTL] Failed to start commissionable node discovery over Wi-Fi PAF: src/controller/SetUpCodePairer.cpp:271: CHIP Error 0x0000002F: Invalid argument
2026-04-13 20:51:57.295 (Dummy-2) CHIP_ERROR [chip.native.CTL] Commissionable node discovery over BLE failed: src/platform/Linux/BLEManagerImpl.cpp:707: Ble Error 0x00000401: BLE adapter unavailable
2026-04-13 20:51:57.296 (Dummy-2) CHIP_ERROR [chip.native.-] src/platform/Linux/BLEManagerImpl.cpp:707: Ble Error 0x00000401: BLE adapter unavailable at src/controller/SetUpCodePairer.cpp:442
2026-04-13 20:52:27.310 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2026-04-13 20:52:27.311 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2026-04-13 20:52:27.312 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
2026-04-13 20:52:27.313 (MainThread) ERROR [matter_server.server.client_handler] [281472837594688] Error while handling: commission_with_code: Commission with code failed for node 30.


I am not familiar with HA Green, but I am assuming that you have a HA GUI that looks like mine where HAOS is installed on a VM.

Here are things to consider:
a) In OPNsense, you just need to enable IPv6 on LAN interface with DHCPv6 selected from dropdown. There is absolutely no need to configure any DHCPv6 DHCP pool. Matter devices use auto-generated IPv6 addresses (as far as I know). I have not configured any DHCPv6 in my OPNsense LAN and WAN interfaces. This is my LAN interface:

b) This might be the step that you are missing. In HA, go to Settings → System → Network. In the Configure Network Interfaces, expand the IPv6 and enable it. Set it to Automatic. Save. It should get IPv6 address(es) as shown below. There is no need to configure any DNS server or gateway. Note that IPv6 addresses were assigned automatically. I did not assign them.

c) Make sure that if you are using VLAN, then HA, Matter devices and any PC or phone that you are using to add Matter devices are on the same VLAN and that VLAN has IPv6 enabled. Again, there is no need to add/configure any separate DHCP range for IPv6.

Now, in HA, go to Settings → Thread (on right hand side). See if the Thread network is visible. If you have more than one Thread networks, they will also be visible. I have this:

The first one is the OTBR Thread network which I use for all Matter devices and this is the Preferred network. Once the OTBR Thread device is visible, and HA is assigned an IPv6, you should be able to add Matter enabled devices to HA. I do not even scan the QR code for adding a device. I just use the Matter code and it works flawlessly.

Hope this works for you as what I have read on several threads is that Matter does not work reliably with VLAN. I do not use VLAN so have no personal experience.

With OTBR working properly, there is no need to generate/sync credentials etc., at least, I do not remember doing so.

I managed to connect more devices via BT, after I installed a USB BT dongle. This seems to be the easiest way to add Matter over Thread devices.
I am not sure if a network side IPv6 configuration is needed, as everything should stay between the HA and devices without LAN side communication. I might try that some time, by disably IPv6 in my network again.

The parts are containers and they need IPv6 to communicate too.