kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
167 stars 32 forks source link

No login since yesterday #175

Open thphilipp opened 6 months ago

thphilipp commented 6 months ago

Hi all,

since yesterday i cant connect with home assistant and this addon (hass_nuki_ng). Everytime i get this error:

Fehler in der Kommunikation mit der Nuki Bridge Errors in communication with the Nuki Bridge

Is this a generell problem or only for me? In front of it everything worked out perfectly.

inc-ali commented 6 months ago

@thphilipp in order to help you, you need to provide debug logs from the add-on.

GregorEstebanCardosoSchiller commented 6 months ago

After Update to 0.5.0

2024-01-09 08:22:27.453 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error while fetching auth: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 454, in _update item["web_auth"] = await self.api.web_list_all_auths(web_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 253, in web_list_all_auths response = await self.web_async_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 186, in web_async_json return await self.async_json( ^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 41, in async_json raise HomeAssistantError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") homeassistant.exceptions.HomeAssistantError: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized 2024-01-09 08:22:27.455 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: 'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 454, in _update item["web_auth"] = await self.api.web_list_all_auths(web_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 253, in web_list_all_auths response = await self.web_async_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 186, in web_async_json return await self.async_json( ^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 41, in async_json raise HomeAssistantError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") homeassistant.exceptions.HomeAssistantError: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 458, in _update item["web_auth"] = self.device_data(dev_id).get("web_auth", {}) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 536, in device_data return self.data.get("devices", {}).get(dev_id, {}) ^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get' 2024-01-09 08:22:48.272 WARNING (MainThread) [custom_components.nuki_ng.nuki] Despite being configured, Web API request has failed 2024-01-09 08:22:48.272 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error while fetching auth: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 454, in _update item["web_auth"] = await self.api.web_list_all_auths(web_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 253, in web_list_all_auths response = await self.web_async_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 186, in web_async_json return await self.async_json( ^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 41, in async_json raise HomeAssistantError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") homeassistant.exceptions.HomeAssistantError: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized 2024-01-09 08:22:48.274 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: 'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 454, in _update item["web_auth"] = await self.api.web_list_all_auths(web_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 253, in web_list_all_auths response = await self.web_async_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 186, in web_async_json return await self.async_json( ^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 41, in async_json raise HomeAssistantError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") homeassistant.exceptions.HomeAssistantError: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 458, in _update item["web_auth"] = self.device_data(dev_id).get("web_auth", {}) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nuki_ng/nuki.py", line 536, in device_data return self.data.get("devices", {}).get(dev_id, {}) ^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get'

kvj commented 6 months ago

homeassistant.exceptions.HomeAssistantError: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized

Your web token doesn't have the required permissions. Double check that you've granted permissions to manage authorization entries

GregorEstebanCardosoSchiller commented 6 months ago

homeassistant.exceptions.HomeAssistantError: Http response for https://api.nuki.io/smartlock/18007158349/auth: 401 Unauthorized

Your web token doesn't have the required permissions. Double check that you've granted permissions to manage authorization entries

NAIS!!! Thx!