Coder Social home page Coder Social logo

home-assistant-libs / python-matter-server Goto Github PK

View Code? Open in Web Editor NEW
331.0 19.0 54.0 2.43 MB

Python server to interact with Matter

License: Apache License 2.0

Python 45.05% Shell 0.24% Dockerfile 0.13% HTML 0.21% JavaScript 0.17% TypeScript 54.20%
matter

python-matter-server's Introduction

Python Matter Server

This project implements a Matter Controller Server over WebSockets using the official Matter (formerly CHIP) SDK as a base and provides both a server and client implementation.

The goal of this project is primarily to have Matter support in Home Assistant but its universal approach makes it suitable to be used in other projects too.

Support

Got questions?

You have several options to get them answered:

If you experience issues using Matter with Home Assistant, please open an issue report in the Home Assistant Core repository.

You may also open issues in this repository if you are absolutely sure that your issue is related to the Matter Server component.

Installation

We strongly recommend using Home Assistant OS along with the official Matter Server add-on to use Matter with Home Assistant. The Matter integration automatically installs the Python Matter Server add-on. Please refer to the Home Assistant documentation. Home Assistant OS has been tested and tuned to be used with Matter and Thread, which makes this combination the best tested and largely worry free environment.

If you still prefer a self-managed container installation, we do offer an official container image. Please keep in mind that you might experience communication issues with Matter devices, especially Thread based devices. This is mostly because the container installation uses host networking, and relies on the networking managed by your operating system.

Requirements to communicate with Wi-Fi/Ethernet based Matter devices

Make sure you run the container on the host network. The host network interface needs to be in the same network as the Android/iPhone device you are using for commissioning. Matter uses link-local multicast protocols which do not work across different LANs or VLANs.

The host network interface needs IPv6 support enabled.

Requirements to communicate with Thread devices through Thread border routers

For communication through Thread border routers which are not running on the same host as the Matter Controller server to work, IPv6 routing needs to be properly working. IPv6 routing is largely setup automatically through the IPv6 Neighbor Discovery Protocol, specifically the Route Information Options (RIO). However, if IPv6 Neighbor Discovery RIO's are processed, and processed correctly depends on the network management software your system is using. There may be bugs and caveats in processing this Route Information Options.

In general, make sure the kernel option CONFIG_IPV6_ROUTER_PREF is enabled and that IPv6 forwarding is disabled (sysctl variable net.ipv6.conf.all.forwarding). If IPv6 forwarding is enabled, the Linux kernel doesn't employ reachability probing (RFC 4191), which can lead to longer outages (up to 30min) until network changes are detected.

If you are using NetworkManager, make sure to use at least NetworkManager 1.42. Previous versions lose track of routes and stale routes can lead to unreachable Thread devices. All current released NetworkManager versions can't handle multiple routes to the same network properly. This means if you have multiple Thread border routers, the fallback won't work immediately (see NetworkManager issue #1232).

We currently don't have experience with systemd-networkd. It seems to have its own IPv6 Neighbor Discovery Protocol handling.

If you don't use NetworkManager or systemd-networkd, you can use the kernel's IPv6 Neighbor Discovery Protocol handling.

Make sure the kernel options CONFIG_IPV6_ROUTE_INFO is enabled and the following sysctl variables are set:

sysctl -w net.ipv6.conf.wlan0.accept_ra=1
sysctl -w net.ipv6.conf.wlan0.accept_ra_rt_info_max_plen=64

If your system has IPv6 forwarding enabled (not recommended, see above), you'll have to use 2 for the accept_ra variable. See also the Thread Border Router - Bidirectional IPv6 Connectivity and DNS-Based Service Discovery codelab.

Running the Matter Server using container image

With the following command you can run the Matter Server in a container using Docker. The Matter network data (fabric information) are stored in a newly created directory data in the current directory. Adjust the command to choose another location instead.

mkdir data
docker run -d \
  --name matter-server \
  --restart=unless-stopped \
  --security-opt apparmor=unconfined \
  -v $(pwd)/data:/data \
  -v /run/dbus:/run/dbus:ro \
  --network=host \
  ghcr.io/home-assistant-libs/python-matter-server:stable

Running using Docker compose

docker compose up -d
docker compose logs -f

NOTE: Both Matter and this implementation are in early (v1) state and features are probably missing or could be improved. See our development notes how you can help out, with development and/or testing.

Running the development server

For enabling Matter support within Home Assistant, please refer to the Home Assistant documentation. These instructions are for development only!

To install the server (including client): pip install python-matter-server[server] To only install the client part: pip install python-matter-server

The client library has a dependency on the chip/matter clusters package which contains all (Cluster) models and this package is os/platform independent. The server library depends on the Matter Core SDK (still named CHIP) which is architecture and OS specific. We build (and publish) wheels for Linux (amd64 and aarch64) to pypi but for other platforms (like Macos) you will need to build those wheels yourself using the exact same version of the SDK as we use for the clusters package. Take a look at our build script for directions: https://github.com/home-assistant-libs/chip-wheels/blob/main/.github/workflows/build.yaml

Once you have the wheels installed, you can check out the example script in the scripts folder for generic directions to run the client and server. To just run the server, you can run:

python -m matter_server.server

Optional arguments:
  -h, --help            show help message and exit
  --vendorid VENDORID   Vendor ID for the Fabric, defaults to 65521
  --fabricid FABRICID   Fabric ID for the Fabric, defaults to 1
  --storage-path STORAGE_PATH
                        Storage path to keep persistent data, defaults to $HOME/.matter_server
  --port PORT           TCP Port to run the websocket server, defaults to 5580
  --log-level LOG_LEVEL
                        Provide logging level. Example --log-level debug, default=info, possible=(critical, error, warning, info, debug)
  --log-file LOG_FILE   Log file to write to (optional).

The server runs a Matter Controller and includes all logic for storing node information, interviews and subscriptions. To interact with this controller we've created a small Websockets API with an RPC-like interface. The library contains a client as reference implementation which in turn is used by Home Assistant. Splitting the server from the client allows the scenario where multiple consumers can communicate to the same Matter fabric and the Matter fabric can keep running while the consumer (e.g. Home Assistant is down).

Websocket commands

This list is not intended to be complete, for a complete oversight see the client implementation.

Set WiFi credentials Inform the controller about the WiFi credentials it needs to send when commissioning a new device.

{
  "message_id": "1",
  "command": "set_wifi_credentials",
  "args": {
    "ssid": "wifi-name-here",
    "credentials": "wifi-password-here"
  }
}

Set Thread dataset Inform the controller about the Thread credentials it needs to use when commissioning a new device.

{
  "message_id": "1",
  "command": "set_thread_dataset",
  "args": {
    "dataset": "put-credentials-here"
  }
}

Commission with code Commission a new device. For WiFi or Thread based devices, the credentials need to be set upfront, otherwise, commissioning will fail. Supports both QR-code syntax (MT:...) and manual pairing code as string. The controller will use bluetooth for the commissioning of wireless devices. If the machine running the Python Matter Server controller lacks Bluetooth support, commissioning will only work for devices already connected to the network (by cable or another controller).

{
  "message_id": "2",
  "command": "commission_with_code",
  "args": {
    "code": "MT:Y.ABCDEFG123456789"
  }
}

Open Commissioning window Open a commissioning window to commission a device present on this controller to another. Returns code to use as discriminator.

{
  "message_id": "2",
  "command": "open_commissioning_window",
  "args": {
    "node_id": 1
  }
}

Get Nodes Get all nodes already commissioned on the controller.

{
  "message_id": "2",
  "command": "get_nodes"
}

Get Node Get info of a single Node.

{
  "message_id": "2",
  "command": "get_node",
  "args": {
    "node_id": 1
  }
}

Start listening When the start_listening command is issued, the server will dump all existing nodes. From that moment on all events (including node attribute changes) will be forwarded.

{
  "message_id": "3",
  "command": "start_listening"
}

Send a command Because we use the datamodels of the Matter SDK, this is a little bit more involved. Here is an example of turning on a switch:

import json

# Import the CHIP clusters
from chip.clusters import Objects as clusters

# Import the ability to turn objects into dictionaries, and vice-versa
from matter_server.common.helpers.util import dataclass_from_dict,dataclass_to_dict

command = clusters.OnOff.Commands.On()
payload = dataclass_to_dict(command)


message = {
    "message_id": "example",
    "command": "device_command",
    "args": {
        "endpoint_id": 1,
        "node_id": 1,
        "payload": payload,
        "cluster_id": command.cluster_id,
        "command_name": "On"
    }
}

print(json.dumps(message, indent=2))
{
  "message_id": "example",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "node_id": 1,
    "payload": {},
    "cluster_id": 6,
    "command_name": "On"
  }
}

You can also provide parameters for the cluster commands. Here's how to change the brightness for example:

command = clusters.LevelControl.Commands.MoveToLevelWithOnOff(
  level=int(value), # provide a percentage
  transitionTime=0, # in seconds
)

