Closed Duncank closed 5 months ago
@Duncank connection timeout errors are usually due to poor connection quality. can you try putting the BT adapter closer to the door?
I've upgraded this addon to the latest version (0.0.11) and moved the raspberry pi a bit closer to my door, so the distance is just a little over a meter now.
The integration no longer shows as 'failed to setup', but just shows '0 devices, 0 entities' now. The logs show four errors, a;; with the same traceback but with different paths in it for sensor.py
, lock.py
, button.py
and binary_sensor.py
:
Logger: homeassistant.components.sensor
Bron: helpers/entity_platform.py:356
integratie: Sensor (documentatie, problemen)
Eerst voorgekomen: 6 april 2024 om 14:11:53 (2 gebeurtenissen)
Laatst gelogd: 6 april 2024 om 14:13:42
Error while setting up hass_nuki_bt platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/hass_nuki_bt/sensor.py", line 116, in async_setup_entry
entities = [NukiSensor(coordinator, sensor) for sensor in SENSOR_TYPES]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hass_nuki_bt/sensor.py", line 125, in __init__
super().__init__(coordinator)
File "/config/custom_components/hass_nuki_bt/entity.py", line 42, in __init__
str(x) for x in coordinator.device.config["hardware_revision"]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'hardware_revision'
Hello
I have the same problem with the Addon and Nuki 4.0
After pairing I can not see Entities.
Error is the same
@Terabyte2000 @Duncank can you please share full logs? especially i'm interested to see if the config was retrieved successfully from the lock, and if the hw rev is part of that config.
@ronengr
Is this log correct? error_log.txt
thanks @Terabyte2000 it seems there is an issue getting config info from the lock
can you enable full debug log in the integration, so i can see the full flow? just go to the nuki lock integration, click on "enable debug logging", reload the integration, give it a few minutes, and then disable the debug logs. this will automatically download the logs to your computer.
@ronengr
I hope this is the right log. It seems that there are logs of all Errors in it
@Terabyte2000 thanks. it seems that getting the lock state is succesfull, only issue is with getting the config. They might have changes some things in how the "config" works in nuki4. I didn't see any documentation about that.
let me check if I can maybe make the integration run without full config info.
@ronengr
Thanks
Let me know if i you need anything else
@Terabyte2000 I've released a new version, that should be able to handle the case of filing to retrieve config info. there will be some missing info (like no Nuki HW/SW info, etc), and there will still be an error in the log, but helpfully other functionality should work.
without the lock itself, or some online info on the changes they made in how "config" works for the new lock, I'm afraid this is all i can do at the moment.
Let me know if this works for you.
@ronengr
Entities are here now.
Edit: seems to work
Some errors in log. Do you need them?
@Terabyte2000 thanks. the issues are to be expected. as i said, it seems something has changed with the format of the "config" msg in nuki4. as i couldn't find any documentation for this change, there is currently nothing much i can do.
but at lease the lock and integration should work for most functionality (lock/unlock etc), even if there are some errors in the log.
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1397 Downloaded Repositories | 12 HACS Data | okAccuWeather
can_reach_server | ok -- | -- remaining_requests | 42Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 11.5 -- | -- update_channel | stable supervisor_version | supervisor-2024.01.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 28.5 GB disk_used | 6.9 GB healthy | true supported | true board | rpi3 supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.9.0), Mosquitto broker (6.4.0), Valetudo Mapper (1.9.0), Cloudflared (5.1.3), Zigbee2MQTT (1.35.3-1), Home Assistant Google Drive Backup (0.112.1)Dashboards
dashboards | 1 -- | -- resources | 4 views | 9 mode | storageRecorder
oldest_recorder_run | 8 februari 2024 om 08:05 -- | -- current_recorder_run | 18 februari 2024 om 12:00 estimated_db_size | 174.17 MiB database_engine | sqlite database_version | 3.44.2Spotify
api_endpoint_reachable | ok -- | --Checklist
Describe the issue
My Nuki v4 is discovered by HA and this integration, but 'failed to setup' every time, with multiple errors showing up in the logs. The Nuki is located within 1.5 meters of my Raspberry Pi 3B+ running home assistant and the default onboard bluetooth.
Reproduction steps
Debug logs