hass_nuki_ng: Error when using bridge without internet-access

Hi, I’m using opener, lock and bridge. My bridge is not allowed to connect to the internet, but that throws some errors inside the integration and won’t let it work properly. But it should be possible to only use the bridge-API and not the web-API, right? I am using no Web Api Token anyways.

Error in logs:

2022-04-14 04:47:38 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response: 401 Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 323, in _update bridge_info = await self.api.bridge_info() File "/config/custom_components/nuki_ng/nuki.py", line 72, in bridge_info return await self.async_json(lambda r: r.get(self.bridge_url("/info"))) File "/config/custom_components/nuki_ng/nuki.py", line 38, in async_json raise ConnectionError(f"Http response: {response.status_code}") ConnectionError: Http response: 401 2022-04-14 04:47:38 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data: 2022-04-14 04:48:08 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to update callback http://192.168.2.2:8123/api/webhook/nuki_ng_bridge_hook_bc1927bcb5ec97f1db6e578549480df7

When allowing the bridge to connect to the internet it works like it should, so it’s definetly regarding internet-access of the bridge.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

There’s a bigger problem here, I’ll try to address it. Generally speaking, the connection between the integration and the bridge isn’t always reliable, so errors could happen. In the way how it’s implemented now, any fetch error during the first data update will prevent the integration from starting. Most likely I will suppress errors at the startup to make it more reliable