Adding matter device not working

I’m posting in this thread instead of starting a new one.
I have successfully added my Aqara U200 in Google Home.
In Home Assistant I have as prefered network the one my nest devices created and I have synced crendentials multiple times and with multiple devices.
IP6 works fine in my network, it is activated in my NAS and I can see that Home Assistant get an IP6 IP.

I tried adding the Aqara U200 in home Assistant via Google Home app with Android and iOS devices with no luck.

I have started from scratch (resetting U200) with exactly the same results.

The only thing that I haven’t tried is to use Conbee II as thread router and add it to the same network with OTBR.

Any help appreciated.

What NAS do you use? IPv6 stateless?

Ugeeen NAS running True NAS scale. Not sure about the stateless thing :slight_smile:

[Home Assistant Matter Server to commission a device directly]

Today I tried a Bluetooth adapter, but I think it is not compatible…
UGREEN Bluetooth Adapter 5.4 [CM748]

2024-10-28 08:24:07.387 (MainThread) ERROR [matter_server.server] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 214, in _run_handler
    raise err
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 197, in _run_handler
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/device_controller.py", line 456, in set_thread_operational_dataset
    await self._chip_device_controller.set_thread_operational_dataset(dataset)
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/sdk.py", line 183, in set_thread_operational_dataset
    threadOperationalDataset=bytes.fromhex(dataset),
                             ^^^^^^^^^^^^^^^^^^^^^^
ValueError: non-hexadecimal number found in fromhex() arg at position 2
2024-10-28 08:26:35.865 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 1.
2024-10-28 08:26:35.985 (Dummy-2) CHIP_ERROR [chip.native.DL] Disabling CHIPoBLE service due to error: src/platform/Linux/BLEManagerImpl.cpp:596: Ble Error 0x00000401: BLE adapter unavailable
2024-10-28 08:26:35.985 (Dummy-2) CHIP_ERROR [chip.native.CTL] Commissioning discovery over BLE failed: src/platform/Linux/BLEManagerImpl.cpp:743: Ble Error 0x00000401: BLE adapter unavailable
2024-10-28 08:26:35.987 (Dummy-2) CHIP_ERROR [chip.native.-] src/platform/Linux/BLEManagerImpl.cpp:743: Ble Error 0x00000401: BLE adapter unavailable at src/controller/SetUpCodePairer.cpp:324
2024-10-28 08:26:35.987 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 108 ms, for event type 3
2024-10-28 08:27:05.884 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-10-28 08:27:05.884 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-10-28 08:27:05.885 (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-10-28 08:27:05.885 (MainThread) ERROR [matter_server.server.client_handler] [140417963409104] Error while handling: commission_with_code: Commission with code failed for node 1.
2024-10-28 08:28:22.775 (MainThread) ERROR [matter_server.server] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 214, in _run_handler
    raise err
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 197, in _run_handler
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/device_controller.py", line 456, in set_thread_operational_dataset
    await self._chip_device_controller.set_thread_operational_dataset(dataset)
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/sdk.py", line 183, in set_thread_operational_dataset
    threadOperationalDataset=bytes.fromhex(dataset),
                             ^^^^^^^^^^^^^^^^^^^^^^
ValueError: non-hexadecimal number found in fromhex() arg at position 2
2024-10-28 08:29:00.643 (MainThread) ERROR [matter_server.server] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 214, in _run_handler
    raise err
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 197, in _run_handler
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/device_controller.py", line 456, in set_thread_operational_dataset
    await self._chip_device_controller.set_thread_operational_dataset(dataset)
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/sdk.py", line 183, in set_thread_operational_dataset
    threadOperationalDataset=bytes.fromhex(dataset),
                             ^^^^^^^^^^^^^^^^^^^^^^
ValueError: non-hexadecimal number found in fromhex() arg at position 0
2024-10-28 08:29:25.915 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 2.
2024-10-28 08:29:25.921 (Dummy-2) CHIP_ERROR [chip.native.CTL] Commissioning discovery over BLE failed: src/platform/Linux/BLEManagerImpl.cpp:743: Ble Error 0x00000401: BLE adapter unavailable
2024-10-28 08:29:25.921 (Dummy-2) CHIP_ERROR [chip.native.-] src/platform/Linux/BLEManagerImpl.cpp:743: Ble Error 0x00000401: BLE adapter unavailable at src/controller/SetUpCodePairer.cpp:324
2024-10-28 08:29:55.928 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-10-28 08:29:55.929 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-10-28 08:29:55.929 (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-10-28 08:29:55.930 (MainThread) ERROR [matter_server.server.client_handler] [140417963409040] Error while handling: commission_with_code: Commission with code failed for node 2.

On the other hand, when starting the process it asks for the “Dataset ID” of the Thread network, when is it really referring to the Extended Pan ID?

image

Using “Dataset id” show error:

Error setting Thread dataset: non-hexadecimal number found in fromhex() arg at position 2

NOTE: The first time you set the property to 1, it is reset to 0

Settings ->Add-ons → Matter Server → Configuration I then set the Bluetooth Adapter ID to 1

The Dataset id that Matter server is looking for is the Thread Integrations “Active dataset TLVs” string.

@wmaker User friendly GUI :upside_down_face::sweat_smile:

Ha Ha :slight_smile:
yeah before they came out with that webpage, I had to use Python code to call a Matter Server API to do the same thing.

Also be aware, I don’t think the settings persist, meaning if you restart the Matter Server AddOn, and want to pair a new device afterwards, you’ll probably have to redo the settings again in the GUI