Power plugs can't connect to Thread network (SkyConnect + Thread + Matter)

Hello,

I am struggling to get the SkyConnect stick running with Thread + Matter power plugs (both ONVIS and EVE) and I would be very thankful if someone could help me figuring out what the issue is.

I tested this with two systems (an AMD mini pc and a Pi 3) and each time I setup a fresh install of HA and have the same result.
The following information is based on the Raspberry pi 3 which has the following HA version:
Core: 2023.11.1
Supervisor: 2023.11.0
Operating System: 11.1
Frontend: 20231030.1

What did I do:

  • I configured SkyConnect for the multi protocol support
  • I added the integrations ‘Thread’, ‘Matter (Beta)’ and ‘Open Thread Border Router’ or some of the where added automatically by SkyConnect (I don’t recall).
  • Configured everything als seen in the screenshots below.
  • Used the HA Android app: Added a new Matter device. Scanned the matter QR code on the power plug. Then the app connected to the device. Afterwards gernerated matter credentials. Afterwards the network connectivity was checked and there it failed with the following message 'Can’t connect to thread network home-assistant. Check that your device can with this type and try again.'

Used Matter + Thread power plugs

Here are the diagnostic downloads and configs

  • Open Thread Border Router

  • Thread

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.11.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.11.0",
    "host_os": "Home Assistant OS 11.1",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {},
  "integration_manifest": {
    "domain": "thread",
    "name": "Thread",
    "codeowners": [
      "@home-assistant/core"
    ],
    "config_flow": true,
    "dependencies": [
      "zeroconf"
    ],
    "documentation": "home-assistant.io/integrations/thread",
    "integration_type": "service",
    "iot_class": "local_polling",
    "requirements": [
      "python-otbr-api==2.5.0",
      "pyroute2==0.7.5"
    ],
    "zeroconf": [
      "_meshcop._udp.local."
    ],
    "is_built_in": true
  },
  "data": {
    "networks": {
      "f64141d438b9df53": {
        "name": "home-assistant",
        "routers": {},
        "prefixes": [
          "fd43:f846:64bf:ed2c"
        ],
        "unexpected_routers": []
      }
    }
  }
}
  • Matter (Beta)
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.11.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.11.0",
    "host_os": "Home Assistant OS 11.1",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {},
  "integration_manifest": {
    "domain": "matter",
    "name": "Matter (BETA)",
    "codeowners": [
      "@home-assistant/matter"
    ],
    "config_flow": true,
    "dependencies": [
      "websocket_api"
    ],
    "documentation": "home-assistant.io/integrations/matter",
    "iot_class": "local_push",
    "requirements": [
      "python-matter-server==4.0.0"
    ],
    "is_built_in": true
  },
  "data": {
    "server": {
      "info": {
        "fabric_id": 2,
        "compressed_fabric_id": 8828942795921379759,
        "schema_version": 4,
        "min_supported_schema_version": 2,
        "sdk_version": "2023.10.2",
        "wifi_credentials_set": false,
        "thread_credentials_set": false
      },
      "nodes": [],
      "events": []
    }
  }
}

Here is the log and config from the Silicon Labs Multiprotocol Add-on

