"Thread border router required" with Eve and Matter

Hi Leon,

here are some things that could help you:

  • Restart Home Assistant
  • Restart Matter Addon
  • Reinstall Home Assistant
  • Dont add Bluetooth to the integration list (maybe bluetooth integration makes bluetooth unavaible for matter server)
    My integration list:

@dv8 What happens if you restart Home Assistant? Do you lose connection to your eve device? Is thread_credentials_set still set to true or is it now false?

1 Like

Hi, thanks for the suggestions. Sadly, nothing helped.

I did come up with a solution, however this is not perfect.
I bought a matter compatable apple tv and added the eve energy plug to it apple home. Then I did some updates that where available. Via apple home I got the pairing code (which is different from the code displayed under the qr code of the device) and added it via the companion app with the code to HA and it worked. However, my problems with the BLE timeout is not gone

Hi @KolBusa,
I think I understand what you have done, but just to confirm, you have setup an Eve (Thread) Motion detector using the Matter Server by first sending the Thread credentials via the websocket API to the Matter Server, and second by initiating the commissioning via websocket API (along with the pairing code) which will have the Matter Server in turn use the HA local Bluetooth to pass the creds, etc. to the Eve Device which in turn will allow it to join the Thread network and Matter Fabric. You did not use an HA companion App to add the Eve Device.

If this is correct, my only question is how does the Matter Server know about the HA Local Bluetooth device?
My Home Assistant has autodiscovered my Bluetooth device, but I have not yet enabled the integration for it (and you recommend not enabling the Bluetooth integration). I’m just wondering how Matter Server will know about the Bluetooth device.

Thanks

Yes, i can pair my eve device without android or iphone.
I think thy are using bluetooth discovery through dbus, because of line 15 here: python-matter-server/compose.yml at 7452f77115437f265065bbc7b6758c812322a7fb · home-assistant-libs/python-matter-server · GitHub
I also found this: bash - How do you perform bluetooth discovery through dbus? - Stack Overflow

Leon, is the BLE timeout problem just a line in the log or is it stopping you from using your eve device?

Hey,

how did you send these websocket messages?

I just get an empty error message, if I try it like this (it just straight up refuses to connect):

const socket = new WebSocket("ws://homeassistant.local:5580");
...
WebSocket connection to 'wss://homeassistant.local:5580/' failed:

I get an error message in the Matter server logs:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 332, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"

Did you too encounter this? If so what did you do to fix it?

Connection with Postman (Websocket)
1.

  1. (in this screenshot the response from the matter server is missing)

Connection with Browser
1.

var socket = new WebSocket("ws://192.168.2.130:5580/ws");
socket.addEventListener("message", (event) => {
    console.log("Message from server ", event.data);
});

socket.addEventListener("open", (event) => {
    console.log("WebSocket is open");
    var message = {
        "message_id": "1",
        "command": "set_thread_dataset",
        "args": {
            "dataset": "0e080000000000010000000300000b35060004001fffe0020823890fd24ab1fb3d0708fd32b595bafdd8d30510d4b788583c85b27e2463f14f248fe94b030e686f6d652d617373697374616e74010263e30410bbe3fea1a3a4db87a91b276b3aba21ca0c0402a0f7f8"
        }
    };
    socket.send(JSON.stringify(message));
});
  1. (again, response is missing [i don’t get the right response, because i have already connected my eve device to matter server])
var socket = new WebSocket("ws://192.168.2.130:5580/ws");
socket.addEventListener("message", (event) => {
    console.log("Message from server ", event.data);
});

socket.addEventListener("open", (event) => {
    console.log("WebSocket is open");
    var message = {
        "message_id": "2",
        "command": "commission_with_code",
        "args": {
            "code": "30846023139"
        }
    };
    socket.send(JSON.stringify(message));
});

Morten1, try this:

const socket = new WebSocket("ws://homeassistant.local:5580/ws");

wmaker, I think you can also easily add Bluetooth as an integration. I just made up the assumption, that it would be better for matter server to run without it.

2 Likes

After turning on the info log, this is how my logs look like on the Matter server:


