[APP][Pro] Nuki Direct

This is in my regard the best possibility. There are usecases were opening your door from Homey is usefull. Removing it from the standard options in the UI is a good choice. If the flowcard remains people with a usecase can still build whatever they need by using this card with things like a virtual button.

Come to think about it, I use it for a party mode. When we have a party the door opens when people ring my doorbell. Could also be used when the kids are palying in front of the house. Like a modern touwtje door de brievenbus.

Hello @ChrisBoer,
Thank you very much for your collaboration.
Unfortunately at the moment you have only two ways for updating Nuki Direct in your Homey.

  1. Manual installation side-loading the code downloaded from GitHub with a CLI command. I updated the code on GitHub last evening. In this way you can test the updated app right now.
  2. To wait for a new release published on the Homey Community Store. For you this is the most comfortable and easiest way for updating the app on your Homey but it does not allow you to test the app upfront.

Last evening, I introduced provisionally a new capability “alarm_battery_keypad” for Smart Lock and Opener. The pros are:

  • Keypad battery alarm properly shown in Homey app UI.
  • Ability to create two trigger flow card (“The keypad battery alarm turned on”, “The keypad battery alarm turned off”) and a condition flow card (“The battery alarm is on|off”) that resemble the standard battery alarm of a device.

The cons are:

  • The keypad battery does not appear in the “Energy” page of the Homey app.
  • The keypad battery type cannot be specified within Homey.

I will send you a new version of Nuki Direct app with the new capability within two days.

Thank you for your collaboration

Wow, your fast. :slight_smile:

Sounds like a good implementation to me. Energy and battery type dont seem to relevant to me for the keypad. I’ll await the version to test with.

Hi Piero_F, I will do a manual installation of your GitHub and will do a client install tonight…

I will test the functionality and will update you on the test outcome.

I have tested 3.0.3 the open action flow works but locking the door and then opening the door gives a timeout.

Also locking goes ok but unlocking without opening in the action flow gives issues.

Also locking and then open via action flow gives timeout issue and device becomes unavailable.

Hello @ChrisBoer ,
Thank you for your tests.
About the issues you reported: every action you execute with Nuki Direct is performed as a HTTP transaction from Homey to the Bridge. Two consecutive and close-in-time actions may generate “overlapped” HTTP transactions (i.e. the second transaction begins before the response to first transaction is received) but Nuki Bridge does not support overlapped transactions.

Could this be the issue#1 and the issue#3 you experienced? (it is similar to quickly tapping twice the Lock/Unlock button in the UI of Homey smartphone app).

Anyway, by fixing the bug I introduced in version v3.0.3 (brief explanation: I did some code clean-up but I “cleaned too much”) the app behaves exactly like all previous versions.
In the future I will improve the code that performs the HTTP transactions in order to serialize the HTTP transactions towards the same Bridge; this will mitigate this kind of problem.

Unfortunately I was not able to reproduce the issue#2 (“unlocking without opening in the action flow gives issues”).

I only use action flow but maybe you can put in a timeout between your HTTP transactions, you should be able to time these.

When I worked with the first NUKI app from Jorden I also incorporated a timeout which solved the issue.

setTimeout(polling(1), 30000);

I don’t know how this is done now as I have not looked in the code yet.

Thank you @ChrisBoer. I will improve the HTTP transaction mechanism (by serializing the transactions or by timing the transactions, as you propose).Since the developement requires some effort, at the moment I can’t say when it will be ready.
I noticed that also the Nuki app by Athom has a similar unwanted behavior…

Hello @ChrisBoer and @2Be ,
I made an attempt to reintroduce the ability to unlatch a Smart Lock (or an Opener) directly from the Homey app user interface.
This capability is optional and can be disabled in the “Advanced Settings” of the device.


When the setting is enabled, Nuki Direct shows a slider (to be swiped up) in order to reduce the chance of a wrong tap.

The code of the the app avoid overlapped actions on the slider.
I committed the code to the “master” branch of the GitHub repository.

Hello @Phuturist,
I committed the code with the Keypad battery alarm to the “master” branch of the GitHub repository. It took a little longer, because I added to Nuki Direct the ability to optionally open (unlatch) the lock directly from the user interface of Homey app.

I don’t use the Nuki Device to unlatch, I only use flow actions with the door to build in more security to not accidentally open the door.

Thanx, turns out I need to request beta access for the Nuki keypad seperatly. I have requested access now but will have to wait until the beta firmware for the keypad is available to me. Will keep you posted.

Tested and works fine. Just needs 30 minutes before the first polling takes place until the capability is added but you are probably aware of that. Might raise questions from other users though.

Hello @Phuturist,
Thank you for your test. The capability is added or removed dinamically depending on the content of the /list request or the content of the first notification. With a /list request sent every 300 seconds, I would expect the capability to be added within 5 minutes after starting the app…
I will investigate. Anyway, as a general improvement, in the future the app will send its first /list request just after the startup rather than after 300 seconds. This will ensure Nuki Direct knows the state of the devices right away.

Hi @Piero_F, this is the first time I want to install Nuki Direct.
The Bridge HTTP API is enabled. I have tried both options (automatic installation/manual installation). I entered the token correctly (copy/past) but I always get the following error message. What can be the reason?

X Error: request to http://192.168.178.39:8080/info? token=XXXX failed, reason: connect EHOSTUNREACH 192.168.178.39:8080

Hello @DirkG,
From the error message, it seems that the IP address (192.168.178.39) or and/or the port (8080) are not those of the Nuki Bridge…
You can easily verify the correctness of IP and port by entering your URL on a browser of a PC in the same local network.
Your URL is:
http://192.168.178.39:8080/info?token=XXXX
The expected response is a string that represents a JSON object whose first chars look like the following:
{"bridgeType": 1, "ids": {"hardwareId": ...
Please, let me know the outcome of the test. Thank you

Hi @Piero_F,
this works, all information about the devices are shown.

So I tried again to install the Nuki Smart Lock and the Opener. This time it worked after a few tries.
It seems that it depends a lot on when you start the pairing in the app and at the Nuki Bridge.

Thanks! :+1:t3:

Hello @Piero_F,
what does it mean that the Opener is locked (Verriegelt)? And what triggers this action? I currently have no flow where the opener is used.
The action “Opener locked” (Verriegelt) is only shown in Homey and not in the Nuki App?

Hello @DirkG,

An Opener is locked if Continuous mode (auf Deutsch: Dauermodus) is deactivated and the state of the Opener is online. If Continuous mode is active and/or the state is Ring to Open, the Opener becomes unlocked.

Continuous mode and Opener state may be changed in several ways, not necessarily by a flow card action.

The “lock/unlock” paradigm is a Homey model for all lock-class devices whereas Nuki has specific states and actions for its Opener. They cannot match perfectly…