"Thread border router required" with Eve and Matter

I just found the reason why they require Bluetooth on the Phone.

Maybe the Samsung Android tablet is too old? For Android you need Matter Support. Do you have the https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app app? See also: "Add matter device" unavailable - #18 by omriasta

This is my matter server log

s6-rc: info: service legacy-cont-init successfully started
-----------------------------------------------------------
 Add-on: Matter Server
 Matter WebSocket Server for Home Assistant Matter support.
-----------------------------------------------------------
 Add-on version: 4.3.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.1  (amd64 / qemux86-64)
 Home Assistant Core: 2023.4.6
 Home Assistant Supervisor: 2023.04.1
-----------------------------------------------------------
 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 matter-server: starting
s6-rc: info: service matter-server successfully started
s6-rc: info: service legacy-services: starting
[14:44:35] INFO: Starting Matter Server...
s6-rc: info: service legacy-services successfully started
[14:44:35] INFO: Successfully send discovery information to Home Assistant.
2023-05-02 14:44:37 core-matter-server matter_server.server.stack[126] INFO Initializing CHIP/Matter Controller Stack...
[1683031477.364762][126:126] CHIP:CTL: Setting attestation nonce to random value
[1683031477.365765][126:126] CHIP:CTL: Setting CSR nonce to random value
[1683031477.375883][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1683031477.376086][126:126] CHIP:DL: writing settings to file (/tmp/chip_kvs-4tL4WJ)
[1683031477.376170][126:126] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1683031477.376616][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_factory.ini
[1683031477.377188][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_config.ini
[1683031477.377588][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_counters.ini
[1683031477.378436][126:126] CHIP:DL: writing settings to file (/data/chip_counters.ini-QLrvdL)
[1683031477.378638][126:126] CHIP:DL: renamed tmp file to file (/data/chip_counters.ini)
[1683031477.378660][126:126] CHIP:DL: NVS set: chip-counters/reboot-count = 4 (0x4)
[1683031477.378958][126:126] CHIP:DL: Got Ethernet interface: enp0s18
[1683031477.379113][126:126] CHIP:DL: Found the primary Ethernet interface:enp0s18
[1683031477.379484][126:126] CHIP:DL: Failed to get WiFi interface
[1683031477.379498][126:126] CHIP:DL: Failed to reset WiFi statistic counts
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] WARNING Initializing persistent storage from file: /data/chip.json
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] WARNING Loading configuration from /data/chip.json...
2023-05-02 14:44:37 core-matter-server chip.TS[126] INFO Last Known Good Time: 2023-04-18T07:39:42
2023-05-02 14:44:37 core-matter-server chip.FP[126] INFO Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x36A2AFEC539A2BC7, FabricId 0x0000000000000002, NodeId 0x000000000001B669, VendorId 0x134B
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/gcc = b'\xa0\x0f\x00\x00'
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/gdc = b'\xa0\x0f\x00\x00'
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:37 core-matter-server chip.ZCL[126] INFO Using ZAP configuration...
2023-05-02 14:44:37 core-matter-server chip.DL[126] ERROR MDNS failed to join multicast group on vethf79ea38 for address type IPv4: ../src/inet/UDPEndPointImplSockets.cpp:764: Inet Error 0x00000110: Address not found
2023-05-02 14:44:37 core-matter-server chip.DL[126] ERROR MDNS failed to join multicast group on vethc1301c2 for address type IPv4: ../src/inet/UDPEndPointImplSockets.cpp:764: Inet Error 0x00000110: Address not found
2023-05-02 14:44:37 core-matter-server chip.DL[126] ERROR MDNS failed to join multicast group on veth403db3b for address type IPv4: ../src/inet/UDPEndPointImplSockets.cpp:764: Inet Error 0x00000110: Address not found
2023-05-02 14:44:37 core-matter-server chip.DL[126] ERROR MDNS failed to join multicast group on vethfc3728d for address type IPv4: ../src/inet/UDPEndPointImplSockets.cpp:764: Inet Error 0x00000110: Address not found
2023-05-02 14:44:37 core-matter-server chip.DL[126] ERROR MDNS failed to join multicast group on vethd25bd6d for address type IPv4: ../src/inet/UDPEndPointImplSockets.cpp:764: Inet Error 0x00000110: Address not found
2023-05-02 14:44:37 core-matter-server chip.DL[126] ERROR MDNS failed to join multicast group on veth0d7d78a for address type IPv4: ../src/inet/UDPEndPointImplSockets.cpp:764: Inet Error 0x00000110: Address not found
2023-05-02 14:44:37 core-matter-server CertificateAuthorityManager[126] WARNING Loading certificate authorities from storage...
2023-05-02 14:44:37 core-matter-server CertificateAuthority[126] WARNING New CertificateAuthority at index 1
2023-05-02 14:44:37 core-matter-server CertificateAuthority[126] WARNING Loading fabric admins from storage...
2023-05-02 14:44:37 core-matter-server FabricAdmin[126] WARNING New FabricAdmin: FabricId: 0x0000000000000002, VendorId = 0x134B
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] INFO SetReplKey: caList = {'1': [{'fabricId': 2, 'vendorId': 4939}]}
2023-05-02 14:44:37 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:37 core-matter-server matter_server.server.stack[126] INFO CHIP Controller Stack initialized.
2023-05-02 14:44:37 core-matter-server matter_server.server.server[126] INFO Starting the Matter Server...
2023-05-02 14:44:37 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from DCL.
2023-05-02 14:44:44 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 79 PAA root certificates from DCL.
2023-05-02 14:44:44 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from Git.
2023-05-02 14:44:44 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 2 PAA root certificates from Git.
2023-05-02 14:44:44 core-matter-server FabricAdmin[126] WARNING Allocating new controller with CaIndex: 1, FabricId: 0x0000000000000002, NodeId: 0x000000000001B669, CatTags: []
2023-05-02 14:44:44 core-matter-server chip.CTL[126] INFO Setting attestation nonce to random value
2023-05-02 14:44:44 core-matter-server chip.CTL[126] INFO Setting CSR nonce to random value
2023-05-02 14:44:44 core-matter-server chip.SPT[126] INFO Using device attestation PAA trust store path /usr/local/lib/python3.10/site-packages/credentials/development/paa-root-certs.
2023-05-02 14:44:44 core-matter-server chip.CTL[126] INFO Generating NOC
2023-05-02 14:44:44 core-matter-server chip.FP[126] INFO Validating NOC chain
2023-05-02 14:44:44 core-matter-server chip.FP[126] INFO NOC chain validation successful
2023-05-02 14:44:44 core-matter-server chip.FP[126] INFO Updated fabric at index: 0x1, Node ID: 0x000000000001B669
2023-05-02 14:44:44 core-matter-server chip.TS[126] INFO Last Known Good Time: 2023-04-18T07:39:42
2023-05-02 14:44:44 core-matter-server chip.TS[126] INFO New proposed Last Known Good Time: 2021-01-01T00:00:00
2023-05-02 14:44:44 core-matter-server chip.TS[126] INFO Retaining current Last Known Good Time
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/fs/c = b'\x15$\x00\x01(\x01\x18'
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO SetSdkKey: f/1/m = b'\x15%\x00K\x13,\x01\x00\x18'
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:44 core-matter-server chip.FP[126] INFO Metadata for Fabric 0x1 persisted to storage.
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO SetSdkKey: f/1/n = b'\x150\x01\x01\x01$\x02\x017\x03$\x13\x02\x18&\x04\x80"\x81\'&\x05\x80%M:7\x06$\x15\x02&\x11i\xb6\x01\x00\x18$\x07\x01$\x08\x010\tA\x04\xce\x9a@wK}\xcbR\x16\xb9\x82\x10\xf5c\xbb\xad]\xc0\x15L\xdb#k\x19\xa2K\xb7\x147;\xcaO)\x1b\x83q\x10\xb5\x9a\xb6J\x96cty(\x13\xbaBk\xf5;\xe2\x06\'\xa9[i\xe8v$y\x07\xa47\n5\x01(\x01\x18$\x02\x016\x03\x04\x02\x04\x01\x180\x04\x14f#\x83\x8b.\x16\xe1\xde)\xe0}Lb\x9aT\xe7\xb1{\xe7\xe30\x05\x14n\x84z,ab\x8c)zX!\x01q\xef\x90\x8c7\xff+,\x180\x0b@Y\xf8\xaa\x0c$\xaf\xa2&\xe7)\xb1S\x1c2F\xe3\xa0\x1ae\xf95\xe6\xb83\xfb$XR\x10\xad\xf7\xdd5d\x98\xb2\xf2^\x12\x9a\xe8\xf7\x81\x11!l`\x88\x0c\xcf\xfd\xf7\xe4\x80\xe9 w\x94\xca\x94cv)\xda\x18'
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO SetSdkKey: f/1/i = b'\x150\x01\x01\x01$\x02\x017\x03$\x14\x01\x18&\x04\x80"\x81\'&\x05\x80%M:7\x06$\x13\x02\x18$\x07\x01$\x08\x010\tA\x04Ct\xb9\xaa\xcc\x83\x8d\xe0\x92Z\x03\xa7!\xa7&\xd8\xeb\xf7\x85?}\xf5&\xb3\xdc|\x1b\x9e\xbcu84\x0en\x83BC6\'\x95\xc9T.@\xa2\xb5C\xe2bP\x80\xbe.z\xea,\xf9[\xa9JJ\xf7\x94\x8f7\n5\x01)\x01\x18$\x02`0\x04\x14n\x84z,ab\x8c)zX!\x01q\xef\x90\x8c7\xff+,0\x05\x14B\xac.-\x18R!5f\xf5\xdb\xe6q\xdd5\x04hd\xab\xd2\x180\x0b@\xc9u\xad\xc6\xa2\xc1\x1e11\x17\x02\xbfA\xaa%?Q1\xf8\xce;\x19>\xb1Ls\xbf\xbcZ,\x18\xf6\x07U\x8c\xdc\xba\x85\x93&3Px\x84\xde\xbe\xec\xd6\x08D\x83\xac\xacc`\x8c+]\x9d\x8d\x9a),\x9d\x18'
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:44 core-matter-server chip.TS[126] INFO Committing Last Known Good Time to storage: 2023-04-18T07:39:42
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/lkgt = b'\x15&\x00\xbe\x05\xd1+\x18'
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO DeleteSdkKey: g/fs/c
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:44 core-matter-server chip.CTL[126] INFO Joined the fabric at index 1. Fabric ID is 0x0000000000000002 (Compressed Fabric ID: 36A2AFEC539A2BC7)
2023-05-02 14:44:44 core-matter-server chip.CTL[126] INFO *** Missing DeviceAttestationVerifier configuration at DeviceCommissioner init: using global default, consider passing one in CommissionerInitParams.
2023-05-02 14:44:44 core-matter-server chip.SPT[126] INFO Setting up group data for Fabric Index 1 with Compressed Fabric ID:
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO SetSdkKey: f/1/k/0 = b'\x15$\x01\x00$\x02\x016\x03\x15$\x04\x00%\x05{\xf90\x06\x10i=/\x19 \x074\x1d\r\xc0\xb8t\xb3\x88\x82;\x18\x15$\x04\x00$\x05\x000\x06\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x15$\x04\x00$\x05\x000\x06\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x18%\x07\xff\xff\x18'
2023-05-02 14:44:44 core-matter-server PersistentStorage[126] INFO Committing...
2023-05-02 14:44:44 core-matter-server matter_server.server.vendor_info[126] INFO Loading vendor info from storage.
2023-05-02 14:44:44 core-matter-server matter_server.server.vendor_info[126] INFO Loaded 62 vendors from storage.
2023-05-02 14:44:44 core-matter-server matter_server.server.vendor_info[126] INFO Fetching the latest vendor info from DCL.
2023-05-02 14:44:44 core-matter-server matter_server.server.vendor_info[126] INFO Fetched 62 vendors from DCL.
2023-05-02 14:44:44 core-matter-server matter_server.server.vendor_info[126] INFO Saving vendor info to storage.

