home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.76k stars 30.47k forks source link

netatmon smart lock with homekit causes error #123494

Closed cornebistouille closed 2 months ago

cornebistouille commented 2 months ago

The problem

I tried to connect Netatmo smart lock with HA via Home kit integration (it is apple home kit compatible) first, in added a bluetooh dongle on my green box, then my lock was discovered. all seems to work perfectly, but when i try to unlock the smartlock, there is an error the log shows first :those warnings :` Enregistreur: aiohomekit.pdu Source: components/homekit_controller/connection.py:972 S'est produit pour la première fois: 10:44:25 (24 occurrences) Dernier enregistrement: 13:34:29

Transaction 198 failed with error 3 (Insufficient authorization) Transaction 227 failed with error 3 (Insufficient authorization) Transaction 234 failed with error 3 (Insufficient authorization) Transaction 81 failed with error 3 (Insufficient authorization) Transaction 209 failed with error 3 (Insufficient authorization) then a code error :Enregistreur: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 intégration: Home Assistant WebSocket API (documentation, problèmes) S'est produit pour la première fois: 10:44:26 (24 occurrences) Dernier enregistrement: 13:34:29

[281472355865152] Unexpected exception [281471830046560] Unexpected exception [281471830267008] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/lock/init.py", line 226, in async_handle_lock_service await self.async_lock(self.add_default_code(kwargs)) File "/usr/src/homeassistant/homeassistant/components/homekit_controller/lock.py", line 117, in async_lock await self._set_lock_state(STATE_LOCKED) File "/usr/src/homeassistant/homeassistant/components/homekit_controller/lock.py", line 125, in _set_lock_state await self.async_put_characteristics( File "/usr/src/homeassistant/homeassistant/components/homekit_controller/entity.py", line 140, in async_put_characteristics return await self._accessory.put_characteristics(payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 972, in put_characteristics await self.pairing.put_characteristics(characteristics) File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 197, in _async_operation_lock_wrap return await func(self, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/init.py", line 505, in _async_wrap_bluetooth_connection_error_retry return await func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/client.py", line 76, in _async_disconnect_on_missing_services_wrap return await func(self, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 213, in _async_restore_and_resume return await func(self, args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 1504, in put_characteristics await self._async_request_under_lock(OpCode.CHAR_EXEC_WRITE, char) File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 459, in _async_request_under_lock raise_for_pdu_status(self.client, pdu_status) File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/client.py", line 182, in raise_for_pdu_status raise PDUStatusError( aiohomekit.controller.ble.client.PDUStatusError: CC:9F:01:4E:BA:8B: PDU status was not success: Insufficient authorization (3)`

What version of Home Assistant Core has the issue?

System Information version | core-2024.8.0 -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.12.4 os_name | Linux os_version | 6.6.33-haos arch | aarch64 timezone | Europe/Paris config_dir | /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4993 Installed Version | 1.34.0 Stage | running Available Repositories | 1389 Downloaded Repositories | 5 HACS Data | ok
AccuWeather can_reach_server | ok -- | -- remaining_requests | 24
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.08.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 28.0 GB disk_used | 8.8 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | green supervisor_api | ok version_api | ok installed_addons | Duck DNS (1.18.0), File editor (5.8.0), Google Assistant SDK (2.5.0), Advanced SSH & Web Terminal (18.0.0), Spotify Connect (0.13.0), NGINX Home Assistant SSL proxy (3.9.0), Studio Code Server (5.15.0), Mosquitto broker (6.4.1), Zigbee2MQTT (1.39.1-1), Network UPS Tools (0.13.1), Music Assistant Server (2.1.1)
Dashboards dashboards | 3 -- | -- resources | 3 views | 8 mode | storage
Recorder oldest_recorder_run | 30 juillet 2024 à 12:51 -- | -- current_recorder_run | 9 août 2024 à 22:46 estimated_db_size | 73.10 MiB database_engine | sqlite database_version | 3.45.3
Spotify api_endpoint_reachable | ok -- | --

What was the last working version of Home Assistant Core?

core 2024-8.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

