Can't add Thread device

I have a ZBT-1 set up in Thread-only mode, and I’m trying to add my first Thread device (an Inovelli white-series dimmer switch).
I try adding it via my phone, and it flashes like it’s pairing, but eventually I get “Can’t reach device” on my phone after connecting to device/generating matter credentials/checking network.
I thought I’d try commissioning via a bluetooth adapter on my server to get some more info, but still it fails. Output from the Matter log for a couple of attempts:

2024-08-16 16:59:52.188 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 28.
2024-08-16 17:00:12.199 (Dummy-2) CHIP_ERROR [chip.native.CTL] Commissioning discovery over BLE failed: src/platform/Linux/bluez/ChipDeviceScanner.cpp:132: CHIP Error 0x00000032: Timeout
2024-08-16 17:00:12.199 (Dummy-2) CHIP_ERROR [chip.native.-] src/platform/Linux/bluez/ChipDeviceScanner.cpp:132: CHIP Error 0x00000032: Timeout at src/controller/SetUpCodePairer.cpp:324
2024-08-16 17:00:12.200 (Dummy-2) CHIP_ERROR [chip.native.BLE] BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:132: CHIP Error 0x00000032: Timeout
2024-08-16 17:00:22.191 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-08-16 17:00:22.192 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-08-16 17:00:22.192 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-08-16 17:00:22.193 (MainThread) ERROR [matter_server.server.client_handler] [140737125889488] Error while handling: commission_with_code: Commission with code failed for node 28.
2024-08-16 17:00:59.550 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 29.
2024-08-16 17:01:02.122 (Dummy-2) INFO [chip.ChipDeviceCtrl] Established secure session with Device
2024-08-16 17:01:39.067 (Dummy-2) CHIP_ERROR [chip.native.DIS] Timeout waiting for mDNS resolution.
2024-08-16 17:01:53.063 (Dummy-2) CHIP_ERROR [chip.native.DIS] OperationalSessionSetup[1:000000000000001D]: operational discovery failed: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout
2024-08-16 17:01:53.067 (Dummy-2) CHIP_ERROR [chip.native.CTL] Session establishment failed for <000000000000001D, 1>, error: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout.  Next retry expected to get a response to Sigma1 or fail within 60 seconds
2024-08-16 17:02:24.067 (Dummy-2) CHIP_ERROR [chip.native.DIS] Timeout waiting for mDNS resolution.
2024-08-16 17:02:38.064 (Dummy-2) CHIP_ERROR [chip.native.DIS] OperationalSessionSetup[1:000000000000001D]: operational discovery failed: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout
2024-08-16 17:02:38.066 (Dummy-2) CHIP_ERROR [chip.native.CTL] Session establishment failed for <000000000000001D, 1>, error: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout.  Next retry expected to get a response to Sigma1 or fail within 60 seconds
2024-08-16 17:03:09.069 (Dummy-2) CHIP_ERROR [chip.native.DIS] Timeout waiting for mDNS resolution.
2024-08-16 17:03:23.066 (Dummy-2) CHIP_ERROR [chip.native.DIS] OperationalSessionSetup[1:000000000000001D]: operational discovery failed: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout
2024-08-16 17:03:23.066 (Dummy-2) CHIP_ERROR [chip.native.CTL] Error on commissioning step 'kFindOperationalForStayActive': 'src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout'
2024-08-16 17:03:23.067 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to commission: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout
2024-08-16 17:03:23.067 (MainThread) ERROR [matter_server.server.client_handler] [140737125889488] Error while handling: commission_with_code: Commission with code failed for node 29.

Any idea what the issue is? I have other Matter (wifi) devices which work fine, they always tend to be a bit of a PITA to get connected at first, but then they’re fine.

Hm, it seems that the error happens in the middle of the pairing attempt. Make sure that you use the Bluetooth adapter exclusively for the Matter Server (e.g. disable the Home Assistant Core Bluetooth integration). Maybe a distance/RF issue? Make sure to use a USB extension cord for the ZBT-1.

I managed to get it eventually, not sure what the secret sauce was, but I tried a few things (like disabling the BT integration) before to no avail. I’m hoping distance is not an issue, as the ZBT-1 is about 10ft away (through the floor) and on an extension hub next to an older SkyConnect that’s now used just for Zigbee (I have a few zigbee repeaters).

I am now losing connection intermittently, but I’ll look into that more once I add a few more Inovelli switches and build the mesh up a bit better.

Hm, yeah if that is RF related too, it would explain the issues during setup.

10 feet should be fine. However, the radio (IEEE 802.15.4) is quite sensitive to interference, in which case the radio just stops sending at all. In that case the distance doesn’t matter all that much. Possible interference sources are WiFi and USB 3.0 devices, but also other devices which send in 2.4GHz range. Usually you see ChannelAccessFailure errors in the OpenThread Border Router add-on logs if that is the case.