1 Like

From what I see in your log, mDNS does not properly work, so maybe check into that?

As for why they require the phone, I read that as well, and I would still like to have the option because: 1. I’m not using the “built-in Bluetooth integration” for anything useful and 2. the device is well within BT range.

As for my tablet being too old… too old for what, exactly? I don’t have the “Google Home” app, I don’t have any Google Home-related products… which is all the more reason I find that using the phone’s built-in ecosystem apps is a stupid idea. I guess until the team can work out a way (or have time) to do it without hooking into the current implementations, it is OK, but still this is completely unusable.

1 Like

I dont know how to fix this problem. I reinstalled HA on my server and it did not fixed it. Also i found other people with this DNS error: Matter Server - Pairing with Eve Energy fails: Error handling message: CommandMessage · Issue #89056 · home-assistant/core · GitHub
But no fix there.

Can you give me your full log under http://your ip:8123/hassio/addon/core_matter_server/logs ? I just want to know, whether you dont have my dns error.

Old Tablets maybe have only Android 4.0 or an unsupported Bluetooth generation. I think Bluetooth 4.2 or higher are good, because they support ipv6.

1 Like

Ok, so I looked at the Matter server log, and as it turns out I have the same mDNS errors, I just didn’t see them because they were waaaaaaay before when the Matter server first started up.

