kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
177 stars 34 forks source link

Nuki Bridge Bridge Callback is Disconnected #4

Closed roeidalm closed 2 years ago

roeidalm commented 2 years ago

Hi, I try to connect to a Callback function. But there aren't docs or explain why this is not working. Would you please explain to me how to do this?

kvj commented 2 years ago

Not sure I understand the issue. What kind of error are you getting?

roeidalm commented 2 years ago

There is any guide how to connect the nuki to callback?

kvj commented 2 years ago

You don't need to do anything in order to set a callback. The integration will do it for you.

Just make sure you set a correct Home assistant internal URL, using http:// schema. The callback status is being reported via the Bridge Callback Set sensor

roeidalm commented 2 years ago

OK, so it's not working, how can I send you the debug or the data?

roeidalm commented 2 years ago

Logger: custom_components.nuki_ng.nuki Source: custom_components/nuki_ng/nuki.py:117 Integration: Nuki Lock (documentation, issues) First occurred: 9:42:57 PM (7 occurrences) Last logged: 9:46:00 PM Failed to update callback http://192.168.2.135:8123/api/webhook/nuki_ng_bridge_hook_59156d185971e941.......

Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 201, in _update await self.api.bridge_check_callback(self.bridge_hook) File "/config/custom_components/nuki_ng/nuki.py", line 117, in bridge_check_callback raise ConnectionError(result.get("message")) ConnectionError: too many callbacks registered

kvj commented 2 years ago

As per the error, ConnectionError: too many callbacks registered, the component isn't able to register another callback, because Nuki Bridge supports max 3 different callbacks.

You have multiple options to resolve that:

  1. (Make sure you're using the latest version) Remove other callback(s) by calling custom service nuki_ng.bridge_delete_callback. The list of callbacks currently set is available as custom attributes of the entity above
Screenshot 2021-11-14 at 20 58 23
  1. Remove other callback(s) manually, via API call https://developer.nuki.io/page/nuki-bridge-http-api-1-12/4#heading--callback-remove
  2. Reset your bridge to have all callbacks removed
roeidalm commented 2 years ago

You are amazing! thanks! this fix that!