Development

Want to help out with development, testing, and/or documentation? Great! As both this project and Matter keeps evolving and devices will hit the market with actual Matter support, there will be a lot to improve. Reach out to us on discord if you want to help out.

Setting up your development environment

Please note that development is only possible on Linux and MacOS, with no Windows support.

  • Download/clone the repo to your local machine.
  • Create a Python virtual environment.
  • Install the correct SDK wheels for both the cluster and core package, see instructions above if there is no wheel for your setup prebuilt.

Note when using Thread based Matter devices

When communicating with Thread devices through a non-local Thread border router, your host must process ICMPv6 Router Advertisements. See the openthread.io Bidirectional IPv6 Connectivity code labs on how-to setup your host correctly. Note that NetworkManager has its own ICMPv6 Router Advertisement processing. A recent version of NetworkManager is necessary, and there are still known issues (see NetworkManager issue #1232).

The Home Assistant Operating System 10 and newer correctly processes ICMPv6 Router Advertisements.

python-matter-server's People

Contributors

agners avatar arturoguerra avatar balloob avatar bdeliers avatar bdraco avatar dependabot[bot] avatar farshidtz avatar flatsiedatsie avatar frenck avatar guyluz11 avatar jculbert avatar jensihnow avatar jmarcelomb avatar joebandenburg avatar marcelveldt avatar markushx avatar martinhjelmare avatar oidebrett avatar priyankub avatar raneydazed avatar sirtux avatar thsvkd avatar tjni avatar wasnertobias avatar wozz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-matter-server's Issues

Commisioning a device already on the network from Home Assistant

I would like to know it because I have been able to commisionate a device using chip-tool, but as I have home assistant OS in a VM, I can't commisionate the device using bluetooth so by opening the commisioning window with chip-tool and then commisioning it with Home Assistant over the network will allow me to test the matter server.

Command in double

Hello

The Matter Plug in find my Philips Hue Bridge (they have the Matter Beta)
For all Lights the command are in double usable but they have for (see the picture)
And juste for the esthetique, they have no icon

Capture dโ€™eฬcran 2022-11-26 aฬ€ 08 28 46
Capture dโ€™eฬcran 2022-11-26 aฬ€ 08 31 58

Repository 1.0.6 not available in HACS

hi,
don't know if it a bug but HACS don't accept 1.0.6.
got the message
<Integration home-assistant-libs/python-matter-server> Repository structure for 1.0.6 is not compliant

thx Rudi

Fix tests and code quality/formatting

While on the clock we've ignored some code quality issues, as well as unittests for the project. This should be fixed.
Listing issues are fixed now. The tests are disabled in CI.

Tests need to be reinstated.

Update fails (HACS)

Bildschirmยญfoto 2022-12-01 um 01 41 40

Bildschirmยญfoto 2022-12-01 um 01 41 31

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/hacs/repositories/integration.py:173 
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22)) 
First occurred: 01:41:22 (3 occurrences) 
Last logged: 01:42:00

[547650933120] No manifest.json file found 'custom_components/None/manifest.json'
[547584549424] No manifest.json file found 'custom_components/None/manifest.json'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1744, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1781, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 208, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 943, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 154, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 413, in async_install_with_progress
    await self.async_install(version, backup)
  File "/config/custom_components/hacs/update.py", line 83, in async_install
    await self.repository.update_repository(force=True)
  File "/config/custom_components/hacs/utils/decorator.py", line 28, in wrapper
    result = await function(*args, **kwargs)
  File "/config/custom_components/hacs/repositories/integration.py", line 126, in update_repository
    if manifest := await self.async_get_integration_manifest():
  File "/config/custom_components/hacs/repositories/integration.py", line 173, in async_get_integration_manifest
    raise HacsException(f"No {RepositoryFile.MAINIFEST_JSON} file found '{manifest_path}'")
custom_components.hacs.exceptions.HacsException: No manifest.json file found 'custom_components/None/manifest.json'

I noticed that the file structure changed, is this still something that one can install as an HACS integration?

Create easy script to manually build the sdk core wheel

The CHIP SDK wheels are now published to pypi which is great. The clusters wheel (the cluster models) is available for all architectures and platforms. The core wheel is a different story and we only publish Linux wheels for (x64 and aarch64).

For development you want to build the exact same wheel(version) as the one we publish to pypi so it would be great if we can have an easy script to launch on your local machine (e.g. M1 macOS) to build the wheel yourself which you can install on your development python env .

On network commissioning doesn't complete fully/correctly

Using Matter Server 1.0.7 with core 2022.12.0, on network commissioning appears to not complete correctly? Using the ESP32-C3-DevKitM-1 with Nabu Casa firmware, commissioning using the Android companion app.

Sending a command to HA like {"id":2,"type":"matter/commission_on_network","pin":40483928} never returns a message, and the logs show an error. A new device also doesn't show up in Home Assistant. As the addon logs continue after that and suggest that something completes, and Google's settings show the vendor ID the addon currently uses has access (FFF1), I'm filing this issue for the addon as it looks like it isn't returning correct information to the integration.

Core log error
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:97
First occurred: 10:05:26 PM (1 occurrences)
Last logged: 10:05:26 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 319, in start_listening
    self._handle_incoming_message(msg)
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 382, in _handle_incoming_message
    future.set_exception(FailedCommand(msg.message_id, msg.errorCode))
AttributeError: 'ErrorResultMessage' object has no attribute 'errorCode'
Addon logs
2022-12-07 22:04:16 core-matter-server matter_server.server.server[125] INFO Starting the Matter Server...
2022-12-07 22:05:26 core-matter-server matter_server.server.client_handler[125] ERROR [139952919701392] Error handling message: CommandMessage(message_id='0328f9ec9f9b48ec8ebd2e576814dba7', command='commission_on_network', args={'setup_pin_code': 40483928})
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/client_handler.py", line 183, in _run_handler
    result = await result
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 164, in commission_on_network
    raise NodeCommissionFailed(f"CommissionWithCode failed for node {node_id}")