Those errors, however, seem to have nothing to do about Matter in general, as I do have Matter devices (an Aqara hub) which do work fine (well, fine might be overstating it, but they do work). They were discovered correctly, and they worked correctly. But those, it seems, do not need to do BLE pairing.

Please confirm me some things:

  1. You connect HA to the network via Ethernet
  2. Your Thread device works in the Home app or otherwise

As for the Android tablet, I’m quite sure that’s not the case. BT before 4.2 would make it not old, but ancient.

1 Like

OK, is anyone, I mean ANYONE able to help with information on this? I can find no fault with my configuration, to the extent of the information I have, and I still cannot add things.

I am running into similar problems, but I have a different setup, as I explained here.
Also, I am connected via ethernet and wifi. Both of them have ipv6 turned on, but it doesnt help

I dont get it to work. But i found an extra menu for thread.

  1. Add port 8080 to the configuration of Silicon Labs Multiprotocol

  2. Visit [your ip]:8080

Now i will show my Openthread Border Router, maybe yours looks similar or different

  1. Join

  2. Form: Channel 15, but my zigbee is running on channel 11?? They need the same channel, or?

  3. Status

  4. Settings

  5. Commission

  6. Topology

I am aware of the web interface. There is nothing in there that I can figure out to be of any help. I am still unable to add any Thread-based matter devices.