-----------------------------------------------------------
s6-rc: info: service banner successfully started
s6-rc: info: service universal-silabs-flasher: starting
[17:50:41] INFO: Checking /dev/ttyUSB0 identifying SkyConnect v1.0 from Nabu Casa.
[17:50:41] INFO: Starting universal-silabs-flasher with /dev/ttyUSB0
2023-11-08 17:50:45 homeassistant universal_silabs_flasher.flash[190] INFO Extracted GBL metadata: NabuCasaMetadata(metadata_version=1, sdk_version='4.3.1', ezsp_version=None, ot_rcp_version=None, fw_type=<FirmwareImageType.RCP_UART_802154: 'rcp-uart-802154'>, baudrate=460800)
2023-11-08 17:50:45 homeassistant universal_silabs_flasher.flasher[190] INFO Probing ApplicationType.GECKO_BOOTLOADER at 115200 baud
2023-11-08 17:50:47 homeassistant universal_silabs_flasher.flasher[190] INFO Probing ApplicationType.CPC at 460800 baud
2023-11-08 17:50:47 homeassistant universal_silabs_flasher.flasher[190] INFO Detected ApplicationType.CPC, version '4.3.1' at 460800 baudrate (bootloader baudrate None)
2023-11-08 17:50:47 homeassistant universal_silabs_flasher.flash[190] INFO Firmware version '4.3.1' is flashed, not re-installing
s6-rc: info: service universal-silabs-flasher successfully started
s6-rc: info: service cpcd-config: starting
[17:50:50] INFO: Using known baudrate of 460800 for cpcd!
[17:50:51] INFO: Generating cpcd configuration.
s6-rc: info: service cpcd-config successfully started
s6-rc: info: service cpcd: starting
[17:50:53] INFO: Starting cpcd...
WARNING in function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
s6-rc: info: service cpcd successfully started
s6-rc: info: service zigbeed: starting
s6-rc: info: service otbr-agent: starting
s6-rc: info: service zigbeed successfully started
[17:50:53:946598] Info : [CPCd v4.3.1.0] [Library API v3] [RCP Protocol v4]
[17:50:53:946935] Info : Git commit: 133b29678b3d0bc7578e098d2f46b4d5bcd2ebb4 / branch: 
[17:50:53:946944] Info : Sources hash: ff8300587e7e4ab1def7a89a272c0baef32f9eb3bff9b0ba06b94e655d652367
[17:50:53:946984] WARNING : In function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
[17:50:53:947071] Info : Reading cli arguments
[17:50:53:947087] Info : /usr/local/bin/cpcd 
[17:50:53:951956] Info : Reading configuration
[17:50:53:951987] Info :   file_path = /usr/local/etc/cpcd.conf
[17:50:53:951994] Info :   instance_name = cpcd_0
[17:50:53:952000] Info :   socket_folder = /dev/shm
[17:50:53:952006] Info :   operation_mode = MODE_NORMAL
[17:50:53:952012] Info :   use_encryption = false
[17:50:53:952018] Info :   binding_key_file = /etc/binding-key.key
[17:50:53:952024] Info :   stdout_tracing = false
[17:50:53:952029] Info :   file_tracing = false
[17:50:53:952043] Info :   lttng_tracing = false
[17:50:53:952049] Info :   enable_frame_trace = false
[17:50:53:952055] Info :   traces_folder = /dev/shm/cpcd-traces
[17:50:53:952061] Info :   bus = UART
[17:50:53:952067] Info :   uart_baudrate = 460800
[17:50:53:952073] Info :   uart_hardflow = true
[17:50:53:952078] Info :   uart_file = /dev/ttyUSB0
[17:50:53:952085] Info :   fu_recovery_pins_enabled = false
[17:50:53:952091] Info :   fu_connect_to_bootloader = false
[17:50:53:952097] Info :   fu_enter_bootloader = false
[17:50:53:952103] Info :   restart_cpcd = false
[17:50:53:952108] Info :   application_version_validation = false
[17:50:53:952114] Info :   print_secondary_versions_and_exit = false
[17:50:53:952119] Info :   use_noop_keep_alive = false
[17:50:53:952125] Info :   reset_sequence = true
[17:50:53:952130] Info :   stats_interval = 0
[17:50:53:952136] Info :   rlimit_nofile = 2000
[17:50:53:952142] Info : ENCRYPTION IS DISABLED 
[17:50:53:952147] Info : Starting daemon in normal mode
[17:50:53:969467] Info : Connecting to Secondary...
[17:50:54:054684] Info : RX capability is 256 bytes
[17:50:54:054745] Info : Connected to Secondary
[17:50:54:058412] Info : Secondary Protocol v4
[17:50:54:066099] Info : Secondary CPC v4.3.1
[17:50:54:070014] Info : Secondary bus bitrate is 460800
[17:50:54:077878] Info : Secondary APP vUNDEFINED
[17:50:54:078460] Info : Daemon startup was successful. Waiting for client connections
[17:50:55] INFO: Starting zigbeed...
[17:50:56:769043] Info : New client connection using library v4.3.1.0
[17:50:56:774806] Info : Opened connection socket for ep#12
[17:50:56:775205] Info : Endpoint socket #12: Client connected. 1 connections
[17:50:57] INFO: Setup OTBR firewall...
[17:50:57] INFO: Starting otbr-agent...
otbr-agent[316]: [NOTE]-AGENT---: Running 0.3.0
otbr-agent[316]: [NOTE]-AGENT---: Thread version: 1.3.0
otbr-agent[316]: [NOTE]-AGENT---: Thread interface: wpan0
otbr-agent[316]: [NOTE]-AGENT---: Radio URL: spinel+cpc://cpcd_0?iid=2&iid-list=0
otbr-agent[316]: [NOTE]-ILS-----: Infra link selected: eth0
otbr-agent[316]: 49d.21:14:01.010 [C] Platform------: mCpcBusSpeed = 115200
[17:50:57:958181] Info : New client connection using library v4.3.1.0
[17:50:57:963636] Info : Endpoint socket #12: Client connected. 2 connections
otbr-agent[316]: 00:00:00.143 [N] RoutingManager: BR ULA prefix: fd4a:d31a:bf6::/48 (loaded)
otbr-agent[316]: 00:00:00.144 [N] RoutingManager: Local on-link prefix: fdf6:4141:d438:df53::/64
otbr-agent[316]: 00:00:00.231 [N] Mle-----------: Role disabled -> detached
otbr-agent[316]: 00:00:00.256 [N] Platform------: [netif] Changing interface state to up.
s6-rc: info: service otbr-agent successfully started
s6-rc: info: service otbr-agent-rest-discovery: starting
Listening on port 9999 for connection...
Accepting connection.
Accepted connection 7.
[17:51:02] 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
otbr-agent[316]: 00:00:25.934 [N] Mle-----------: RLOC16 1c00 -> fffe
otbr-agent[316]: 00:00:25.942 [W] Platform------: [netif] Failed to process request#5: Unknown error -95
otbr-agent[316]: 00:00:26.179 [N] Mle-----------: Attach attempt 1, AnyPartition reattaching with Active Dataset
otbr-agent[316]: 00:00:32.683 [N] RouterTable---: Allocate router id 7
otbr-agent[316]: 00:00:32.684 [N] Mle-----------: RLOC16 fffe -> 1c00
otbr-agent[316]: 00:00:32.689 [N] Mle-----------: Role detached -> leader
otbr-agent[316]: 00:00:32.692 [N] Mle-----------: Partition ID 0x2f49bb02
otbr-agent[316]: 00:00:32.772 [W] Platform------: [netif] Failed to process request#6: Unknown error -17
otbr-agent[316]: [NOTE]-BBA-----: BackboneAgent: Backbone Router becomes Primary!

