Nuki Card with Callback support (supports both Lock & Opener, it replaces the official integration)

I am struggling .
Is there a simple way to “reset” everything to initial state ?
Delete the WebHook in ha
reset auth in nuki.
In short start from scratch

ty / grazie

Hey Ale, I checked the Callback with the Hook. They were different. So

  1. I deleted it with the Curl (curl -X GET ‘http://nuki-bridge.axel.dom:8080/callback/remove?id=0&token=xxxxx’)
  2. HA restart
  3. check for Callback with curl -X GET 'http://nuki-bridge.axel.dom:8080/callback/list?token=xxxxxx

(I did 2 + 3 two times to be sure)

RESULT: No new Callback generated.
Peter

Remove the webhook on the bridge: http://nuki-bridge.axel.dom:8080/callback/remove?id=0&token=xxxxx
Restart HA, the Nuki Card should then check that the bridge has no callback configured and add it back, that’s it.

Don’t know why you refer to nuki auth…that is only needed to activate the API, once it’s activated, and you have a token, you’re ok. In any case, you can disable and re-enable from the Nuki mobile app.

1 Like

Peter, I don’t know how else to help you, I’m sorry. Too many strange things. I should connect to your system and check myself, but now I’m leaving for vacation, so for a couple of weeks I won’t be able to help.

Joerg told me everything looked ok, but now you tell me the callback on the bridge was different respect to the LL token you configured in the secret, so I don’t know what to say. If you do everything properly, Nuki Card works.

We’ll talk when I get back. Sorry.

Well, I forget to check that, when I was on his machine. But I asked him to check this later and he deleted the callback. Maybe it will work, when he is manually creating the callback, which is what I asked Peter to do.

You have a nice holiday.

Enjoy your vacation:

image

You want to know, how it worked? :wink:

  1. I click on the Nuki Callback sensor in the section entities
  2. A card opened showing the settings of Nuki Bridge callback
  3. on the right of the card I clicked on “Verwandte”
  4. Then I clicked on the link of the “polling qeue” link and it added a callback to the bridge.

image
image

Joerg wrote me to add the Callback manually via CURL. I think I did the same within the “system”.
Thanks for your help Joerg and Ale. If you need furthewr infos that may halp you for your great job, contact me after your holidays Kind regards Peter

Congratulations!

Hi Alessandro,

Today I saw this warning in the HA log:

image

Just to let you know. I’m using v10.1.

i put 5 or 10 as a limit, if you hit that limit, something went wrong. the event that triggers the script is only the webhook.

You finally made it! :slight_smile:

The script runs everytime there’s a callback from the bridge, and it should always run when you start HA, so technically it should’ve added the callback to the bridge before. Anyway, glad you made it. I think what went wrong in your trial&error process was always the LL token, the one you configured in the secret was not the one created in HA.

Hope you’re satisfied about the Nuki Card. :slight_smile:

Thank you for you great work;-)

Sorry I wasn’t able to help solve it. But believe me, I tried my best. :slight_smile:

Hi all,

Trying to set this up however can’t get callback to work. I have an error when starting HA “Invalid config for [automation]: [id] is an invalid option for [automation]. Check: automation->id. (See ?, line ?).”

Check if there is a callback registered allready by using this following in browser:

http://YOUR_IP:8080/callback/list?token=YOUR_TOKEN

and if so, check if it’s using the same webhook LL you’re using in secrects.yaml.

The webhook is the same but there is another id also shown with url “unknown”

I removed this but it gets recreated if when the script nuki_bridge_polling_queue runs

Also you can see it states there is an “Invalid config” and the log states as I posted before

Logger: homeassistant.config
Source: config.py:437
First occurred: 15:18:18 (2 occurrences)
Last logged: 15:56:17
Invalid config for [automation]: [id] is an invalid option for [automation]. Check: automation->id. (See ?, line ?).

I would delete callback 0 and 1.

Tried that but it just recreates a new one with url “unknown”

I can’t understand why I also have the Invalid config warning. I downloaded the nuki_card_callback.yaml and copied it directly in to the packages folder, so I know it hasn’t been altered or corrupted in any way

hi everyone, I’m getting mad because “Nuki Bridge CallBack” appears “unavailable”

I’ve configured in secrets.yaml:

nuki_bridge_url: “http:// My Nuki Bridge IP:8080”
nuki_bridge_token: “Nuki Bridge token”
nuki_bridge_webhook: “long life token that I’ve generated”
nuki_ha_internal_url: “http:// My Raspberry IP:8123”

After I’ve created the packages folder and uploaded the document “nuki_card_callback.yaml” that Alex gave us on GitHub.
At the end I’ve included packages in config.yaml

What am I doing wrong? Should I modify something in the file “nuki_card_callback.yaml”??

Are you getting the same Invalid config notification that I am getting?

I’m getting this error:
TemplateError(‘JSONDecodeError: Expecting value: line 1 column 1 (char 0)’) while processing template ‘Template("{% if states(‘sensor.nuki_bridge_callback_list’) != ‘unknown’ and states(‘input_text.nuki_bridge_callback_list’)|count > 0 %} {{ ‘on’ if states(‘input_text.nuki_bridge_callback_list’)|from_json|count == 1 else ‘off’ }} {% else %} off {% endif %}")’ for attribute ‘_state’ in entity ‘binary_sensor.nuki_bridge_callback’