homekit

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit_controller/

Diagnostics information

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.8.0", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "Europe/Paris", "os_name": "Linux", "os_version": "6.6.33-haos", "supervisor": "2024.08.0", "host_os": "Home Assistant OS 12.4", "docker_version": "26.1.4", "chassis": "embedded", "run_as_root": true }, "custom_components": { "spotcast": { "documentation": "https://github.com/fondberg/spotcast", "version": "v3.6.30", "requirements": [] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "mass": { "documentation": "https://music-assistant.io", "version": "2024.6.2", "requirements": [ "music-assistant==2.0.6" ] } }, "integration_manifest": { "domain": "homekit_controller", "name": "HomeKit Device", "after_dependencies": [ "thread" ], "bluetooth": [ { "manufacturer_id": 76, "manufacturer_data_start": [ 6 ] } ], "codeowners": [ "Jc2k", "bdraco" ], "config_flow": true, "dependencies": [ "bluetooth_adapters", "zeroconf" ], "documentation": "https://www.home-assistant.io/integrations/homekit_controller", "iot_class": "local_push", "loggers": [ "aiohomekit", "commentjson" ], "requirements": [ "aiohomekit==3.2.1" ], "zeroconf": [ "_hap._tcp.local.", "_hap._udp.local." ], "is_built_in": true }, "setup_times": { "null": { "setup": 0.03178158705122769 }, "01J4V4SFV61YA12DHHGNYT97T9": { "wait_import_platforms": -14.966768597951159, "wait_base_component": -0.00396784907206893, "config_entry_setup": 14.992997412919067 } }, "data": { "config-entry": { "title": "Smart Door Lock", "version": 1, "data": { "AccessoryPairingID": "D0:D1:A6:9B:06:95", "AccessoryLTPK": "a3b08b0c4b788bd163a7f0ced40d5d99d052a83d5c7b0e21463394088317a0c8", "iOSPairingId": "451bfbe8-a6ea-4c26-84db-5f3502bf2b55", "iOSDeviceLTSK": "REDACTED", "iOSDeviceLTPK": "5d6398962c51a559f972d87fcbf3cd702cc24f3d705edcf90436c39dbfc84918", "AccessoryAddress": "CC:9F:01:4E:BA:8B", "Connection": "BLE" } }, "entity-map": [ { "aid": 1, "services": [ { "iid": 53, "type": "00000012-4DDB-598F-A73F-006513F2DB6B", "characteristics": [ { "type": "00000016-4DDB-598F-A73F-006513F2DB6B", "iid": 62, "perms": [ "pr", "hd" ], "format": "data", "value": "00", "handle": 160 }, { "type": "000000A5-0000-1000-8000-0026BB765291", "iid": 54, "perms": [ "pr" ], "format": "data", "value": null, "handle": 143 }, { "type": "00000010-4DDB-598F-A73F-006513F2DB6B", "iid": 57, "perms": [ "pr", "ev", "hd" ], "format": "uint8", "value": 1, "minValue": 0, "maxValue": 10, "handle": 153, "disconnected_events": true, "broadcast_events": true }, { "type": "00000018-4DDB-598F-A73F-006513F2DB6B", "iid": 64, "perms": [ "pr", "ev", "hd" ], "format": "data", "value": "5627ca61151a6ea77480d6f4c2aa2fa220c0eb3fe3f36549b394530ab0a2853f04578c18e280cddc7573d6944e548834d3c1811da0a902c6b25ac292b83051ac", "handle": 166 }, { "type": "0000000F-4DDB-598F-A73F-006513F2DB6B", "iid": 56, "perms": [ "pw", "aa", "hd" ], "format": "bool", "handle": 150 }, { "type": "0000000E-4DDB-598F-A73F-006513F2DB6B", "iid": 55, "perms": [ "pr", "ev", "hd" ], "format": "uint64", "value": 0, "minValue": 0, "maxValue": 1099511627775, "handle": 146, "disconnected_events": true, "broadcast_events": true }, { "type": "00000017-4DDB-598F-A73F-006513F2DB6B", "iid": 63, "perms": [ "pw", "hd" ], "format": "uint8", "handle": 163 }, { "type": "00000011-4DDB-598F-A73F-006513F2DB6B", "iid": 58, "perms": [ "pw", "aa", "hd" ], "format": "uint64", "minValue": 0, "maxValue": 1099511627775, "handle": 157 } ] }, { "iid": 70, "type": "EA22EA53-6227-55EA-AC24-73ACF3EEA0E8", "characteristics": [ { "type": "00F44C18-042E-5C4E-9A4C-561D44DCD804", "iid": 72, "perms": [ "pr", "hd" ], "format": "string", "value": "ga4bd64", "maxLen": 64, "handle": 176 }, { "type": "00000020-4DDB-598F-A73F-006513F2DB6B", "iid": 74, "perms": [ "pr", "hd" ], "format": "uint32", "value": 3050, "handle": 182 }, { "type": "000000A5-0000-1000-8000-0026BB765291", "iid": 71, "perms": [ "pr" ], "format": "data", "value": null, "handle": 173 }, { "type": "0000001F-4DDB-598F-A73F-006513F2DB6B", "iid": 73, "perms": [ "pr", "hd" ], "format": "uint32", "value": 23, "handle": 179 } ] }, { "iid": 67, "type": "0000001C-4DDB-598F-A73F-006513F2DB6B", "characteristics": [ { "type": "00000022-4DDB-598F-A73F-006513F2DB6B", "iid": 85, "perms": [ "pr", "ev" ], "format": "uint8", "value": 0, "minValue": 0, "maxValue": 2, "handle": 211, "disconnected_events": true, "broadcast_events": true }, { "type": "000000A5-0000-1000-8000-0026BB765291", "iid": 68, "perms": [ "pr" ], "format": "data", "value": null, "handle": 188 }, { "type": "00000028-4DDB-598F-A73F-006513F2DB6B", "iid": 91, "perms": [ "pr", "hd" ], "format": "data", "value": "", "handle": 208 }, { "type": "0000001A-4DDB-598F-A73F-006513F2DB6B", "iid": 76, "perms": [ "pw", "hd" ], "format": "uint8", "minValue": 0, "maxValue": 1, "handle": 198 }, { "type": "0000001B-4DDB-598F-A73F-006513F2DB6B", "iid": 77, "perms": [ "pr", "ev", "hd" ], "format": "uint8", "value": 2, "minValue": 0, "maxValue": 6, "handle": 194, "disconnected_events": true, "broadcast_events": true }, { "type": "00000026-4DDB-598F-A73F-006513F2DB6B", "iid": 89, "perms": [ "pw", "aa", "hd" ], "format": "uint8", "minValue": 0, "maxValue": 1, "handle": 201 }, { "type": "00000015-4DDB-598F-A73F-006513F2DB6B", "iid": 69, "perms": [ "pr", "pw", "aa" ], "format": "bool", "value": false, "handle": 191 }, { "type": "00000027-4DDB-598F-A73F-006513F2DB6B", "iid": 90, "perms": [ "pr", "ev", "hd" ], "format": "uint8", "value": 0, "minValue": 0, "maxValue": 4, "handle": 204, "disconnected_events": true, "broadcast_events": true } ] }, { "iid": 45, "type": "00000004-4DDB-598F-A73F-006513F2DB6B", "characteristics": [ { "type": "0000001E-4DDB-598F-A73F-006513F2DB6B", "iid": 80, "perms": [ "pr", "ev", "hd" ], "format": "uint8", "value": 0, "minValue": 0, "maxValue": 8, "handle": 127, "disconnected_events": true, "broadcast_events": true }, { "type": "000000A5-0000-1000-8000-0026BB765291", "iid": 46, "perms": [ "pr" ], "format": "data", "value": null, "handle": 118 }, { "type": "00000023-4DDB-598F-A73F-006513F2DB6B", "iid": 87, "perms": [ "pw" ], "format": "uint8", "minValue": 0, "maxValue": 2, "handle": 134 }, { "type": "00000021-4DDB-598F-A73F-006513F2DB6B", "iid": 83, "perms": [ "pr", "hd" ], "format": "data", "value": "", "handle": 137 }, { "type": "00000024-4DDB-598F-A73F-006513F2DB6B", "iid": 86, "perms": [ "pr", "hd" ], "format": "data", "value": "", "handle": 131 }, { "type": "00000009-4DDB-598F-A73F-006513F2DB6B", "iid": 47, "perms": [ "pw", "hd" ], "format": "uint8", "minValue": 0, "maxValue": 1, "handle": 121 }, { "type": "00000013-4DDB-598F-A73F-006513F2DB6B", "iid": 66, "perms": [ "pr", "pw", "hd" ], "format": "data", "value": "", "handle": 124 } ] }, { "iid": 12, "type": "00000055-0000-1000-8000-0026BB765291", "characteristics": [ { "type": "0000004F-0000-1000-8000-0026BB765291", "iid": 15, "perms": [], "format": "uint8", "description": "Pairing Features", "handle": 64 }, { "type": "0000004E-0000-1000-8000-0026BB765291", "iid": 14, "perms": [], "format": "data", "description": "Pair Verify", "handle": 61 }, { "type": "0000004C-0000-1000-8000-0026BB765291", "iid": 13, "perms": [], "format": "data", "description": "Pair Setup", "handle": 58 }, { "type": "00000050-0000-1000-8000-0026BB765291", "iid": 16, "perms": [ "pr", "pw" ], "format": "data", "value": null, "description": "Pairing Pairings", "handle": 67 } ] }, { "iid": 22, "type": "00000096-0000-1000-8000-0026BB765291", "characteristics": [ { "type": "00000023-0000-1000-8000-0026BB765291", "iid": 25, "perms": [ "pr" ], "format": "string", "value": "Battery Service", "description": "Name", "maxLen": 64, "handle": 88 }, { "type": "00000014-4DDB-598F-A73F-006513F2DB6B", "iid": 75, "perms": [ "pr", "pw" ], "format": "uint8", "value": 0, "minValue": 0, "maxValue": 2, "handle": 91 }, { "type": "00000068-0000-1000-8000-0026BB765291", "iid": 23, "perms": [ "pr", "ev" ], "format": "uint8", "value": 100, "description": "Battery Level", "unit": "percentage", "minValue": 0, "maxValue": 100, "minStep": 1, "handle": 80, "disconnected_events": true, "broadcast_events": true }, { "type": "00000079-0000-1000-8000-0026BB765291", "iid": 27, "perms": [ "pr", "ev" ], "format": "uint8", "value": 0, "description": "Status Low Battery", "minValue": 0, "maxValue": 1, "handle": 84, "disconnected_events": true, "broadcast_events": true }, { "type": "00000025-4DDB-598F-A73F-006513F2DB6B", "iid": 88, "perms": [ "pr", "ev" ], "format": "uint8", "value": 0, "minValue": 0, "maxValue": 1, "handle": 94, "disconnected_events": true, "broadcast_events": true } ] }, { "iid": 21, "type": "000000A2-0000-1000-8000-0026BB765291", "characteristics": [ { "type": "00000037-0000-1000-8000-0026BB765291", "iid": 20, "perms": [ "pr" ], "format": "string", "value": "2.2.0", "description": "Version", "maxLen": 64, "handle": 52 }, { "type": "000000A5-0000-1000-8000-0026BB765291", "iid": 19, "perms": [ "pr" ], "format": "data", "value": null, "handle": 49 } ] }, { "iid": 78, "type": "00000239-0000-1000-8000-0026BB765291", "characteristics": [ { "type": "0000024A-0000-1000-8000-0026BB765291", "iid": 79, "perms": [ "pr", "ev" ], "format": "uint32", "value": 8, "handle": 73, "disconnected_events": true, "broadcast_events": true } ] }, { "iid": 39, "type": "00000045-0000-1000-8000-0026BB765291", "characteristics": [ { "type": "0000001D-0000-1000-8000-0026BB765291", "iid": 40, "perms": [ "pr", "ev" ], "format": "uint8", "value": 1, "description": "Lock Current State", "minValue": 0, "maxValue": 3, "handle": 104, "disconnected_events": true, "broadcast_events": true }, { "type": "000000A5-0000-1000-8000-0026BB765291", "iid": 43, "perms": [ "pr" ], "format": "data", "value": null, "handle": 101 }, { "type": "0000001E-0000-1000-8000-0026BB765291", "iid": 41, "perms": [ "pr", "pw", "ev", "aa", "tw" ], "format": "uint8", "value": 1, "description": "Lock Target State", "minValue": 0, "maxValue": 1, "handle": 108, "disconnected_events": true, "broadcast_events": true }, { "type": "00000023-0000-1000-8000-0026BB765291", "iid": 42, "perms": [ "pr" ], "format": "string", "value": "Lock Mechanism", "description": "Name", "maxLen": 64, "handle": 112 } ] }, { "iid": 1, "type": "0000003E-0000-1000-8000-0026BB765291", "characteristics": [ { "type": "00000220-0000-1000-8000-0026BB765291", "iid": 52, "perms": [ "pr", "hd" ], "format": "data", "value": "fa7beb3af47f8192", "handle": 39 }, { "type": "00000020-0000-1000-8000-0026BB765291", "iid": 5, "perms": [ "pr" ], "format": "string", "value": "Netatmo", "description": "Manufacturer", "maxLen": 64, "handle": 21 }, { "type": "00000014-0000-1000-8000-0026BB765291", "iid": 4, "perms": [ "pw" ], "format": "bool", "description": "Identify", "handle": 18 }, { "type": "00000023-0000-1000-8000-0026BB765291", "iid": 7, "perms": [ "pr" ], "format": "string", "value": "Smart Door Lock", "description": "Name", "maxLen": 64, "handle": 27 }, { "type": "00000030-0000-1000-8000-0026BB765291", "iid": 8, "perms": [ "pr" ], "format": "string", "value": "REDACTED", "description": "Serial Number", "maxLen": 64, "handle": 30 }, { "type": "00000053-0000-1000-8000-0026BB765291", "iid": 3, "perms": [ "pr" ], "format": "string", "value": "0", "description": "Hardware Revision", "maxLen": 64, "handle": 36 }, { "type": "00000021-0000-1000-8000-0026BB765291", "iid": 6, "perms": [ "pr" ], "format": "string", "value": "Smart Door Lock", "description": "Model", "maxLen": 64, "handle": 24 }, { "type": "000000A6-0000-1000-8000-0026BB765291", "iid": 84, "perms": [ "pr", "ev" ], "format": "uint32", "value": 0, "description": "Accessory Flags", "minValue": 0, "maxValue": 1, "handle": 42, "disconnected_events": true, "broadcast_events": true }, { "type": "00000052-0000-1000-8000-0026BB765291", "iid": 2, "perms": [ "pr" ], "format": "string", "value": "3.5.0", "description": "Firmware Revision", "maxLen": 64, "handle": 33 } ] } ] } ], "config-num": 1, "device": { "name": "Smart Door Lock", "model": "Smart Door Lock", "manfacturer": "Netatmo", "sw_version": "3.5.0", "hw_version": "0", "entities": [ { "original_name": "Signal strength", "original_device_class": "signal_strength", "entity_category": "diagnostic", "original_icon": null, "icon": null, "unit_of_measurement": "dBm", "device_class": null, "disabled": true, "disabled_by": "integration", "state": null }, { "original_name": "Smart Door Lock Battery Service", "original_device_class": "battery", "entity_category": "diagnostic", "original_icon": "mdi:battery-unknown", "icon": null, "unit_of_measurement": "%", "device_class": null, "disabled": false, "disabled_by": null, "state": { "entity_id": "sensor.smart_door_lock_battery_service", "state": "100", "attributes": { "state_class": "measurement", "unit_of_measurement": "%", "device_class": "battery", "icon": "mdi:battery", "friendly_name": "Smart Door Lock Battery Service" }, "last_changed": "2024-08-09T20:47:52.089468+00:00", "last_reported": "2024-08-09T20:47:52.089468+00:00", "last_updated": "2024-08-09T20:47:52.089468+00:00" } }, { "original_name": "Smart Door Lock Identify", "original_device_class": "identify", "entity_category": "diagnostic", "original_icon": null, "icon": null, "unit_of_measurement": null, "device_class": null, "disabled": false, "disabled_by": null, "state": { "entity_id": "button.smart_door_lock_identify", "state": "unknown", "attributes": { "device_class": "identify", "friendly_name": "Smart Door Lock Identify" }, "last_changed": "2024-08-09T20:47:52.090338+00:00", "last_reported": "2024-08-09T20:47:52.090338+00:00", "last_updated": "2024-08-09T20:47:52.090338+00:00" } }, { "original_name": "Smart Door Lock Lock Mechanism", "original_device_class": null, "entity_category": null, "original_icon": null, "icon": null, "unit_of_measurement": null, "device_class": null, "disabled": false, "disabled_by": null, "state": { "entity_id": "lock.smart_door_lock_lock_mechanism", "state": "locked", "attributes": { "friendly_name": "Smart Door Lock Lock Mechanism", "supported_features": 0 }, "last_changed": "2024-08-09T20:48:18.115256+00:00", "last_reported": "2024-08-09T20:48:18.115256+00:00", "last_updated": "2024-08-09T20:48:18.115256+00:00" } } ] } } }