What I tried so far:

  • Flashed the stick through skyconnect.home-assistant again to the latest multiprotocol version.
  • I have configured and tested different channels in SkyConnect.
  • Removed the integrations ‘Thread’, ‘Matter (Beta)’ and ‘Open Thread Board Router’ and started the process from the beginning.
  • Reset the boarder router and added the new preferred Thread network 'Thread ‘Silicon Labs Multiprotocol’.
  • I plugged the SkyConnect directly into the Pi and also tried it with an USB extension cable and placed the SkyConnect next to the power plugs.
  • Restarted HA several times.
  • I reset both power plugs.

Perhaps I am missing something basic or doing something wrong?

(Sorry had to remove links and images as a new user can only add 2)

2 Likes

Here are the configs

Here are the configs

Here are the configs

Here are the configs

Here is the config from the Silicon Labs Multiprotocol Add-on

1 Like

I own a Home Assistant Yellow and ran into similar issues with connecting my Matter-enabled plugs. I had the same integrations installed as well as multi-protocol support. It was not until I installed the integration for Zigbee Home Automation that I was able to connect my devices.

Perhaps try that and see if it changes anything for you.

1 Like

I know it’s not very helpful, but I have the same problem. The only difference is that I have two SkyConnect sticks installed on my Intel NUC. One flashed with the Zigbee firmware, the other with the Thread firmware.
Same result as yours, “Can’t connect to thread network home-assistant”.

Help is required.

I’ve successfully add an Matter / Thread device (Eve Smart Plug) with SkyConnect-Stick as Open Thread Border Router.

I follow the guide from KolBusa

https://community.home-assistant.io/t/thread-border-router-required-with-eve-and-matter/562937/21

Thank’s to KolBusa :grinning:

If necessary, I can provide a coherent guide

Please do !
I’m a Little green in triggering the websocket stuff

I have installed the following AddOns:

  • Matter Server
  • OpenThread Border Router - here you have to select the SkyConnect stick under Device

The following are installed under Integrations:

  • Matter
  • Open Thread Border Router
  • Thread

Restart Home Assistant once after installation.

You need the following information for web socket communication:

  • Settings → Devices and services → Thread → Configure → press the “i” symbol → Active dataset TLVs: 0e080000000000010000000300000f35060004001fffe00208e34cb63b988011600708ed1dd37a69db4a4d0510f34b8d065cf2fd3cb2bbdd3551b94ca4030e686f6d652d617383697374616e740152bf9f0410f2c39e3949ca653fab5ca0b1dd3740b20c0402a0f7f8
  • Matter Device Code from the sticker on the Thread device: 3283-601-5270 the hyphens must be removed
  • IP-Adress of the Home Assistant Host
    Settings → System → Network → Network adapter: 192.168.178.11