2023-06-10 11:49:26 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from DCL.
2023-06-10 11:49:27 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from DCL.
2023-06-10 11:49:27 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from Git.
2023-06-10 11:49:27 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from Git.
2023-06-10 11:49:27 core-matter-server chip.CTL[126] INFO Setting attestation nonce to random value
2023-06-10 11:49:27 core-matter-server chip.CTL[126] INFO Setting CSR nonce to random value
2023-06-10 11:49:27 core-matter-server chip.CTL[126] INFO Starting commissioning discovery over DNS-SD
2023-06-10 11:49:27 core-matter-server chip.CTL[126] INFO Discovered device to be commissioned over DNS-SD
2023-06-10 11:49:27 core-matter-server chip.CTL[126] INFO Attempting PASE connection to UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540
2023-06-10 11:49:27 core-matter-server chip.EM[126] INFO <<< [E:42532i S:0 M:93321969] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-06-10 11:49:27 core-matter-server chip.IN[126] INFO (U) Sending msg 93321969 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:49:27 core-matter-server chip.CTL[126] INFO Commission called for node ID 0x0000000000000011
2023-06-10 11:49:27 core-matter-server chip.CTL[126] INFO Discovered device to be commissioned over DNS-SD
2023-06-10 11:49:28 core-matter-server chip.CTL[126] INFO Discovered device to be commissioned over DNS-SD
2023-06-10 11:49:29 core-matter-server chip.IN[126] INFO (U) Sending msg 93321969 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:49:30 core-matter-server chip.EM[126] INFO >>> [E:18370r S:62754 M:69897208] (S) Msg RX from 1:0000000000000001 [0CEC] --- Type 0001:05 (IM:ReportData)
2023-06-10 11:49:30 core-matter-server chip.DMG[126] INFO Refresh LivenessCheckTime for 124224 milliseconds with SubscriptionId = 0x0696f9e1 Peer = 01:0000000000000001
2023-06-10 11:49:30 core-matter-server chip.EM[126] INFO <<< [E:18370r S:62754 M:206342947 (Ack:69897208)] (S) Msg TX to 1:0000000000000001 [0CEC] --- Type 0001:01 (IM:StatusResponse)
2023-06-10 11:49:30 core-matter-server chip.IN[126] INFO (S) Sending msg 206342947 on secure session with LSID: 62754
2023-06-10 11:49:30 core-matter-server chip.EM[126] INFO >>> [E:18370r S:62754 M:69897209 (Ack:206342947)] (S) Msg RX from 1:0000000000000001 [0CEC] --- Type 0000:10 (SecureChannel:StandaloneAck)
2023-06-10 11:49:30 core-matter-server chip.IN[126] INFO (U) Sending msg 93321969 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:49:31 core-matter-server chip.CTL[126] INFO Discovered device to be commissioned over DNS-SD
2023-06-10 11:49:32 core-matter-server chip.IN[126] INFO (U) Sending msg 93321969 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:49:34 core-matter-server chip.CTL[126] INFO Discovered device to be commissioned over DNS-SD
2023-06-10 11:49:44 core-matter-server chip.IN[126] INFO (U) Sending msg 93321969 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:49:57 core-matter-server chip.CTL[126] ERROR Discovery timed out
2023-06-10 11:50:01 core-matter-server chip.EM[126] ERROR Failed to Send CHIP MessageCounter:93321969 on exchange 42532i sendCount: 4 max retries: 4
2023-06-10 11:50:05 core-matter-server chip.SC[126] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-06-10 11:50:05 core-matter-server chip.CTL[126] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-06-10 11:50:05 core-matter-server chip.CTL[126] INFO Attempting PASE connection to UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540
2023-06-10 11:50:05 core-matter-server chip.EM[126] INFO <<< [E:42533i S:0 M:93321970] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-06-10 11:50:05 core-matter-server chip.IN[126] INFO (U) Sending msg 93321970 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:05 core-matter-server chip.CTL[126] INFO Commission called for node ID 0x0000000000000011
2023-06-10 11:50:05 core-matter-server chip.CTL[126] INFO Trying connection to commissionee over different transport
2023-06-10 11:50:06 core-matter-server chip.IN[126] INFO (U) Sending msg 93321970 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:08 core-matter-server chip.IN[126] INFO (U) Sending msg 93321970 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:10 core-matter-server chip.IN[126] INFO (U) Sending msg 93321970 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:20 core-matter-server chip.IN[126] INFO (U) Sending msg 93321970 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:38 core-matter-server chip.EM[126] ERROR Failed to Send CHIP MessageCounter:93321970 on exchange 42533i sendCount: 4 max retries: 4
2023-06-10 11:50:43 core-matter-server chip.SC[126] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-06-10 11:50:43 core-matter-server chip.CTL[126] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-06-10 11:50:43 core-matter-server chip.CTL[126] INFO Attempting PASE connection to UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540
2023-06-10 11:50:43 core-matter-server chip.EM[126] INFO <<< [E:42534i S:0 M:93321971] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-06-10 11:50:43 core-matter-server chip.IN[126] INFO (U) Sending msg 93321971 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:43 core-matter-server chip.CTL[126] INFO Commission called for node ID 0x0000000000000011
2023-06-10 11:50:43 core-matter-server chip.CTL[126] INFO Trying connection to commissionee over different transport
2023-06-10 11:50:44 core-matter-server chip.IN[126] INFO (U) Sending msg 93321971 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:45 core-matter-server chip.IN[126] INFO (U) Sending msg 93321971 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:48 core-matter-server chip.IN[126] INFO (U) Sending msg 93321971 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:50:58 core-matter-server chip.IN[126] INFO (U) Sending msg 93321971 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:51:12 core-matter-server chip.EM[126] ERROR Failed to Send CHIP MessageCounter:93321971 on exchange 42534i sendCount: 4 max retries: 4
2023-06-10 11:51:20 core-matter-server chip.SC[126] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-06-10 11:51:20 core-matter-server chip.CTL[126] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-06-10 11:51:20 core-matter-server chip.CTL[126] INFO Attempting PASE connection to UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540
2023-06-10 11:51:20 core-matter-server chip.EM[126] INFO <<< [E:42535i S:0 M:93321972] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-06-10 11:51:20 core-matter-server chip.IN[126] INFO (U) Sending msg 93321972 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:51:20 core-matter-server chip.CTL[126] INFO Commission called for node ID 0x0000000000000011
2023-06-10 11:51:20 core-matter-server chip.CTL[126] INFO Trying connection to commissionee over different transport
2023-06-10 11:51:22 core-matter-server chip.IN[126] INFO (U) Sending msg 93321972 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:51:23 core-matter-server chip.IN[126] INFO (U) Sending msg 93321972 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:51:25 core-matter-server chip.IN[126] INFO (U) Sending msg 93321972 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:51:30 core-matter-server chip.EM[126] INFO >>> [E:18371r S:62754 M:69897210] (S) Msg RX from 1:0000000000000001 [0CEC] --- Type 0001:05 (IM:ReportData)
2023-06-10 11:51:30 core-matter-server chip.DMG[126] INFO Refresh LivenessCheckTime for 124224 milliseconds with SubscriptionId = 0x0696f9e1 Peer = 01:0000000000000001
2023-06-10 11:51:30 core-matter-server chip.EM[126] INFO <<< [E:18371r S:62754 M:206342948 (Ack:69897210)] (S) Msg TX to 1:0000000000000001 [0CEC] --- Type 0001:01 (IM:StatusResponse)
2023-06-10 11:51:30 core-matter-server chip.IN[126] INFO (S) Sending msg 206342948 on secure session with LSID: 62754
2023-06-10 11:51:30 core-matter-server chip.EM[126] INFO >>> [E:18371r S:62754 M:69897211 (Ack:206342948)] (S) Msg RX from 1:0000000000000001 [0CEC] --- Type 0000:10 (SecureChannel:StandaloneAck)
2023-06-10 11:51:37 core-matter-server chip.IN[126] INFO (U) Sending msg 93321972 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:51:54 core-matter-server chip.EM[126] ERROR Failed to Send CHIP MessageCounter:93321972 on exchange 42535i sendCount: 4 max retries: 4
2023-06-10 11:51:58 core-matter-server chip.SC[126] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-06-10 11:51:58 core-matter-server chip.CTL[126] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-06-10 11:51:58 core-matter-server chip.CTL[126] INFO Attempting PASE connection to UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540
2023-06-10 11:51:58 core-matter-server chip.EM[126] INFO <<< [E:42536i S:0 M:93321973] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-06-10 11:51:58 core-matter-server chip.IN[126] INFO (U) Sending msg 93321973 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:51:58 core-matter-server chip.CTL[126] INFO Commission called for node ID 0x0000000000000011
2023-06-10 11:51:58 core-matter-server chip.CTL[126] INFO Trying connection to commissionee over different transport
2023-06-10 11:51:59 core-matter-server chip.IN[126] INFO (U) Sending msg 93321973 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:52:01 core-matter-server chip.IN[126] INFO (U) Sending msg 93321973 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:52:03 core-matter-server chip.IN[126] INFO (U) Sending msg 93321973 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:52:14 core-matter-server chip.IN[126] INFO (U) Sending msg 93321973 to IP address 'UDP:[fd9c:b44b:422f:0:8f13:c397:d8b:78a5]:5540'
2023-06-10 11:52:33 core-matter-server chip.EM[126] ERROR Failed to Send CHIP MessageCounter:93321973 on exchange 42536i sendCount: 4 max retries: 4
2023-06-10 11:52:36 core-matter-server chip.SC[126] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-06-10 11:52:36 core-matter-server chip.ZCL[126] ERROR Secure Pairing Failed
2023-06-10 11:52:36 core-matter-server matter_server.server.client_handler[126] ERROR [548079816464] Error handling message: CommandMessage(message_id='7f9249faa2cd41a8b6109015b8369cd2', command='commission_with_code', args={'code': 'MT:00000MNY166FHI44C00'})
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 154, in commission_with_code
    raise NodeCommissionFailed(
matter_server.common.errors.NodeCommissionFailed: Commission with code failed for node 17

Also, I have tried the Bluetooth pairing you suggested, but BLE times out, just like in leon’s reply above.

I am now trying to pair a Nanoleaf bulb, but I have zero hopes that this will actually work,

Also, it is worth noting that setting thread credentials (which does work according to your instructions) has zero effect on either the mobile or the Bluetooth method.

Are you using the wrong pairing code? In your log i found your pairing code:

00000MNY166FHI44C00

Now i tried this code in my Matter Server. But i got:

Message from server  {
  "message_id": "2",
  "error_code": 7,
  "details": "src/setup_payload/ManualSetupPayloadParser.cpp:49: CHIP Error 0x00000013: Integrity check failed"
}

Than i tried a pairing code which i found on the internet from someone else.

23579333921

Together with this request:

var socket = new WebSocket("ws://192.168.2.130:5580/ws");
socket.addEventListener("message", (event) => {
    console.log("Message from server ", event.data);
});

socket.addEventListener("open", (event) => {
    console.log("WebSocket is open");
    var message = {
        "message_id": "2",
        "command": "commission_with_code",
        "args": {
            "code": "23579333921"
        }
    };
    socket.send(JSON.stringify(message));
}); 

I got these results (Firefox Developer Console)*

WebSocket is open

Message from server  {
  "fabric_id": 2,
  "compressed_fabric_id": 1706132734047754700,
  "schema_version": 3,
  "min_supported_schema_version": 2,
  "sdk_version": "2023.6.0",
  "wifi_credentials_set": false,
  "thread_credentials_set": false
}

Message from server  {
  "message_id": "2",
  "error_code": 1,
  "details": "Commission with code failed for node 16"
}

And the Matter Server Log:

2023-06-10 18:54:24 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from DCL.
2023-06-10 18:54:24 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from DCL.
2023-06-10 18:54:24 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from Git.
2023-06-10 18:54:24 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from Git.
2023-06-10 18:54:24 core-matter-server chip.CTL[126] INFO Setting attestation nonce to random value
2023-06-10 18:54:24 core-matter-server chip.CTL[126] INFO Setting CSR nonce to random value
2023-06-10 18:54:24 core-matter-server chip.CTL[126] INFO Starting commissioning discovery over BLE
2023-06-10 18:54:24 core-matter-server chip.CTL[126] INFO Starting commissioning discovery over DNS-SD
2023-06-10 18:54:24 core-matter-server chip.BLE[126] INFO BLE removing known devices.
2023-06-10 18:54:24 core-matter-server chip.BLE[126] INFO BLE initiating scan.
2023-06-10 18:54:34 core-matter-server chip.BLE[126] ERROR BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:154: CHIP Error 0x00000032: Timeout
2023-06-10 18:54:34 core-matter-server chip.BLE[126] INFO Scan complete. No matching device found.
2023-06-10 18:54:54 core-matter-server chip.CTL[126] ERROR Discovery timed out
2023-06-10 18:54:54 core-matter-server chip.BLE[126] ERROR BleConnectionDelegate::CancelConnection is not implemented.
2023-06-10 18:54:54 core-matter-server chip.-[126] ERROR src/platform/Linux/BLEManagerImpl.cpp:732: CHIP Error 0x0000002D: Not Implemented at src/controller/SetUpCodePairer.cpp:551
2023-06-10 18:54:54 core-matter-server chip.ZCL[126] ERROR Secure Pairing Failed
2023-06-10 18:54:54 core-matter-server matter_server.server.client_handler[126] ERROR [140260635031696] Error handling message: CommandMessage(message_id='2', command='commission_with_code', args={'code': '23579333921'})
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 154, in commission_with_code
    raise NodeCommissionFailed(
matter_server.common.errors.NodeCommissionFailed: Commission with code failed for node 16
2023-06-10 18:54:55 core-matter-server chip.DIS[126] ERROR Timeout waiting for mDNS resolution.
2023-06-10 18:54:57 core-matter-server chip.EM[126] INFO >>> [E:17547r S:22467 M:13334482] (S) Msg RX from 1:0000000000000009 [19CC] --- Type 0001:05 (IM:ReportData)
2023-06-10 18:54:57 core-matter-server chip.DMG[126] INFO Refresh LivenessCheckTime for 124224 milliseconds with SubscriptionId = 0x6a3f27fa Peer = 01:0000000000000009
2023-06-10 18:54:57 core-matter-server chip.EM[126] INFO <<< [E:17547r S:22467 M:121614246 (Ack:13334482)] (S) Msg TX to 1:0000000000000009 [19CC] --- Type 0001:01 (IM:StatusResponse)
2023-06-10 18:54:57 core-matter-server chip.IN[126] INFO (S) Sending msg 121614246 on secure session with LSID: 22467
2023-06-10 18:54:57 core-matter-server chip.EM[126] INFO >>> [E:17547r S:22467 M:13334483 (Ack:121614246)] (S) Msg RX from 1:0000000000000009 [19CC] --- Type 0000:10 (SecureChannel:StandaloneAck)

`* I think it is ok if this is false, because it was in the past true. But i am not sure. My matter device with the other pairing code is working for weeks now.

"thread_credentials_set": false

I’m speculating that your device is connected via Thread and the TBR is Discovery Advertising as proxy as the Matter Server says it has found via Discovery a device to be commissioned.

The Matter Server then starts the PASE process whereby it wants to establish communications with the device but the logs show that it is not able to talk to the device via IPv6:

You may want to try ip -6 route from a HA linux shell to see if there is a route to fd9c:b44b:422f:0::/64.

You are entirely right in your assumption, and, indeed, there is no route. What can I do about it?

What I don’t understand is why this is the case.

My Thread network looks like this:

IPv6:LinkLocalAddress
fe80:0:0:0:c8a2:1c2:eb6c:3a04

IPv6:LocalAddress
fd9a:296c:7018:1:4bc0:7792:82fa:4d0e

IPv6:MeshLocalAddress
fd4f:cbfb:a99e:a9c2:edbe:bfb2:a5fd:e5a

IPv6:MeshLocalPrefix
fd4f:cbfb:a99e:a9c2:

If I check the routes, I see the following for my wpan0, which I assume to be my SkyConnect

fd4f:cbfb:a99e:a9c2::/64 dev wpan0  metric 256 
fd9a:296c:7018:1::/64 dev wpan0  metric 256 
fe80::/64 dev wpan0  metric 256 
fe80::/64 dev eth0  metric 1024
anycast fd4f:cbfb:a99e:a9c2:: dev wpan0  metric 0 
anycast fd9a:296c:7018:1:: dev wpan0  metric 0 
anycast fe80:: dev wpan0  metric 0 
multicast ff00::/8 dev wpan0  metric 256 

From what I see, this should all be completely correct. If there is something not apparently correct with them, please someone let me know.

In that case, I wonder, why is it trying to reach the fd9c:b44b:422f:0::/64 network?

OK, so looking into this route thing, I enabled OTBR agent’s logs on info-level, and I did find the offending network in it. It seems that it is publishing and unpublishing it repeatedly. Here is a log:

adrianmos.eu/Pages/halogs/some.txt

Note that I am not doing anything during this log (other than having restarted the SiLabs Multiprotocol add-on). I am not actually trying to add any device. This is just how the OTBR rolls while idle.

What you see just goes on forever. Unfortunately, I have not had time to study much OTBR code, so I would appreciate if anyone with experience would notice where the problem lies.

Yes wpan0 is SkyConnect’s Thread interface…

I didn’t look through all the logs, but from what I can tell…

  • The OTBR says it saw Routing Advertisements (RAs) from 3 different Link Local Addresses (LLA) which is most likely from 3 different routers (I’ll presume these are indeed routers, maybe TBRs).
  • 2 of the 3 routers sending RAs are advertising actual routes (RIO). It is one of these 2 routers that is advertising the route of interest (fd9c:b44b:422f:0::/64).
  • After a while (at 00:01:21.469) the OTBR pings these particular two routers using Neighbor Solicitation to their LLAs and they don’t respond, upon which the OTBR removes the routes they advertise… which includes the fd9c:b44b:422f:0::/64 route.
  • but sometime later (at 00:01:33.523) the OTBR again starts seeing RAs from these 2 routers again.

And the cycle repeats.

This is very bizarre…

Anyway it looks like when you attempted to use Matter to add a device, that device was already attached to another Thread network which was not HA’s OTBR network. Do you have or think you have other Thread networks?

Well I obviously do have multiple Thread networks, as stated in the initial posts, since the Eve device I’m trying to add is already connected to Apple Home’s thread network.

As of this moment, I am unable to do any of the following:

  • add any new Matter device on Thread to my Home Assistant
  • add any Matter device on Thread that has already been paired to HomeKit, after putting it in pairing mode and using the dynamically-generated code
  • add any Thread device using HomeKit Controller

By all means, it appears that Thread simply refuses to work on my Home Assistant instance, using a SkyConnect and the multiprotocol add-on. How do I go about diagnosing it?

Maybe to recap (sorry I often run out of time to go back through the Thread to figure out what the state of things are), is that

  • You have a device on an Apple Home Thread network and you are trying to use HA Matter to add this device.
  • The Matter log says during commissioning it is trying to reach a device for commissioning that has ip6 address fd9c:b44b:422f:0:8f13:c397:d8b:78a5 but the Matter server can’t reach it, so the commissioning fails.
  • OTBR logs says it is getting routes advertisements from 3 routers
    • Received Router Advertisement from fe80:0:0:0:3e7c:3fff:fee4:9e80 on infra netif 2
    • Received Router Advertisement from fe80:0:0:0:14e4:bea2:c94e:8fdf on infra netif 2
    • The 3rd router’s Router Advertisement does not contain routes (only PIO), so we can ignore it
  • Looking at various places in the log, it is the second router that is advertising the route of interest
    • Processing RIO (fd9c:b44b:422f:0::/64, 1800 seconds)
  • Sometime later the OTBR is sending Neighbor Solicitations to these two routers, and neither are responding and it removes the route of interest:
    • No response to all Neighbor Solicitations attempts from router fe80:0:0:0:14e4:bea2:c94e:8fdf.
      ExternalRoute fd9c:b44b:422f:0::/64 - State: Added -> NoEntry
    • No response to all Neighbor Solicitations attempts from router fe80:0:0:0:d9f1:8d3a:a4e1:628a

So the question (I think) is why is the router (most likely the Apple TBR) whose LLA is fe80:0:0:0:14e4:bea2:c94e:8fdf dropping out and reappearing?

My first thought would be to go to a different linux machine on the same LAN and ping that address to see if there are any drop outs. For Ubuntu:
$ ping -6 -D -i 10 fe80:0:0:0:14e4:bea2:c94e:8fdf -I <Interface-name>
Since this is a link local address, the ping command requires you specify which interface to send the ping out over, for example eth0.
This should ping the offending router every 10 secs and provide a timestamp. I would say check it after several minutes to see if intervals were skipped.

If this looks ok, then I would go into your HA probably any shell will do and try pinging that same link local address periodically. My HAOS’s ping command doesn’t appear to have a lot of bells and whistles, the -D -i flags don’t seem to be supported and using then provides no output (even for failed pings)…which can be confusing because a positive ping also has no output, whereas a failed ping does.

@wmaker I need to buy you a beer (please replace with whatever beverage or similarly-valued product would be appropriate).

As it turns out, one of my IPv6 addresses was mysteriously missing from the configuration, and the routes couldn’t properly function. Since HA does keep the network interface’s details even after network changes, it stands to reason that, while the routes would form correctly from the point of view of HA, they would not match with the OS-level routes, and packets would be promptly dropped. It’s probably a lapse of judgement on my part, but that appears to be what the problem was.

It was due to your prompting that I got to investigate routes, so, like I said, I owe you one.

Sooooooo… did you manually change the host routes? What is the correct user-servicable action here? I think I’m in the same boat, but don’t know what to do.

(I’m on HAOS, if that matters)

1 Like

I finally managed to connect my Eve motion sensor using these instructions combined with using bluetooth on my home assistant device (an Intel NUC). At first it didn’t work using my iPhone, only after placing the Motion Sensor next to the Intel NUC I managed to connect it to Home Assistant using the instructions. It has been stable for a couple of days now on several places in the house.

Where do i get my own dataset?
Thanks

Here (See my screenshot):