Hi everybody,
I need some help. I try to use the protocol from Nuki as a trigger for flows in Homey.
I use Homey Pro, Nuki V3, Nuki Bridge and Nuki Keypad.
In Nuki-Web I see the complete protocol of Nuki actions, same info per notification to my smartphone. But I want, that this information is sent with webhooks to homey directly.
Why? Because in the protocol I can see if nuki is closed by button, key, keypad code oder keypad fingerprint. The “normal” app only knows “closed”. Thats what matters.
The webhooks in IFTTT worked, but Nuki ends the support for IFTTT. I allready manged to use webhooks with the notifications of Nuki. But it is stupid to use the smartphone for this. There must be a way to use the API of Nuki directly: Protocol from nuki send by webhook to homey. I read the documentation for API of Nuki several times but I understood nothing. Can somebody help me:
- It is possible to use the protocol of nuki for webhooks to Homey?
- How? I really need a step by step instruction for the API-Thing in Nuki
Thanks for all possible advice.
Have you asked Athom (who made the Homey app for Nuki) if they can include this information in the app directly?
Hi @robertklep yes, I did already. Several times. Only the answer to add a request for a new device. I did too, but this is not the problem. I need the informations shown in the app not a new device.
Ah wonderful 
I’ve looked at the Nuki documentation and it seems that creating webhooks with Nuki requires making API calls, which is pretty advanced and I doubt that anyone here is able to help you with that.
Also, I get the impression that using webhooks with Nuki always requires using the Nuki cloud servers, which is probably not what you want.
And lastly, I’m not sure if the webhooks contain the information that you want anyway.
Yes, I think that I need API Calls for the webhooks. An youre right, that this is too advanced for me. That’s why I am looking for help. I hope somebody have realised this already.
If the solution using the cloud, i am fine . I dont want to use my smartphone.
After a long search and discussions on the Nuki Developer Forum, I found a solution to use Nuki’s API in Homey:
-
Turn on Nuki Web in the Nuki app
-
Register/log in to Nuki Web: https://web.nuki.io/
-
Install the “Webhook” app for Homey: Webhooks App für Homey | Homey. You need this because I was unable to add one or more tags to the webhook sent by Nuki. So you get exactly one webhook, no matter what the lock does. This app can read the information in the webhook. This is not possible with the system’s own trigger “Logic → Webhook received with tag” (or I don’t check it).
-
In the app under Settings, copy the webhook URL and think of an event name and add this to the URL
-
On Nuki Web, under the menu item “API”, apply for an Advanced API. Copy the webhook URL from step 4 here. I specified “Smart Home” as the reason and the relevant website of the discussion in the Nuki forum (Help for Webhooks to Homey - #6 by poonam.chavan - Questions - Nuki Developers) as the homepage. Don’t be put off by the fact that this is actually intended for companies. It also works for end users.
-
After Nuki has set up the API (took 2 days), go to the “Nuki Advanced API Integration” tab on Nuki Web, which is now visible. Here you can adjust the webhook URL to Homey again if necessary and select which information you want from Nuki. “Device Logs” was enough for me.
-
You can test this right away. Close/Open Nuki and see if the webhook is sent successfully.
-
Go back to Homey and build a flow with the “Webhook” app (If). Now the webhook from Nuki Web arrives at Homey.
-
To trigger specific reactions, the webhook must be read. This consists of JSON. So you need another app that can read the information in the JSON. This is “Json Handler”: JSON Handler App für Homey | Homey
-
Unfortunately, I haven’t found any documentation on Nuki that tells you which action is acknowledged with which variable. To find out, simply read the sent webhooks on Nuki Web. “Name”, “action”, “source” and “state” seem particularly interesting. I can’t program JSON at all and just searched forums and tried things out. Since each variable only occurs once, “$…name” is sufficient. Flows can then be built from this, see screenshot:
2 Likes
I had to adjust the description again because the Nuki webhook could not be read clearly.
For example, searching for the text “Nuki” resulted in two possible reactions. The text appeared in the same way when an incorrect fingerprint was entered on the keypad and when the keypad was closed. You therefore have to deal with the JSON and define the variables clearly, then it works.