To send something via the web socket, I used the Chrome AddOn Web Socket King Client is used and the Chrome Browser. Postman or similar tools also work in a very similar way.

Start the corresponding tool in my case Web Socket King Client in Chrome.
The top input line (to the left of Connect) should contain the following:

ws://192.168.178.11:5580/ws

(our determined IP address + port)
Press Connect

The message to be sent is entered in the field below:

{
    "message_id": "1",
    "command": "set_thread_dataset",
    "args": {
        "dataset": "0e080000000000010000000300000f35060004001fffe00208e34cb63b988011600708ed1dd37a69db4a4d0510f34b8d065cf2fd3cb2bbdd3551b94ca4030e686f6d652d617383697374616e740152bf9f0410f2c39e3949ca653fab5ca0b1dd3740b20c0402a0f7f8"
    }
}

The determined Active dataset TLVs are entered here (the long character string).

Press Send

Replace the code from just now with the second message in which the Matter Device Code must be sent:

{
    "message_id": "2",
    "command": "commission_with_code",
    "args": {
        "code": "32836015270"
    }
}

Press Send

The OUTPUT window should then display a message with (or similar):

{
“message_id”: “2”,
“error_code”: 0,
}

The new Matter / Thread device should appear immediately in the Home Assistant.
Settings → Devices & services → Matter → 1 Device →

2 Likes

Hi @Sascha-HA

Thanks for your guide.

I have all add ons installed and running fine. Nothing special the logs.

Silicon Labs Multiprotocol - Current version: 2.4.3
OpenThread Border Router -Current version: 2.4.3
Matter Server - Matter Server - Current version: 5.0.2

Integrations are present

  • Settings → Devices and services → Thread → Configure → press the “i” symbol → Active dataset
    Active dataset TLVs: 0e080000000000050000000300000f35060004001fffe00208dc2c9f749874de3b0708fdd4bd8d8660317f0510ff11c2bacb64363da2eaf97ee32e42a6030e686f6d652d617373697374616e74010274740410fcbffeed26e1f6935a61ad1fa88a15f50c0402a0f7f8

  • Matter Device Code from the sticker on the Thread device: 2574-654-3095 the hyphens must be removed

  • IP-Adress of the Home Assistant Host
    Settings → System → Network → Network adapter: 192.168.86.41

Sending These 2 messages via WebSocket King

Matter Server log is complaining about the JSON being invalid :frowning:

Which is strange to me as, for the set_thread_dataset payload I did get output back through the websocket.
Am I doing something wrong, typo somewhere ?

PS: Matter device is the Aqara P2 door and window sensor

The message after the command “Disconnected from …” could be caused by a syntax error. The formatting was unfortunately destroyed by the forum. This is the correct formatting, sorry:

{
    "message_id": "1",
    "command": "set_thread_dataset",
    "args": {
        "dataset": "0e080000000000010000000300000f35060004001fffe00208e34cb63b988011600708ed1dd37a69db4a4d0510f34b8d065cf2fd3cb2bbdd3551b94ca4030e686f6d652d617383697374616e740152bf9f0410f2c39e3949ca653fab5ca0b1dd3740b20c0402a0f7f8"
    }
}
{
    "message_id": "2",
    "command": "commission_with_code",
    "args": {
        "code": "32836015270"
    }
}

(I have also corrected my post above)

Thanks again.
The JSON worked this time around.

The matter log now indicates it’s missing a bluetooth controller to finish the setup

