I’m not a python developer, and not a HA expert, otherwise I would’ve already done it.
I made only one HACS component, for ABB inverters, but I basically modified an existing component, rewriting 80% of the code.
Anyway, it’s in the bucket list, but since there’s a package version now, and the configuration only requires 3-4 secrets, it’s not high-priority. Furthermore, the official integration should be out sooner or later, and I hope they will include at least the callbacks for door/lock. I don’t think they will include all system’s sensors unfortunately.
curl is necessary to configure the bridge for the callback. but I could automate that too, I’m thinking about it, so users don’t have to do it manually.
Ok, I’ll see if I can clarify better the difference between the Nuki token and HA long-term token. Thanks.
UPDATE: I updated the first steps and added a note explaining the difference among the two tokens.
Hi @alexdelprete
Thanks for the great integration and well explained how to…
I followed your steps and got it working in minutes!
only issue I’m having now is a 1-2 minutes delay for every state change
I’m guessing it might be related to the fact I’m using “DuckDns” and it means my HA uses https protocol for that reason.
on the other hand all entities do work and I get all the correct info, so the Nuki Bridge does send it somehow right?
If you have any idea of what could cause this kind of delay, and of course any suggestions to resolve it…
Thanks again,
Adi.
First of all you need to make sure you have configured the callback on the bridge with the long-term token generated in HA. Then you need to be sure you are not looking at the official integration sensor, like it happened to some users. Did you follow the installation steps and verify each one of them before moving to the next? Start from there.
I’m pretty sure the problem you are facing is a simple one, you just need to focus on each step at a time, in the end you’ll have the expected result.
Is there any alternative to get the callback if your HA is only accesible via https? How can i enable HA to also be accessible localy by http and from outside the network via https?
if it is ONLY accessible through https, since the bridge only supports http, you can’t use the callback.
You need to use NGINX Home Assistant SSL proxy: “typically used to forward SSL internet traffic while allowing unencrypted local traffic to/from a Home Assistant instance.”
This is off-topic for this thread, but you will find a lot of threads in the forum regarding this configuration. Check this post, as an example.
It’s there since the beginning: " Please remember that the callback can be done by the Nuki Bridge only via HTTP. Unfortunately HTTPS is not supported."
If I do that, we’ll have to also support NGINX configuration in this thread. It’s up to the users understanding what’s required to support http only. I don’t want the thread to become too chaotic.
It’s up to the users understanding what’s required to support http only.
Many users with https access will stop to read this integration without to know there is a workaround. It’s a pity.
Others as mefistofelis will ask about that and someone will answer them, you cannot control that. Anyway, almost all users without https access will read only the first post, not the full thread. So I fail to understand why that could add chaos to this thread
If I do that, we’ll have to also support NGINX configuration in this thread.
I don’t see why. Furthermore if it’s not you it could be someone else.
Well, since Italy team has beaten our best enemy (I’m french), do as you see fit
I think a user who decides to implement NGINX for https access has the skills to understand that it’s possible to implement https only from the internet while leaving http access from LAN/WLAN.
I don’t want to control, but I also don’t want to encourage too many discussions on things that are not relevant to the integration.
the point is not who does it, but the potential confusion in the thread, that would discourage people from reading info regarding the integration.
I would do what I think is appropriate even if France won the tournament.
In any case, I added your note to the first post. Let’s see what happens…
No, you can have https access without NGINX. In my case I installed NGINX only to get callback working. I was not aware of such a solution until I discovered it by myself. And it is not only a matter of skills (I followed a guide to install https access), you still need to be aware that a solution exist.
About confusion in the thread, I think that is a false problem : at the opposite of a “classic” thread, almost everybody will read only your initial post and, in case of problem (or to thank you), will skip all posts to add theirs.
I would do what I think is appropriate even if France won the tournament.
It was a joke, of course
In any case, I added your note to the first post.
A big thank for the people who will not lose the opportunity to use your nice work because ignoring the workaround.
PS. By the way, are there really a lot of people using Nuki lock through HA without https access ? I mean, do they limit themselves to control the lock only when they are connected to their local network or, worst, outside but through http access ? It seems to me that this question is a big point to use this integration since many people want to be able to control the lock outside home.
I have started to create a package that will automatically register the callback url. For now I’m able to check if the callback url is resgisterd. In the package code the only thing you have to set is the internal ip address and port of your HA installation. In the upcoming days I will see if I can register the callback url at the NUKI.
you won’t believe it, but I spent the whole night (last night) to implement the autoconfiguration of the bridge. I’m testing some things before releasing it. I thought it would have taken 3-4 hours, instead it was harder than I thought, mainly because of some missing functionalities in REST commands (the response), so I had to find several workarounds unfortunately, but it’s working pretty good.
There’s one thing that’s bothering me: I needed to know the HA url, to pass it to the bridge, and I was convinced that the internal_url value in config.yaml was available through some system sensor/variable, instead it seems it’s not easy to access HA config items via templates/automations/yaml. They are available through HA API, externally.
I will share it as soon as I’m confident enough on the quality, thanks for your post, I appreciate it.
Hi again,
So the problem was the DuckDns after all, My HA was accesible only through HTTPS…, I added the NGINX add-on as you advised @mefistofelis to do.
Good news is the Nuki Card works perfect now!
The bad news is that the “emulated hue” integration probably went wrong because nothing works with Alexa anymore
I know its off this topic but I’ll apecciate any thought…