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

So everything is working as expected i can lock and unlock and get all the info, but the binary sensor does not get the updates via the webhook i guess.

I see this error in the logs

Logger: homeassistant.components.template
Source: components/webhook/__init__.py:36
Integration: Template (documentation, issues)
First occurred: 2:01:30 PM (1 occurrences)
Last logged: 2:01:30 PM

Error setting up trigger
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/trigger.py", line 40, in async_attach_trigger
    hass.components.webhook.async_register(
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 36, in async_register
    raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

EDIT: At some point there was an update done and it showed the status right, but this is not instant

Hello !
I “replaced” the old configuration (like v2) with this new one (I did it yesterday, so the latest version)
everything works, but from time to time, I have these errors (and all the sensors no longer work)
did I do something wrong? what can i check?
thank you very much ^^

You are having communication problems with the bridge. Check its location, check the strength of the wifi signal of the bridge.

This leads me to think you are using the same webhook for other automations. An LT token can be used only for one trigger, probably you are using it also for something else. Double-check that.

You should not have those errors in the logs.

1 Like

You were right, i had set up a webhook in nodered to debug stuff with the lack and the callbacks. All is good now

Good to know it’s working fine also for you. :slight_smile:

Hi everybody,

After I discovered the packages functionality, I was smiling because I thought: “now finally I can put all the code of the Nuki Card in one file”. :slight_smile:

Unfortunately, after moving all the code to the single package file, I found out that the Template Trigger sensor is not supported in packages. :frowning:

There is a FR here with all details, I gently ask all users of this integration to please vote for it, it would really help simplify the configuration process and help new HA users.

Thanks for your help and support.

Alessandro

1 Like

Caro Alessandro,

thank you for this great work. I have a Nuki smart lock integrated in HA but was always unhappy with the very limited features. Your solution is a huge step forward. I am not yet very experienced in the HA world but I hope to get it up and running. Sorry for this beginner’s like question: where can I get the current versions of the yaml files for the Nuki Card (is there a GitHub repo?)
By the way: I totally share your love for Italian coffee (even if the Austrian football team will lose the Euro 2020 match an Saturday :wink:
best regards
Walter from Austria

Ciao Walter,

thanks for your kind words. Right now there’s no single yaml file because I can’t make an HA package, check my previous post above yours.

If you want to use the Nuki Card component, you simply need to read the first post in this thread, there are all the instructions needed, and if you need help, write here and we will be more than glad to help you. :slight_smile:

We’ll see what happens, right now I’m happy about my team, they’re playing a good football, but you never know what happens in these later rounds, there are a lot of good teams.

Ciao,

Alessandro

Hey @alexdelprete,
Fame is at your doorstep: (39) Integrating Nuki 2.0 Smart Lock in Home Assistant (two ways) - YouTube
Congrats!

2 Likes

Happy that our team-work produced good results. :slight_smile:

I left a comment there, telling @BeardedConti that the link to our integration was not correct. :rofl:

BTW Friedrieck: did you read my previous post about creating a Package? What do you think about it? It’s a pity we can’t make a one-file configuration so that users can simply import it and restart HA. :slight_smile:

1 Like

Yes, too bad. I voted for the FR.

1 Like

Unfortunately it’s exactly the Template Trigger that is not supported in packages. Damn it.

Another thing I’d like to integrate in our integration is the opener, but I don’t have one, so I don’t know exactly what is needed to support it.

Me neither. With the Nuki API doc, I guess it is possible to progress, but you would need a tester.

I could go the easy way (like @kongo09 did) , and implement a homeassistant.update_entity of the lock entity, but that would require the official Nuki integration, and I don’t want to depend on that.

I’ll see if I can simply study the Nuki docs about the opener to understand what is required, maybe it’s not too much. I don’t even know exactly what it does, it’s a device that allows you to open automatically the gate if someone rings, if I understood correcly. Probably it won’t be so difficult to integrate…

Fixed - managed to link wrong post :slight_smile:

Thank you again for the video. I will let you know if we’ll add the opener to the integration. :slight_smile:

1 Like

I cannot help for the opener since I preferred to build my own solution based on a wifi switch (a shelly 1) in parallel of the manual switch of the intercom. Much less expensive.

1 Like

That’s the reason I can’t get it working on my setup - I have split configuration and use packages to load everything. I could actually but the would also be a workaround that I hope I can avoid. Voted for FR.

Sorry for offtopic, but since you mentioned DIY - not sure if you’ve seen this one (if you don’t speak Russian, Google Translate works very well :slight_smile: ) - DIY Zigbee version of Nuki opener… I would say most of the functionality is there: https://modkam.ru/?p=1960 also here GitHub - diyruz/Zintercom: control the matrix intercom using Zigbee
I’ll (try to) build one for test, but also ordered Opener.