2024-01-12 23:29:52 core-matter-server matter_server.server.device_controller[210] INFO Starting Matter commissioning with code using Node ID 5.
2024-01-12 23:29:52 core-matter-server chip.CTL[210] ERROR Commissioning discovery over BLE failed: src/platform/Linux/BLEManagerImpl.cpp:687: CHIP Error 0x00000003: Incorrect state
2024-01-12 23:29:52 core-matter-server chip.-[210] ERROR src/platform/Linux/BLEManagerImpl.cpp:687: CHIP Error 0x00000003: Incorrect state at src/controller/SetUpCodePairer.cpp:324
2024-01-12 23:29:52 core-matter-server chip.BLE[210] ERROR No adapter available for new connection establishment
2024-01-12 23:30:22 core-matter-server chip.CTL[210] ERROR Discovery timed out
2024-01-12 23:30:22 core-matter-server chip.ZCL[210] ERROR Secure Pairing Failed
2024-01-12 23:30:22 core-matter-server matter_server.server.client_handler[210] ERROR [140737230312656] Error handling message: CommandMessage(message_id=‘2’, command=‘commission_with_code’, args={‘code’: ‘25746543095’})
Traceback (most recent call last):
File “/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py”, line 188, in _run_handler
result = await result
^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/matter_server/server/device_controller.py”, line 196, in commission_with_code
raise NodeCommissionFailed(
matter_server.common.errors.NodeCommissionFailed: Commission with code failed for node 5
2024-01-12 23:30:23 core-matter-server chip.DIS[210] ERROR Timeout waiting for mDNS resolution.

Guess i’m stuck now, as I don’t have a BLE on my HA :frowning:

BLE is mandentory.
What kind of system do you have (Raspberry / NUC / etc.)?
Can you use a Bluetooth Dongel, maybe?

1 Like

Running HAOS as a VM on Synology NAS
Yeah. Asking around at friends for a BLE Dongle.
Seems a waste of money for a one time thing

@Sascha-HA So i spend a couple of bucks on a Ugreen BLE… Arrived today.

  • installed easly + mounted to the VM
  • added bluetooth integration through devices

Bluetooth radio available
Great

Running the JSONs again.
Matter add-on disagrees:

2024-01-18 20:04:42 core-matter-server matter_server.server.device_controller[210] INFO Starting Matter commissioning with code using Node ID 8.
2024-01-18 20:04:42 core-matter-server chip.CTL[210] ERROR Commissioning discovery over BLE failed: src/platform/Linux/BLEManagerImpl.cpp:687: CHIP Error 0x00000003: Incorrect state
2024-01-18 20:04:42 core-matter-server chip.-[210] ERROR src/platform/Linux/BLEManagerImpl.cpp:687: CHIP Error 0x00000003: Incorrect state at src/controller/SetUpCodePairer.cpp:324
2024-01-18 20:04:42 core-matter-server chip.BLE[210] ERROR No adapter available for new connection establishment

Do I need to do anything in HA to connect the bluetooth integration with Matter add on?

Thank you very much. That worked :slight_smile: Annoying that I couldn’t connect the device with the Home Assistant Companion App because Google only saved my old network

Thanks for the good guide @Sascha-HA . So far I had the same problems with connecting Onvis smart plugs and other devices via Matter over Thread.

Now I followed all steps, everything straight forward.

But when starting the commision via websocket I get this error in the Matter addon:

2024-01-22 21:34:35 core-matter-server matter_server.server.device_controller[224] INFO Starting Matter commissioning with code using Node ID 10 (attempt 0/3).
[New Thread 0xffffe37e81e0 (LWP 231)]
[New Thread 0xffffe2fe71e0 (LWP 232)]
[New Thread 0xffffe27e61e0 (LWP 233)]
2024-01-22 21:34:35 core-matter-server chip.DL[224] ERROR Long dispatch time: 281 ms, for event type 2
2024-01-22 21:34:45 core-matter-server chip.CTL[224] ERROR Commissioning discovery over BLE failed: src/platform/Linux/bluez/ChipDeviceScanner.cpp:173: CHIP Error 0x00000032: Timeout
2024-01-22 21:34:45 core-matter-server chip.-[224] ERROR src/platform/Linux/bluez/ChipDeviceScanner.cpp:173: CHIP Error 0x00000032: Timeout at src/controller/SetUpCodePairer.cpp:324
2024-01-22 21:34:45 core-matter-server chip.BLE[224] ERROR BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:173: CHIP Error 0x00000032: Timeout
2024-01-22 21:35:06 core-matter-server chip.DIS[224] ERROR Timeout waiting for mDNS resolution.
2024-01-22 21:35:17 core-matter-server chip.CTL[224] ERROR Failed to perform commissioning step 25
2024-01-22 21:35:22 core-matter-server matter_server.server.device_controller[224] INFO Starting Matter commissioning with code using Node ID 10 (attempt 1/3).
2024-01-22 21:35:24 core-matter-server chip.DL[224] ERROR Long dispatch time: 2760 ms, for event type 2

The plug is right nex to the BT dongle. My setup:

  • HA Green
  • HA Os 2024.1.5
  • SkyConnect (Multiprotocol active)
  • BT: SABRENT BT-UB40
  • FritzBox 7590

Does anyone have an idea what this is pointing to?

For anyone encountering this mDNS resolution problem: it was a misconfiguration on my main FritzBox router. Even after resetting it to default settings, the error occurred.

After some research I found that i have to activate the 6to4 tunnel protocol option for IPv6 of the router. After that everything went flawless, even no need for websocket messages.