kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
176 stars 33 forks source link

After HA Reboot - " (...) Failed to update callback (...) Http response: 503" #66

Closed anthonws closed 2 years ago

anthonws commented 2 years ago

Is this expected, after HA reboots?? Is it a question of Bridge capacity?

2022-06-22 10:22:08 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to update callback http://192.168.25.9:8123/api/webhook/nuki_ng_bridge_hook_xxxxxxxxx
Traceback (most recent call last):
File "/config/custom_components/nuki_ng/nuki.py", line 339, in _update
callbacks_list = await self.api.bridge_check_callback(
File "/config/custom_components/nuki_ng/nuki.py", line 146, in bridge_check_callback
callbacks = await self.async_json(
File "/config/custom_components/nuki_ng/nuki.py", line 38, in async_json
raise ConnectionError(f"Http response: {response.status_code}")
ConnectionError: Http response: 503
2022-06-22 10:22:08 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response: 503
Traceback (most recent call last):
File "/config/custom_components/nuki_ng/nuki.py", line 344, 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: 503
2022-06-22 10:22:08 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data: 
alexdelprete commented 2 years ago

the bridge is very limited, it can only manage 1 request at a time, if two requests arrive at the same time, it throws error 503.

Make sure you are using only this component, not in parallel to the official one as that leads to these errors.

Also, if you have the mobile app open doing things, you have multiple requests to the bridge.

anthonws commented 2 years ago

Understood! Thanks for the input!