home-assistant-libs / python-matter-server Goto Github PK
View Code? Open in Web Editor NEWPython server to interact with Matter
License: Apache License 2.0
Python server to interact with Matter
License: Apache License 2.0
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
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?
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.
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:
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.
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
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])
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:
python-matter-server/matter_server/common/models/node.py
Lines 210 to 218 in 510c2d5
Could it be that a misassumption has been made here about this attribute?
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'
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'
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.
Feature to remove a node from the fabric
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.
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
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?
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.
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
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 .
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.
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.
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>>
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.
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.
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'
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
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:
Would packages like these make the server easier to develop?
https://github.com/permitio/fastapi_websocket_rpc
https://github.com/permitio/fastapi_websocket_pubsub
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'
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.
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?
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
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
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.
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
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
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
Should include device types Speaker and ContentApplication into single entity.
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
Error no manifest. json found
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
I see you removed the HACS python link in the add-on Docs Great and fast :)
But the top Steps 1 and 2 go to a bad place. Not the same place that works from
https://www.home-assistant.io/integrations/matter/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.