matter_server.common.models.error.NodeCommissionFailed: CommissionWithCode failed for node 1
2022-12-07 22:05:26 core-matter-server chip.TOO[125] INFO Discovered Device: fe80::5acf:79ff:fee3:4304:5540
2022-12-07 22:05:26 core-matter-server chip.EM[125] INFO <<< [E:42001i M:178219173] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2022-12-07 22:05:26 core-matter-server chip.IN[125] INFO (U) Sending msg 178219173 to IP address 'UDP:[fe80::5acf:79ff:fee3:4304%enp3s0]:5540'
2022-12-07 22:05:26 core-matter-server chip.CTL[125] INFO Setting attestation nonce to random value
2022-12-07 22:05:26 core-matter-server chip.CTL[125] INFO Setting CSR nonce to random value
2022-12-07 22:05:26 core-matter-server chip.CTL[125] INFO Commission called for node ID 0x0000000000000001
2022-12-07 22:05:26 core-matter-server chip.EM[125] INFO >>> [E:42001i M:214935254 (Ack:178219173)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:26 core-matter-server chip.EM[125] INFO >>> [E:42001i M:214935255 (Ack:178219173)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:21 (SecureChannel:PBKDFParamResponse)
2022-12-07 22:05:26 core-matter-server chip.EM[125] INFO <<< [E:42001i M:178219174 (Ack:214935255)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:22 (SecureChannel:PASE_Pake1)
2022-12-07 22:05:26 core-matter-server chip.IN[125] INFO (U) Sending msg 178219174 to IP address 'UDP:[fe80::5acf:79ff:fee3:4304%enp3s0]:5540'
2022-12-07 22:05:27 core-matter-server chip.EM[125] INFO >>> [E:42001i M:214935256 (Ack:178219174)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42001i M:214935257 (Ack:178219174)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:23 (SecureChannel:PASE_Pake2)
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42001i M:178219175 (Ack:214935257)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:24 (SecureChannel:PASE_Pake3)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (U) Sending msg 178219175 to IP address 'UDP:[fe80::5acf:79ff:fee3:4304%enp3s0]:5540'
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42001i M:214935258 (Ack:178219175)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42001i M:214935259 (Ack:178219175)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:40 (SecureChannel:StatusReport)
2022-12-07 22:05:28 core-matter-server chip.SC[125] INFO SecureSession[0x7f493801f5d0]: Moving from state 'kEstablishing' --> 'kActive'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SecurePairing' -> 'ReadCommissioningInfo'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'ReadCommissioningInfo'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Sending request for commissioning information
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42002i M:67807415] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807415 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42001i M:178219176 (Ack:214935259)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (U) Sending msg 178219176 to IP address 'UDP:[fe80::5acf:79ff:fee3:4304%enp3s0]:5540'
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42002i M:25654155 (Ack:67807415)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData)
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO ----- NetworkCommissioning Features: has WiFi. endpointid = 0
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'ReadCommissioningInfo'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'ReadCommissioningInfo' -> 'ArmFailSafe'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'ArmFailSafe'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Arming failsafe (60 seconds)
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42003i M:67807416] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807416 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42002i M:67807417 (Ack:25654155)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807417 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42003i M:25654156 (Ack:67807416)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:28 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Received ArmFailSafe response errorCode=0
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'ArmFailSafe'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Not a BLE connection, skipping ScanNetworks
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'ArmFailSafe' -> 'ConfigRegulatory'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'ConfigRegulatory'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Setting Regulatory Config
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Device does not support configurable regulatory location
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42004i M:67807418] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807418 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42003i M:67807419 (Ack:25654156)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807419 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42004i M:25654157 (Ack:67807418)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:28 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0003
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Received SetRegulatoryConfig response errorCode=0
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'ConfigRegulatory'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'ConfigRegulatory' -> 'SendPAICertificateRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'SendPAICertificateRequest'2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Sending request for PAI certificate
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42005i M:67807420] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807420 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42004i M:67807421 (Ack:25654157)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807421 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42005i M:25654158 (Ack:67807420)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:28 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Received certificate chain from the device
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'SendPAICertificateRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SendPAICertificateRequest' -> 'SendDACCertificateRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'SendDACCertificateRequest'2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Sending request for DAC certificate
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42006i M:67807422] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807422 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42005i M:67807423 (Ack:25654158)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807423 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42006i M:25654159 (Ack:67807422)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:28 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Received certificate chain from the device
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'SendDACCertificateRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SendDACCertificateRequest' -> 'SendAttestationRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'SendAttestationRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Sending Attestation Request to the device.
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42007i M:67807424] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807424 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42006i M:67807425 (Ack:25654159)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807425 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42007i M:25654160 (Ack:67807424)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42007i M:25654161 (Ack:67807424)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:28 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Received Attestation Information from the device
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'SendAttestationRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'AttestationVerification'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Verifying attestation
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully validated 'Attestation Information' command received from the device.
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'AttestationVerification'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'AttestationVerification' -> 'SendOpCertSigningRequest'
2022-12-07 22:05:28 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'SendOpCertSigningRequest'
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42008i M:67807426] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807426 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO <<< [E:42007i M:67807427 (Ack:25654161)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:28 core-matter-server chip.IN[125] INFO (S) Sending msg 67807427 on secure session with LSID: 60848
2022-12-07 22:05:28 core-matter-server chip.EM[125] INFO >>> [E:42008i M:25654162 (Ack:67807426)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO >>> [E:42008i M:25654163 (Ack:67807426)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:29 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Received certificate signing request from the device
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'SendOpCertSigningRequest'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SendOpCertSigningRequest' -> 'ValidateCSR'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'ValidateCSR'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'ValidateCSR'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'ValidateCSR' -> 'GenerateNOCChain'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'GenerateNOCChain'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Getting certificate chain for the device from the issuer
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Verifying Certificate Signing Request
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Generating NOC
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Providing certificate chain to the commissioner
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Received callback from the CA for NOC Chain generation. Status ../src/controller/ExampleOperationalCredentialsIssuer.cpp:396: Success
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'GenerateNOCChain'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'SendTrustedRootCert'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Sending root certificate to the device
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO <<< [E:42009i M:67807428] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:29 core-matter-server chip.IN[125] INFO (S) Sending msg 67807428 on secure session with LSID: 60848
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Sent root certificate to the device
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO <<< [E:42008i M:67807429 (Ack:25654163)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:29 core-matter-server chip.IN[125] INFO (S) Sending msg 67807429 on secure session with LSID: 60848
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO >>> [E:42009i M:25654164 (Ack:67807428)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO >>> [E:42009i M:25654165 (Ack:67807428)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:29 core-matter-server chip.DMG[125] INFO Received Command Response Status for Endpoint=0 Cluster=0x0000_003E Command=0x0000_000B Status=0x0
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Device confirmed that it has received the root certificate
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'SendTrustedRootCert'2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SendTrustedRootCert' -> 'SendNOC'
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'SendNOC'
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO <<< [E:42010i M:67807430] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:29 core-matter-server chip.IN[125] INFO (S) Sending msg 67807430 on secure session with LSID: 60848
2022-12-07 22:05:29 core-matter-server chip.CTL[125] INFO Sent operational certificate to the device
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO <<< [E:42009i M:67807431 (Ack:25654165)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:29 core-matter-server chip.IN[125] INFO (S) Sending msg 67807431 on secure session with LSID: 60848
2022-12-07 22:05:29 core-matter-server chip.EM[125] INFO >>> [E:42010i M:25654166 (Ack:67807430)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:30 core-matter-server chip.EM[125] INFO >>> [E:42010i M:25654167 (Ack:67807430)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:30 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008
2022-12-07 22:05:30 core-matter-server chip.CTL[125] INFO Device returned status 0 on receiving the NOC
2022-12-07 22:05:30 core-matter-server chip.CTL[125] INFO Operational credentials provisioned on device 0x7f493802bb80
2022-12-07 22:05:30 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'SendNOC'
2022-12-07 22:05:30 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SendNOC' -> 'FindOperational'
2022-12-07 22:05:30 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'FindOperational'
2022-12-07 22:05:30 core-matter-server chip.EM[125] INFO <<< [E:42010i M:67807432 (Ack:25654167)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:30 core-matter-server chip.IN[125] INFO (S) Sending msg 67807432 on secure session with LSID: 60848
2022-12-07 22:05:30 core-matter-server chip.DIS[125] INFO Checking node lookup status after 200 ms
2022-12-07 22:05:30 core-matter-server chip.DIS[125] INFO UDP:[fe80::5acf:79ff:fee3:4304%enp3s0]:5540: new best score: 32022-12-07 22:05:30 core-matter-server chip.DIS[125] INFO UDP:[fd65:cacb:7a81:c510:5acf:79ff:fee3:4304%enp3s0]:5540: new best score: 6
2022-12-07 22:05:30 core-matter-server chip.DIS[125] INFO UDP:192.168.1.14%enp3s0:5540: score has not improved: 2
2022-12-07 22:05:30 core-matter-server chip.DIS[125] INFO Checking node lookup status after 233 ms
2022-12-07 22:05:30 core-matter-server chip.SC[125] INFO Initiating session on local FabricIndex 1 from 0x000000000001B669 -> 0x0000000000000001
2022-12-07 22:05:30 core-matter-server chip.EM[125] INFO <<< [E:42011i M:178219177] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1)
2022-12-07 22:05:30 core-matter-server chip.IN[125] INFO (U) Sending msg 178219177 to IP address 'UDP:[fd65:cacb:7a81:c510:5acf:79ff:fee3:4304]:5540'
2022-12-07 22:05:30 core-matter-server chip.SC[125] INFO Sent Sigma1 msg
2022-12-07 22:05:31 core-matter-server chip.EM[125] INFO >>> [E:42011i M:214935260 (Ack:178219177)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:31 core-matter-server chip.EM[125] INFO >>> [E:42011i M:214935261 (Ack:178219177)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:31 (SecureChannel:CASE_Sigma2)
2022-12-07 22:05:31 core-matter-server chip.SC[125] INFO Received Sigma2 msg
2022-12-07 22:05:31 core-matter-server chip.EM[125] INFO <<< [E:42011i M:178219178 (Ack:214935261)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:32 (SecureChannel:CASE_Sigma3)
2022-12-07 22:05:31 core-matter-server chip.IN[125] INFO (U) Sending msg 178219178 to IP address 'UDP:[fd65:cacb:7a81:c510:5acf:79ff:fee3:4304%enp3s0]:5540'
2022-12-07 22:05:31 core-matter-server chip.SC[125] INFO Sent Sigma3 msg
2022-12-07 22:05:31 core-matter-server chip.EM[125] INFO >>> [E:42011i M:214935262 (Ack:178219178)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:32 core-matter-server chip.EM[125] INFO >>> [E:42011i M:214935263 (Ack:178219178)] (U) Msg RX from 0:0000000000000000 [0000] --- Type 0000:40 (SecureChannel:StatusReport)
2022-12-07 22:05:32 core-matter-server chip.SC[125] INFO Success status report received. Session was established
2022-12-07 22:05:32 core-matter-server PersistentStorage[125] INFO SetSdkKey: f/1/s/0000000000000001 = b'\x150\x03\x10\x11\xbebYp\xfb\x03\xc7!\xa9\x84g\xea<\x19\xca0\x04 \x95U(Y\x99\x9a\xfb$\xcd\xad\x06\x17V\xa6\x86\xed\x00\xbd\xee\x88\xb4\xaeaU\x84v@\xc2k\x0c\xc0}0\x05\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18'
2022-12-07 22:05:32 core-matter-server PersistentStorage[125] INFO Committing...
2022-12-07 22:05:32 core-matter-server PersistentStorage[125] INFO SetSdkKey: g/s/Eb5iWXD7A8chqYRn6jwZyg== = b'\x15$\x01\x01$\x02\x01\x18'
2022-12-07 22:05:32 core-matter-server PersistentStorage[125] INFO Committing...
2022-12-07 22:05:32 core-matter-server PersistentStorage[125] INFO SetSdkKey: g/sri = b'\x16\x15$\x01\x01$\x02\x01\x18\x18'
2022-12-07 22:05:32 core-matter-server PersistentStorage[125] INFO Committing...
2022-12-07 22:05:32 core-matter-server chip.SC[125] INFO SecureSession[0x7f4938025e40]: Moving from state 'kEstablishing' --> 'kActive'
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'FindOperational'
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'FindOperational' -> 'SendComplete'
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'SendComplete'
2022-12-07 22:05:32 core-matter-server chip.EM[125] INFO <<< [E:42012i M:249359933] (S) Msg TX to 1:0000000000000001 [8281] --- Type 0001:08 (IM:InvokeCommandRequest)
2022-12-07 22:05:32 core-matter-server chip.IN[125] INFO (S) Sending msg 249359933 on secure session with LSID: 60849
2022-12-07 22:05:32 core-matter-server chip.EM[125] INFO <<< [E:42011i M:178219179 (Ack:214935263)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:32 core-matter-server chip.IN[125] INFO (U) Sending msg 178219179 to IP address 'UDP:[fd65:cacb:7a81:c510:5acf:79ff:fee3:4304%enp3s0]:5540'
2022-12-07 22:05:32 core-matter-server chip.EM[125] INFO >>> [E:42012i M:199861505 (Ack:249359933)] (S) Msg RX from 1:0000000000000001 [8281] --- Type 0001:09 (IM:InvokeCommandResponse)
2022-12-07 22:05:32 core-matter-server chip.DMG[125] INFO Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Received CommissioningComplete response, errorCode=0
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'SendComplete'
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Commissioning stage next step: 'SendComplete' -> 'Cleanup'
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Performing next commissioning step 'Cleanup'
2022-12-07 22:05:32 core-matter-server chip.SC[125] INFO SecureSession[0x7f493801f5d0]: Moving from state 'kActive' --> 'kPendingEviction'
2022-12-07 22:05:32 core-matter-server chip.CTL[125] INFO Successfully finished commissioning step 'Cleanup'
2022-12-07 22:05:32 core-matter-server chip.EM[125] INFO <<< [E:42012i M:249359934 (Ack:199861505)] (S) Msg TX to 1:0000000000000001 [8281] --- Type 0000:10 (SecureChannel:StandaloneAck)
2022-12-07 22:05:32 core-matter-server chip.IN[125] INFO (S) Sending msg 249359934 on secure session with LSID: 60849

CHIP Error 0x0000002F: Invalid argument during commission_on_network

2022-12-16 10:48:02 core-matter-server matter_server.server.client_handler[124] ERROR [548283895664] Error handling message: CommandMessage(message_id='9b817f02d5444abe9e4ec7b7d95480c8', command='commission_on_network', args={'setup_pin_code': 5284714089})
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/client_handler.py", line 183, in _run_handler
    result = await result
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 164, in commission_on_network
    raise NodeCommissionFailed(f"CommissionWithCode failed for node {node_id}")
matter_server.common.models.error.NodeCommissionFailed: CommissionWithCode failed for node 7
2022-12-16 10:48:02 core-matter-server asyncio[124] ERROR Task exception was never retrieved
future: <Task finished name='Task-4950' coro=<StorageController.async_save() done, defined at /usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py:136> exception=ChipStackError(47, 'CHIP Error 0x0000002F: Invalid argument')>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py", line 151, in async_save
    await self.server.loop.run_in_executor(None, do_save)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py", line 140, in do_save
    filename_backup = f"{self.filename}.backup"
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py", line 32, in filename
    f"{self.server.device_controller.compressed_fabric_id}.json",
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 67, in compressed_fabric_id
    return self.chip_controller.GetCompressedFabricId()
  File "/usr/local/lib/python3.9/dist-packages/chip/ChipDeviceCtrl.py", line 777, in GetCompressedFabricId
    raise self._ChipStack.ErrorToException(res)
chip.exceptions.ChipStackError: CHIP Error 0x0000002F: Invalid argument
2022-12-16 10:49:10 core-matter-server chip.TOO[124] INFO Discovered Device: fd24:a090:cec:0:46d6:9a8c:852a:ff5a:5540
2022-12-16 10:49:10 core-matter-server matter_server.server.client_handler[124] ERROR [548283892688] Error handling message: CommandMessage(message_id='282746bd7c82460facd12bbcce84585f', command='commission_on_network', args={'setup_pin_code': 5284714089})
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/client_handler.py", line 183, in _run_handler
    result = await result
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 164, in commission_on_network
    raise NodeCommissionFailed(f"CommissionWithCode failed for node {node_id}")
matter_server.common.models.error.NodeCommissionFailed: CommissionWithCode failed for node 8
2022-12-16 10:49:10 core-matter-server asyncio[124] ERROR Task exception was never retrieved
future: <Task finished name='Task-4958' coro=<StorageController.async_save() done, defined at /usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py:136> exception=ChipStackError(47, 'CHIP Error 0x0000002F: Invalid argument')>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py", line 151, in async_save
    await self.server.loop.run_in_executor(None, do_save)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py", line 140, in do_save
    filename_backup = f"{self.filename}.backup"
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/storage.py", line 32, in filename
    f"{self.server.device_controller.compressed_fabric_id}.json",
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 67, in compressed_fabric_id
    return self.chip_controller.GetCompressedFabricId()
  File "/usr/local/lib/python3.9/dist-packages/chip/ChipDeviceCtrl.py", line 777, in GetCompressedFabricId
    raise self._ChipStack.ErrorToException(res)
chip.exceptions.ChipStackError: CHIP Error 0x0000002F: Invalid argument

Avoid reading attributes/subscribing to attributes/events simultaneously

It seems that the device gets overwhelmed with parallel requests and returning BUSY status codes, from the server logs

2022-06-16 22:32:30 pulver chip.IM[486980] INFO Received status response, status is 0x9c (BUSY)

This happens e.g. when async_added_to_hass is called in parallel for multiple entities. For a Matter Node which exposes multiple devices (like the All Cluster examples) this gets problematic.

Ideally we should synchronize calls on a per Matter Node.

Pip warns: python-matter-server 0.3.0 does not provide the extra 'server'

When I try to install the matter server in a local folder with

pip3 install python-matter-server[server] -t lib  --prefix ""

I get the following warning:

WARNING: python-matter-server 0.3.0 does not provide the extra 'server'

Or a bit differently in a virtual machine:

ERROR: Could not find a version that satisfies the requirement home-assistant-chip-core==2022.11.1; extra == "server" (from python-matter-server[server]) (from versions: none)
ERROR: No matching distribution found for home-assistant-chip-core==2022.11.1; extra == "server" (from python-matter-server[server])

Demo client - Segmentation fault

Kali linux

โ””โ”€# python3 -m matter_server.server                                                                                                                                                            139 โจฏ
2023-01-13 08:31:34 kali matter_server.server.stack[1533] INFO Initializing CHIP/Matter Controller Stack...
[1673616694.950834][1533:1533] CHIP:CTL: Setting attestation nonce to random value
[1673616694.950909][1533:1533] CHIP:CTL: Setting CSR nonce to random value
[1673616694.952608][1533:1533] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1673616694.952676][1533:1533] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_factory.ini
[1673616694.952688][1533:1533] CHIP:DL: failed to open file (/data/chip_factory.ini-hv4VaM) for writing
[1673616694.952694][1533:1533] CHIP:DL: Configuration Manager initialization failed: ../src/platform/Linux/CHIPLinuxStorageIni.cpp:122: CHIP Error 0x000000AD: Open file failed
2023-01-13 08:31:34 kali PersistentStorage[1533] WARNING Initializing persistent storage from file: /root/.matter_server/chip.json
2023-01-13 08:31:34 kali root[1533] ERROR [Errno 2] No such file or directory: '/root/.matter_server/chip.json'
2023-01-13 08:31:34 kali root[1533] CRITICAL Could not load configuration from /root/.matter_server/chip.json - resetting configuration...
2023-01-13 08:31:34 kali root[1533] WARNING No valid SDK configuration present - clearing out configuration
2023-01-13 08:31:34 kali root[1533] WARNING No valid REPL configuration present - clearing out configuration
2023-01-13 08:31:34 kali chip.DL[1533] ERROR ChipLinuxStorage::Init: Attempt to re-initialize with KVS config file: /tmp/chip_kvs
2023-01-13 08:31:34 kali chip.DL[1533] ERROR SystemLayer initialization failed: ../src/system/SystemLayerImplSelect.cpp:45: CHIP Error 0x00000003: Incorrect state
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/dist-packages/matter_server/server/__main__.py", line 92, in <module>
    main()
  File "/usr/local/lib/python3.10/dist-packages/matter_server/server/__main__.py", line 79, in main
    server = MatterServer(
  File "/usr/local/lib/python3.10/dist-packages/matter_server/server/server.py", line 69, in __init__
    self.stack = MatterStack(self)
  File "/usr/local/lib/python3.10/dist-packages/matter_server/server/stack.py", line 32, in __init__
    self._chip_stack = ChipStack(
  File "/usr/local/lib/python3.10/dist-packages/chip/ChipStack.py", line 67, in wrapper
    instance[0] = cls(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/chip/ChipStack.py", line 273, in __init__
    raise self.ErrorToException(res)
chip.exceptions.ChipStackError: CHIP Error 0x00000003: Incorrect state
Exception ignored in: <function PersistentStorage.__del__ at 0x7f4c599588b0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/chip/storage/__init__.py", line 262, in __del__
AttributeError: module 'builtins' has no attribute 'chipStack'
zsh: segmentation fault  python3 -m matter_server.server

ValueError: Unknown level: 'NULL'

It looks like the latest docker image isn't starting correctly :

[14:16:22] INFO: Starting Matter Server...
curl: (6) Could not resolve host: supervisor
[14:16:22] ERROR: Something went wrong contacting the API
curl: (6) Could not resolve host: supervisor
[14:16:23] ERROR: Something went wrong contacting the API
curl: (6) Could not resolve host: supervisor
[14:16:23] ERROR: Something went wrong contacting the API
[14:16:23] INFO: Successfully send discovery information to Home Assistant.
Traceback (most recent call last):
  File "/usr/local/bin/matter-server", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/__main__.py", line 72, in main
    logging.basicConfig(handlers=handlers, level=args.log_level.upper())
  File "/usr/lib/python3.9/logging/__init__.py", line 2018, in basicConfig
    root.setLevel(level)
  File "/usr/lib/python3.9/logging/__init__.py", line 1417, in setLevel
    self.level = _checkLevel(level)
  File "/usr/lib/python3.9/logging/__init__.py", line 194, in _checkLevel
    raise ValueError("Unknown level: %r" % level)
ValueError: Unknown level: 'NULL'

[Question] Devices/Entities Exportation

Hi,

I'd like to know if using matter in Home Assistant I will be able to export devices and entities to Google Home using matter and locally, without Google's integration.

ESP32 stamp bricked after flashing through web UI?

I purchased an ESP32 Stamp just so I could try and create a Matter test device using the UI.

I flashed it. Then I tried to use the serial console to add the wifi settings. But that didn't work. This is what I saw in the serial output:

matter_stamp_crash

I think there was also a brief mention about the bootloader.

I went to look for any hints online. Some while later I disconnected it. Now it no longer responds to anything. The lights don't even turn on.

Perhaps I bought a lemon, or made a user error. But I thought I'd share, just in case.

Setting light brightness not working

I have commissioned an ESP32-C3-DevKitM-1 using the latest Lighting App version available as of creating this issue on the Nabu Casa example site, and have setup Home Assistant 2022.9.6 with v0.3.0 of the server add-on and integration.

When setting the device's brightness, Home Assistant will show an error "Failed to call service light/turn_on. Command failed: unknown_error.".

Home Assistant logs:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/matter_experimental/light.py:66
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 8:15:00 PM (22 occurrences)
Last logged: 8:31:13 PM

[140326497279600] Command failed: unknown_error
[140325869626480] Command failed: unknown_error
[140325869882144] Command failed: unknown_error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 535, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/config/custom_components/matter_experimental/light.py", line 66, in async_turn_on
    await self._device_type_instance.send_command(
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/model/device_type_instance.py", line 56, in send_command
    return await self.node.matter.client.driver.device_controller.send_command(
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/model/device_controller.py", line 138, in send_command
    return await self._async_send_command(
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/model/device_controller.py", line 228, in _async_send_command
    return await self.client.async_send_command(
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 122, in async_send_command
    return await future
matter_server.client.exceptions.FailedCommand: Command failed: unknown_error

Add-on logs:

2022-09-22 20:26:15 77f1785d-matter-server matter_server.server.server[121] INFO [139757767085456] Deserialized message: CommandMessage(messageId='1a6780f56ab647ac94a5ba164b5dce5e', command='device_controller.SendCommand', args={'nodeid': 4335, 'endpoint': 1, 'payload': LevelControl.Commands.MoveToLevelWithOnOff(level=66, transitionTime=None, optionsMask=0, optionsOverride=0)})
2022-09-22 20:26:15 77f1785d-matter-server chip.CTL[121] INFO Found an existing secure session to [1:00000000000010EF]!
2022-09-22 20:26:15 77f1785d-matter-server matter_server.server.server[121] ERROR [139757767085456] Error handling message: CommandMessage(messageId='1a6780f56ab647ac94a5ba164b5dce5e', command='device_controller.SendCommand', args={'nodeid': 4335, 'endpoint': 1, 'payload': LevelControl.Commands.MoveToLevelWithOnOff(level=66, transitionTime=None, optionsMask=0, optionsOverride=0)})
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/active_connection.py", line 94, in _run_handler
    await handler(self, msg)
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/active_connection.py", line 207, in _handle_device_controller_SendCommand
    result = await self.server.stack.device_controller.SendCommand(**msg.args)
  File "/usr/local/lib/python3.9/dist-packages/chip/ChipDeviceCtrl.py", line 892, in SendCommand
    res = ClusterCommand.SendCommand(
  File "/usr/local/lib/python3.9/dist-packages/chip/clusters/Command.py", line 170, in SendCommand
    payloadTLV = payload.ToTLV()
  File "/usr/local/lib/python3.9/dist-packages/chip/clusters/ClusterObjects.py", line 192, in ToTLV
    return self.descriptor.DictToTLV(asdict(self))
  File "/usr/local/lib/python3.9/dist-packages/chip/clusters/ClusterObjects.py", line 186, in DictToTLV
    self.DictToTLVWithWriter('', None, data, tlvwriter)
  File "/usr/local/lib/python3.9/dist-packages/chip/clusters/ClusterObjects.py", line 180, in DictToTLVWithWriter
    field.PutFieldToTLV(field.Tag, val, writer,
  File "/usr/local/lib/python3.9/dist-packages/chip/clusters/ClusterObjects.py", line 79, in PutFieldToTLV
    raise ValueError(
ValueError: Field .transitionTime.transitionTime was not optional, but encountered None

Nothing appears in the device logs.

pypi.org page is lacking updated information

There are several missing and old information on readme and pypi.org pages

First of all the pypi.org page is missing a link to this repo

image

Second there are several places in the readme that says the old name chip and didn't got updated to the new name matter.

Third the command python -m matter_server.server does not work for me, maybe I am missing something.
Getting the error

python -m matter_server.server
/usr/bin/python: No module named matter_server

Matter docs

So I have the new 2022.12 and Matter server 1.07
The docs in the matter server still reflect this git hub hacs thing.
Where are the new docs? (or workshop)

I had the old matter chip turning my light of and on and now I have no clue where to look. I find Discord very difficult. Is there a community.hassio or reddit for HA Matter?

Thanks,
Grey

Cannot comission shared device

When I try to add a matter device via apple homekit via the share option, it fails:

Jan 06 23:41:03 matter-server docker-matter-server-start[417288]: 2023-01-06 23:41:03 matter-server chip.TOO[1] INFO Discovered Device: fd72:2a59:1819:0:censored
Jan 06 23:41:03 matter-server docker-matter-server-start[417288]: 2023-01-06 23:41:03 matter-server matter_server.server.client_handler[1] ERROR [140301820492864] Error handling message: CommandMessage(message_id='7381a647713640ddbecb3815aa9c189c', command='commission_on_network', args={'setup_pin_code': 32809censored})
Jan 06 23:41:03 matter-server docker-matter-server-start[417288]: Traceback (most recent call last):
Jan 06 23:41:03 matter-server docker-matter-server-start[417288]:   File "/usr/local/lib/python3.9/dist-packages/matter_server/server/client_handler.py", line 185, in _run_handler
Jan 06 23:41:03 matter-server docker-matter-server-start[417288]:     result = await result
Jan 06 23:41:03 matter-server docker-matter-server-start[417288]:   File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 158, in commission_on_network
Jan 06 23:41:03 matter-server docker-matter-server-start[417288]:     raise NodeCommissionFailed(
Jan 06 23:41:03 matter-server docker-matter-server-start[417288]: matter_server.common.models.error.NodeCommissionFailed: Commission on network failed for node 2

Power off/reboots no longer works

Using a DevC esp32. Install works fine. But when I repower it gives
E (742796) chip[IN]: Data received on an unknown session (LSID=41585). Dropping it!
And no longer works.
Press the button and this does how up in the console
I (973386) LEDWidget: Toggling state to 1
I (973386) app-task: Writting to OnOff cluster
E (973396) all-clusters-app: Attribute changed on non-Matter task 'APP'

I (973396) light-app-callbacks: PostAttributeChangeCallback - Cluster ID: '0x0006', EndPoint ID: '0x01', Attribute ID: '0x0000'
I (973406) LEDWidget: Setting state to 1
I (973406) light-app-callbacks: Current free heap: 119876

E (973416) app-task: Writting to Current Level cluster
E (973426) all-clusters-app: Attribute changed on non-Matter task 'APP'

I (973426) light-app-callbacks: PostAttributeChangeCallback - Cluster ID: '0x0008', EndPoint ID: '0x01', Attribute ID: '0x0000'
I (973446) LEDWidget: Setting brightness to 254
I (973456) light-app-callbacks: Current free heap: 119876

Batch processing subscription updates

Notice when the light is turned on that the brightness jumps to beginning, then back to it's previous position before the light was turned off.

CleanShot.2022-06-14.at.08.35.57.mp4

When we look at the logs, we can see that it's caused by an issue in the firmware. When it turns the light on, it sends us 3 updates in short succession: onOff=true, brightness=1, brightness=122.

2022-06-14 08:38:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=light, service=turn_on, service_data=entity_id=light.matter_light_4335>
2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Publishing message:
CommandMessage(messageId='01e090967f3b49529ef5264d99dabcbf', command='device_controller.SendCommand', args={'nodeid': 4335, 'endpoint': 1, 'payload': OnOff.Commands.On()})

2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"messageId": "01e090967f3b49529ef5264d99dabcbf", "result": {"raw": null}, "_type": "matter_server.common.model.message.SuccessResultMessage"}', extra='')

2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"subscriptionId": 4253879849, "payload": {"subscriptionId": 4253879849, "fabridId": 1, "nodeId": 4335, "endpoint": 1, "cluster": {"_class": "chip.clusters.Objects.OnOff"}, "attribute": "onOff", "value": true}, "_type": "matter_server.common.model.message.SubscriptionReportMessage"}', extra='')

2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Received subscription report: SubscriptionReportMessage(subscriptionId=4253879849, payload={'subscriptionId': 4253879849, 'fabridId': 1, 'nodeId': 4335, 'endpoint': 1, 'cluster': <class 'matter_server.vendor.chip.clusters.Objects.OnOff'>, 'attribute': 'onOff', 'value': True})

2022-06-14 08:38:14 DEBUG (MainThread) [custom_components.matter_experimental.adapter] node 4335, endpoint 1: received subscription event {'subscriptionId': 4253879849, 'fabridId': 1, 'nodeId': 4335, 'endpoint': 1, 'cluster': <class 'matter_server.vendor.chip.clusters.Objects.OnOff'>, 'attribute': 'onOff', 'value': True}

2022-06-14 08:38:14 DEBUG (MainThread) [custom_components.matter_experimental.adapter] Updating node 4335, endpoint 1, OnOff: onOff=True

2022-06-14 08:38:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.matter_light_4335, old_state=<state light.matter_light_4335=off; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], friendly_name=Matter Light 4335, supported_features=0 @ 2022-06-14T08:38:08.680471-07:00>, new_state=<state light.matter_light_4335=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=122, friendly_name=Matter Light 4335, supported_features=0 @ 2022-06-14T08:38:14.676405-07:00>>

2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"subscriptionId": 4253879849, "payload": {"subscriptionId": 4253879849, "fabridId": 1, "nodeId": 4335, "endpoint": 1, "cluster": {"_class": "chip.clusters.Objects.LevelControl"}, "attribute": "currentLevel", "value": 1}, "_type": "matter_server.common.model.message.SubscriptionReportMessage"}', extra='')

2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Received subscription report: SubscriptionReportMessage(subscriptionId=4253879849, payload={'subscriptionId': 4253879849, 'fabridId': 1, 'nodeId': 4335, 'endpoint': 1, 'cluster': <class 'matter_server.vendor.chip.clusters.Objects.LevelControl'>, 'attribute': 'currentLevel', 'value': 1})

2022-06-14 08:38:14 DEBUG (MainThread) [custom_components.matter_experimental.adapter] node 4335, endpoint 1: received subscription event {'subscriptionId': 4253879849, 'fabridId': 1, 'nodeId': 4335, 'endpoint': 1, 'cluster': <class 'matter_server.vendor.chip.clusters.Objects.LevelControl'>, 'attribute': 'currentLevel', 'value': 1}

2022-06-14 08:38:14 DEBUG (MainThread) [custom_components.matter_experimental.adapter] Updating node 4335, endpoint 1, LevelControl: currentLevel=1

2022-06-14 08:38:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.matter_light_4335, old_state=<state light.matter_light_4335=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=122, friendly_name=Matter Light 4335, supported_features=0 @ 2022-06-14T08:38:14.676405-07:00>, new_state=<state light.matter_light_4335=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=1, friendly_name=Matter Light 4335, supported_features=0 @ 2022-06-14T08:38:14.676405-07:00>>

2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"subscriptionId": 4253879849, "payload": {"subscriptionId": 4253879849, "fabridId": 1, "nodeId": 4335, "endpoint": 1, "cluster": {"_class": "chip.clusters.Objects.LevelControl"}, "attribute": "currentLevel", "value": 122}, "_type": "matter_server.common.model.message.SubscriptionReportMessage"}', extra='')

2022-06-14 08:38:14 DEBUG (MainThread) [matter_server.client] Received subscription report: SubscriptionReportMessage(subscriptionId=4253879849, payload={'subscriptionId': 4253879849, 'fabridId': 1, 'nodeId': 4335, 'endpoint': 1, 'cluster': <class 'matter_server.vendor.chip.clusters.Objects.LevelControl'>, 'attribute': 'currentLevel', 'value': 122})

2022-06-14 08:38:14 DEBUG (MainThread) [custom_components.matter_experimental.adapter] node 4335, endpoint 1: received subscription event {'subscriptionId': 4253879849, 'fabridId': 1, 'nodeId': 4335, 'endpoint': 1, 'cluster': <class 'matter_server.vendor.chip.clusters.Objects.LevelControl'>, 'attribute': 'currentLevel', 'value': 122}

2022-06-14 08:38:14 DEBUG (MainThread) [custom_components.matter_experimental.adapter] Updating node 4335, endpoint 1, LevelControl: currentLevel=122

2022-06-14 08:38:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=light.matter_light_4335, old_state=<state light.matter_light_4335=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=1, friendly_name=Matter Light 4335, supported_features=0 @ 2022-06-14T08:38:14.676405-07:00>, new_state=<state light.matter_light_4335=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=122, friendly_name=Matter Light 4335, supported_features=0 @ 2022-06-14T08:38:14.676405-07:00>>

Unable to commision example app - Failsafe timer expired

Hi...

I've built the ESP32 lighting-app example, but cannot seem to get it commissioned on the HA matter plugin.

I've tried the v1.0-branch and master branch of project-chip/connectedhomeip

Commisioning works when using the built from source chip-tool from project-chip/connectedhomeip

When trying to commission from HA, it constantly fails with Failsafe timer expired

I (41934) chip[DL]: Confirm received for CHIPoBLE TX characteristic indication (con 0) status= 14
I (41934) CHIP[DL]: Write request received for CHIPoBLE RX characteristic con 0 12
I (41954) chip[EM]: >>> [E:57781r M:228166791] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
I (41964) chip[FS]: GeneralCommissioning: Received ArmFailSafe (0s)
I (41964) chip[FS]: Fail-safe timer expired
I (41974) chip[EM]: <<< [E:57781r M:49450294] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
I (41984) chip[IN]: (S) Sending msg 49450294 on secure session with LSID: 14124
I (41994) NimBLE: GATT procedure initiated: indicate;
I (41994) NimBLE: att_handle=14

E (42014) chip[SVR]: Failsafe timer expired
I (42014) chip[SC]: SecureSession[0x3ffc57c8]: Moving from state 'kActive' --> 'kPendingEviction'
E (42024) chip[SVR]: Commissioning failed (attempt 1): 32
I (42024) chip[BLE]: Releasing end point's BLE connection back to application.
I (42034) chip[DIS]: Updating services using commissioning mode 1
I (42044) chip[DIS]: CHIP minimal mDNS started advertising.
I (42044) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1
I (42064) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: 88321F2815067F5F.
I (42064) chip[DIS]: mDNS service published: _matterc._udp
E (42074) chip[ZCL]: OpCreds: Got FailSafeTimerExpired
E (42074) chip[ZCL]: OpCreds: Proceeding to FailSafeCleanup on fail-safe expiry!
I (42084) chip[TS]: Pending Last Known Good Time: 2022-10-27T22:02:18

UniqueID should probably not be a mandatory attribute

Want to open with saying that I'm completely new to matter, so I might be misunderstanding the spec ๐Ÿ˜… But hopefully I'm on the right track here!

I have encountered an issue when commissioning my ESP32 C3 running the light example from esp-matter (on recent commit, CHIP v1.0.0.2). Commissioning using the latest HASS results in the following stacktrace:

 (...)
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 67, in __init__
    f"{node.unique_id}-"
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 215, in unique_id
    self.get_attribute(
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 152, in get_attribute
    return next(
StopIteration

It seems that others are affected by it as well:

While reading the spec (22-22349-001_Matter-1.0-Core-Specification.pdf, section 11.1.6.3), I have noticed that the Unique ID attribute within Basic Information is not mandatory, but optional, which does not seem to align with the getter here:

@property
def unique_id(self) -> str:
"""Return uniqueID for this node."""
return cast(
str,
self.get_attribute(
self.root_device_type_instance.endpoint, Clusters.Basic, "UniqueID"
).value,
)

Could it be that a misassumption has been made here about this attribute?

Commissioning of a ContactSensor device results in exception object has no attribute '_device'

I'm glad I found this great project. I'm working on DIY matter devices and want to connect them to Home Assistant.

I'm working with a Silicon Labs EFR32 board and the connectedhomeip chef ContactSensor example.

In commissioning my device the exception below occurs.

The root cause seems to be that binary_sensor.py is trying to access the device with self._device in function _update_from_device(). If I change it to self._device_type_instance the problem is fixed. I think the same issue exists in switch.py.

python-matter-server commit: ccb6d29
connectedhomeip commit: a1643eee5ef5534d494ae205bb586b4a9cbfee23

Exception trace from log:
ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform matter_experimental
2022-09-09T12:17:22.418462445-04:00 Traceback (most recent call last):
2022-09-09T12:17:22.418478058-04:00 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
2022-09-09T12:17:22.418489958-04:00 await asyncio.gather(*tasks)
2022-09-09T12:17:22.418529710-04:00 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 673, in _async_add_entity
2022-09-09T12:17:22.418546577-04:00 await entity.add_to_platform_finish()
2022-09-09T12:17:22.418569721-04:00 File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 775, in add_to_platform_finish
2022-09-09T12:17:22.418579107-04:00 await self.async_added_to_hass()
2022-09-09T12:17:22.418587910-04:00 File "/config/custom_components/matter_experimental/entity.py", line 77, in async_added_to_hass
2022-09-09T12:17:22.418595969-04:00 await self.init_matter_device()
2022-09-09T12:17:22.418603898-04:00 File "/config/custom_components/matter_experimental/entity.py", line 64, in init_matter_device
2022-09-09T12:17:22.418612912-04:00 self._update_from_device()
2022-09-09T12:17:22.418621625-04:00 File "/config/custom_components/matter_experimental/binary_sensor.py", line 47, in _update_from_device
2022-09-09T12:17:22.418630118-04:00 self._attr_is_on = self._device.get_cluster(clusters.BooleanState).stateValue
2022-09-09T12:17:22.418650088-04:00 AttributeError: 'MatterBinarySensor' object has no attribute '_device'

Chip library change made SetWiFiCredentials stop working

Hello!

This commit project-chip/connectedhomeip@b1fb6db broke the call to SetWiFiCredentials in ChipDeviceCtrl.py in the chip library.

The patch below fixes it, but I'm not sure how you actually want to go about fixing it.

Cheers!

diff --git a/matter_server/server/active_connection.py b/matter_server/server/active_connection.py
index ba32c02..aa9d1d8 100644
--- a/matter_server/server/active_connection.py
+++ b/matter_server/server/active_connection.py
@@ -219,7 +219,7 @@ class ActiveConnection:
     async def _handle_device_controller_SetWiFiCredentials(self, msg: CommandMessage):
         result = await self.loop.run_in_executor(
             None,
-            partial(self.server.stack.device_controller.SetWiFiCredentials, **msg.args),
+            partial(self.server.stack.device_controller.SetWiFiCredentials, msg.args['ssid'].encode('utf-8'), msg.args['credentials'].encode('utf-8')),
         )
 
         if result == 0:

eve energy commision failes

comission tried after resseting:

2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Setting attestation nonce to random value
2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Setting CSR nonce to random value
2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Starting commissioning discovery over BLE
2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Starting commissioning discovery over DNS-SD
2023-01-08 09:48:23 home-assistant chip.BLE[1] INFO BLE removing known devices.
2023-01-08 09:48:23 home-assistant chip.BLE[1] INFO BLE initiating scan.
2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Discovered device to be commissioned over DNS-SD
2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Attempting PASE connection to UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540
2023-01-08 09:48:23 home-assistant chip.EM[1] INFO <<< [E:61908i M:71926605] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-01-08 09:48:23 home-assistant chip.IN[1] INFO (U) Sending msg 71926605 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Commission called for node ID 0x0000000000000001
2023-01-08 09:48:23 home-assistant chip.CTL[1] INFO Discovered device to be commissioned over DNS-SD
2023-01-08 09:48:28 home-assistant chip.IN[1] INFO (U) Sending msg 71926605 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:48:32 home-assistant chip.IN[1] INFO (U) Sending msg 71926605 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:48:33 home-assistant chip.CTL[1] ERROR Commissioning discovery over BLE failed: ../src/platform/Linux/BLEManagerImpl.cpp:787: CHIP Error 0x00000032: Timeout
2023-01-08 09:48:33 home-assistant chip.-[1] ERROR ../src/platform/Linux/BLEManagerImpl.cpp:787: CHIP Error 0x00000032: Timeout at ../src/controller/SetUpCodePairer.cpp:283
2023-01-08 09:48:40 home-assistant chip.IN[1] INFO (U) Sending msg 71926605 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:48:51 home-assistant chip.IN[1] INFO (U) Sending msg 71926605 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:48:53 home-assistant chip.CTL[1] ERROR Discovery timed out
2023-01-08 09:49:09 home-assistant chip.EM[1] ERROR Failed to Send CHIP MessageCounter:71926605 on exchange 61908i sendCount: 4 max retries: 4
2023-01-08 09:49:13 home-assistant chip.SC[1] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-01-08 09:49:13 home-assistant chip.CTL[1] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-01-08 09:49:13 home-assistant chip.CTL[1] INFO Attempting PASE connection to UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540
2023-01-08 09:49:13 home-assistant chip.EM[1] INFO <<< [E:61909i M:71926606] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-01-08 09:49:13 home-assistant chip.IN[1] INFO (U) Sending msg 71926606 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:49:13 home-assistant chip.CTL[1] INFO Commission called for node ID 0x0000000000000001
2023-01-08 09:49:13 home-assistant chip.CTL[1] INFO Trying connection to commissionee over different transport
2023-01-08 09:49:18 home-assistant chip.IN[1] INFO (U) Sending msg 71926606 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:49:23 home-assistant chip.IN[1] INFO (U) Sending msg 71926606 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:49:32 home-assistant chip.IN[1] INFO (U) Sending msg 71926606 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:49:44 home-assistant chip.IN[1] INFO (U) Sending msg 71926606 to IP address 'UDP:[fda7:b5a6:3fcc:0:a1d2:d04f:9a29:4bf9]:5540'
2023-01-08 09:50:02 home-assistant chip.EM[1] ERROR Failed to Send CHIP MessageCounter:71926606 on exchange 61909i sendCount: 4 max retries: 4
2023-01-08 09:50:03 home-assistant chip.SC[1] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-01-08 09:50:03 home-assistant matter_server.server.client_handler[1] ERROR [140079894612816] Error handling message: CommandMessage(message_id='efca6ba8ad2e4b7ebfb302bc4e700f44', command='commission_with_code', args={'code': '3336-271-0925'})
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/client_handler.py", line 185, in _run_handler
    result = await result
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 122, in commission_with_code
    raise NodeCommissionFailed(
matter_server.common.models.error.NodeCommissionFailed: Commission with code failed for node 1

Does this project implement also the OTA specificatiom of matter

I am still new to Matter, but I saw that device library spec defined an OTA client/server procedure.
Is it possible to use this nodes project as a Middleware for that procedure?

If so, can this nodes application achieve OTA on client/server alone, or does it need a previous installation of any other OTA client/server framework/agents (like Mender)?

Thanks for providing clarity.

Standalone Docker image?

I see there's a Docker image for this server as an addon for Home Assistant OS, what are the chances of having a standalone version that could be run alongside Home Assistant in a container?

How to change /data path

I'm trying to use this project outside of home assistant, as the script mentions it should be more generally useable, which rocks.

I notice it's looking to create and read files in /data. The script wouldn't run until I created that directory. I'm assuming that with Home Assistant that directory normally exists.

If there a way to set that path to some place else? I looked in the code to find where it was set, but haven't found it so far. All I found was that in theory it should save to the home directory. Perhaps /data is baked into the Chip library?

Commissioned nodes are not loaded after a restart

Commissioned nodes are never loaded after a controller restart because the storage controller is initialized before the compressed fabric id is known since the device controller hasn't been initialized

Commissioning of a ContactSensor device results in exception 'NoneType' object has no attribute 'stateValue'

I'm working with a Silicon Labs EFR32 board and the connectedhomeip chef ContactSensor example.

In commissioning my device the exception below occurs.

The root cause seems to be that ContactSensor in devices_types.py is missing the cluster BooleanState. If I add this the problem is fixed.

python-matter-server commit: ccb6d29
connectedhomeip commit: a1643eee5ef5534d494ae205bb586b4a9cbfee23
Home Assistant version: 2022.8.5

Exception trace from log:
2022-09-09 12:58:29.459 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform matter_experimental
2022-09-09T12:58:29.460750524-04:00 Traceback (most recent call last):
2022-09-09T12:58:29.460779133-04:00 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
2022-09-09T12:58:29.460801700-04:00 await asyncio.gather(*tasks)
2022-09-09T12:58:29.460822178-04:00 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 673, in _async_add_entity
2022-09-09T12:58:29.460876646-04:00 await entity.add_to_platform_finish()
2022-09-09T12:58:29.460898320-04:00 File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 775, in add_to_platform_finish
2022-09-09T12:58:29.460916537-04:00 await self.async_added_to_hass()
2022-09-09T12:58:29.460935921-04:00 File "/config/custom_components/matter_experimental/entity.py", line 77, in async_added_to_hass
2022-09-09T12:58:29.460955333-04:00 await self.init_matter_device()
2022-09-09T12:58:29.460973679-04:00 File "/config/custom_components/matter_experimental/entity.py", line 64, in init_matter_device
2022-09-09T12:58:29.460992991-04:00 self._update_from_device()
2022-09-09T12:58:29.461011986-04:00 File "/config/custom_components/matter_experimental/binary_sensor.py", line 47, in _update_from_device
2022-09-09T12:58:29.461030620-04:00 self._attr_is_on = self._device_type_instance.get_cluster(clusters.BooleanState).stateValue
2022-09-09T12:58:29.461048645-04:00 AttributeError: 'NoneType' object has no attribute 'stateValue'

Fix tests in HA core integration

After the refactor I've disabled all tests for now so we could get the HA beta out.
Too many changes to quickly adjust so this needs to be looked at before the next beta.

  • Create new fixture dumps (as the data model slightly changed)
  • Adjust existing tests
  • Remove the 'pytestmark' in each file to skip tests

Unable to commission ESP32 device

I've been struggling for days now to try and commission a single device using the HA integration, which seems completely unable to communicate with the HA server addon no matter what I do, so I switched to trying to communicate with the server addon using WS. I have been able to successfully commission the ESP32 device using the Android app, and I have always erased and reflashed the ESP32 device before attempting to commission it again using the HA addon.

I use the following WS command:

{ "message_id": "3", "command": "commission_with_code", "args": { "code": "MT:Y.K9042C00KA0648G00" } }

and get the following error:

{ "message_id": "3", "error_code": 99, "details": "Failed to interview node 18", "_type": "matter_server.common.models.message.ErrorResultMessage" }

And here are the logs from the HA server:

2022-12-20 17:48:54 core-matter-server matter_server.server.client_handler[124] DEBUG [140132372786672] Received CommandMessage(message_id='3', command='commission_with_code', args={'code': 'MT:Y.K9042C00KA0648G00'})
2022-12-20 17:48:54 core-matter-server matter_server.server.client_handler[124] DEBUG [140132372786672] Handling command commission_with_code
2022-12-20 17:48:54 core-matter-server chip.CTL[124] INFO Setting wifi credentials from parameters
2022-12-20 17:48:54 core-matter-server chip.CTL[124] INFO Setting attestation nonce to random value
2022-12-20 17:48:54 core-matter-server chip.CTL[124] INFO Setting CSR nonce to random value
2022-12-20 17:48:54 core-matter-server chip.CTL[124] DEBUG Stopping commissioning discovery over DNS-SD
2022-12-20 17:48:54 core-matter-server chip.CTL[124] INFO Starting commissioning discovery over BLE
2022-12-20 17:48:54 core-matter-server chip.CTL[124] INFO Starting commissioning discovery over DNS-SD
2022-12-20 17:48:54 core-matter-server chip.BLE[124] INFO BLE removing known devices.
2022-12-20 17:48:57 core-matter-server chip.BLE[124] INFO BLE initiating scan.
2022-12-20 17:48:57 core-matter-server chip.DL[124] ERROR Long dispatch time: 2054 ms, for event type 2
2022-12-20 17:48:57 core-matter-server chip.BLE[124] INFO New device scanned: DE:77:91:4D:CB:DE
2022-12-20 17:48:57 core-matter-server chip.BLE[124] INFO Device discriminator match. Attempting to connect.
2022-12-20 17:48:57 core-matter-server chip.BLE[124] INFO Scan complete notification without an active scan.
2022-12-20 17:48:57 core-matter-server chip.DL[124] DEBUG Bluez disconnected
2022-12-20 17:48:57 core-matter-server chip.DL[124] INFO Bluez notify CHIPoBluez connection disconnected
2022-12-20 17:48:57 core-matter-server chip.DL[124] ERROR FAIL: ConnectDevice : GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "Connect" with signature "" on interface "org.bluez.Device1" doesn't exist
 (41)
2022-12-20 17:48:57 core-matter-server chip.DL[124] DEBUG HandlePlatformSpecificBLEEvent 16386
2022-12-20 17:48:57 core-matter-server chip.CTL[124] ERROR Commissioning discovery over BLE failed: ../src/platform/Linux/bluez/Helper.cpp:1775: CHIP Error 0x000000AC: Internal error
2022-12-20 17:48:57 core-matter-server chip.-[124] ERROR ../src/platform/Linux/bluez/Helper.cpp:1775: CHIP Error 0x000000AC: Internal error at ../src/controller/SetUpCodePairer.cpp:283
2022-12-20 17:48:57 core-matter-server matter_server.server.storage[124] DEBUG Saved data to persistent storage
2022-12-20 17:49:24 core-matter-server chip.CTL[124] ERROR Discovery timed out
2022-12-20 17:49:24 core-matter-server chip.CTL[124] DEBUG Stopping commissioning discovery over DNS-SD
2022-12-20 17:49:27 core-matter-server chip.DIS[124] ERROR Timeout waiting for mDNS resolution.
2022-12-20 17:49:57 core-matter-server matter_server.server.device_controller[124] DEBUG Interviewing node: 18
2022-12-20 17:49:57 core-matter-server chip.CSM[124] DEBUG FindOrEstablishSession: PeerId = [1:0000000000000012]
2022-12-20 17:49:57 core-matter-server chip.CSM[124] DEBUG FindOrEstablishSession: No existing OperationalSessionSetup instance found
2022-12-20 17:49:57 core-matter-server chip.CTL[124] DEBUG OperationalSessionSetup[1:0000000000000012]: State change 1 --> 2
2022-12-20 17:49:57 core-matter-server chip.DIS[124] INFO Checking node lookup status after 201 ms
2022-12-20 17:50:12 core-matter-server chip.DIS[124] INFO Checking node lookup status after 15001 ms
2022-12-20 17:50:12 core-matter-server chip.DIS[124] ERROR OperationalSessionSetup[1:0000000000000012]: operational discovery failed: ../src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout
2022-12-20 17:50:12 core-matter-server matter_server.server.client_handler[124] ERROR [140132372786672] Error handling message: CommandMessage(message_id='3', command='commission_with_code', args={'code': 'MT:Y.K9042C00KA0648G00'})
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 238, in interview_node
    await self._call_sdk(self.chip_controller.ResolveNode, nodeid=node_id)
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 397, in _call_sdk
    return await self.server.loop.run_in_executor(
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/dist-packages/chip/ChipDeviceCtrl.py", line 595, in ResolveNode
    self.GetConnectedDeviceSync(nodeid, allowPASE=False)
  File "/usr/local/lib/python3.9/dist-packages/chip/ChipDeviceCtrl.py", line 859, in GetConnectedDeviceSync
    raise self._ChipStack.ErrorToException(returnErr)
chip.exceptions.ChipStackError: CHIP Error 0x00000032: Timeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/client_handler.py", line 183, in _run_handler
    result = await result
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 134, in commission_with_code
    await self.interview_node(node_id)
  File "/usr/local/lib/python3.9/dist-packages/matter_server/server/device_controller.py", line 245, in interview_node
    raise NodeInterviewFailed(f"Failed to interview node {node_id}") from err
matter_server.common.models.error.NodeInterviewFailed: Failed to interview node 18
2022-12-20 17:50:28 core-matter-server chip.DIS[124] ERROR Timeout waiting for mDNS resolution.

Implement Node remove/delete feature

Feature to remove a node from the fabric

  • implement in server
  • implement in client
  • implement in HA integration
  • figure out how to reset device on the chip sdk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.