There is also another web service. Maybe you can call this service and tell me whether you get a different thread status?

You can connect to the Matter Server WebSocket. Enter port 5580.

Now connect to the WebSocket with postman or in the developer tools in your browser. You can use these commands: GitHub - home-assistant-libs/python-matter-server: Python server to interact with Matter

Here is a example. My HomeAssistant is running on 192.168.1.183:8123:

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

And here is the result:

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

thread_credentials_set is in my MatterServer always false. Is yours also false? How should my Matter Server connect to eve with no thread credentials?

2 Likes

I have the same issue. Here’s my output:

{
  "fabric_id": 2,
  "compressed_fabric_id": 8016088222336825230,
  "schema_version": 3,
  "min_supported_schema_version": 2,
  "sdk_version": "2023.4.1",
  "wifi_credentials_set": false,
  "thread_credentials_set": false
}

I send the websocket message

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

to Matter Server. After that, thread_credentials_set was TRUE!

I got the dateset value from my thread integration:

Edit - I think i got my eve motion working :wink:
First, the Home Assistant was lying when they told us, that we cant use bluetooth on our home assistant server.
So here are my steps:

  1. Enable Websocket
  2. Give your Home Assistant Bluetooth
  3. Restart your Matter Server
  4. Send message with your thread dataset
  5. Send message with your matter device code
 {
    "message_id": "2",
    "command": "commission_with_code",
    "args": {
      "code": "30846023139"
    }
  }
  1. Enjoy
8 Likes

Fantastic! I’ll try this out shortly and confirm if it works for me.

Worked flawlessly. Thank you so much!

Thanks for the suggestion, but sadly this does not work for me

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