Example YAML snippet

No response

Anything in the logs that might be useful for us?

3
4
5
6
7
8
9
10
Enregistreur: aiohomekit.pdu
Source: components/homekit_controller/connection.py:972
S'est produit pour la première fois: 10:44:25 (24 occurrences)
Dernier enregistrement: 13:34:29

Transaction 198 failed with error 3 (Insufficient authorization)
Transaction 227 failed with error 3 (Insufficient authorization)
Transaction 234 failed with error 3 (Insufficient authorization)
Transaction 81 failed with error 3 (Insufficient authorization)
Transaction 209 failed with error 3 (Insufficient authorization)

and the error issued in the log :

Enregistreur: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:241
intégration: Home Assistant WebSocket API (documentation, problèmes)
S'est produit pour la première fois: 10:44:26 (24 occurrences)
Dernier enregistrement: 13:34:29

[281472355865152] Unexpected exception
[281471830046560] Unexpected exception
[281471830267008] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/lock/__init__.py", line 226, in async_handle_lock_service
    await self.async_lock(**self.add_default_code(kwargs))
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/lock.py", line 117, in async_lock
    await self._set_lock_state(STATE_LOCKED)
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/lock.py", line 125, in _set_lock_state
    await self.async_put_characteristics(
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/entity.py", line 140, in async_put_characteristics
    return await self._accessory.put_characteristics(payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 972, in put_characteristics
    await self.pairing.put_characteristics(characteristics)
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 197, in _async_operation_lock_wrap
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 505, in _async_wrap_bluetooth_connection_error_retry
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/client.py", line 76, in _async_disconnect_on_missing_services_wrap
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 213, in _async_restore_and_resume
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 1504, in put_characteristics
    await self._async_request_under_lock(OpCode.CHAR_EXEC_WRITE, char)
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/pairing.py", line 459, in _async_request_under_lock
    raise_for_pdu_status(self.client, pdu_status)
  File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/ble/client.py", line 182, in raise_for_pdu_status
    raise PDUStatusError(
aiohomekit.controller.ble.client.PDUStatusError: CC:9F:01:4E:BA:8B: PDU status was not success: Insufficient authorization (3)

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @jc2k, @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit_controller) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `homekit_controller` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homekit_controller` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


homekit_controller documentation homekit_controller source (message by IssueLinks)

cornebistouille commented 2 months ago

i will be following that post if you have some issue with some french in the log :)

Jc2k commented 2 months ago

Some locks have an extra layer of protection that is not documented. Looks like this is one of them. Unfortunately right now your lock will only work in "read only" mode.

cornebistouille commented 2 months ago

ok too bad, thank you anyway to have had a look.