[BETA] Nuki Smart Lock 2.0/3.0/4.0

Hi users of Nuki Smart Lock 2.0/3.0/4.0 (as of 2024-05-05) !

As suggested by @ogiewon (thanks !), I'm submitting the BETA versions of my app & drivers for Nuki Smart Lock 2.0/3.0/4.0 in a new post.

All the documentation (so far ...) and the Integration app & drivers can be found here: GitHub - Nuki Smart Lock for Hubitat Elevation (BETA), where you will also find information about what they do, how they work and how to install them.

For now (BETA version 0.9.0), the following Nuki products are supported:

  • Nuki Bridge
  • Nuki Smart Lock 2.0
  • Nuki Smart Lock 3.0
  • Nuki Smart Lock 4.0
  • Nuki Opener (ok, I know, it's not ready yet ...)

This is my first contact with Hubitat Elevation development platform and I hope these app & drivers become useful for the community.

Looking forward for comments, suggestions, bug reports (not many, I hope ...) and so on.

Marco Felicio (maffpt)

Version history

  • Version 0.1 - 2020-05-13
    BETA Version initial release

  • Version 0.1.1 - 2020-05-15
    Bug correction: when a device driver is not installed at the HE hub, an exception is detected but was handled in a way that made impossible to finish the installation correctly

  • Version 0.2.0 - 2020-05-29
    Added basic support for Nuki Opener

  • Version 0.2.1 - 2020-05-30
    Added support for Nuki Opener
    Debug logging option now set at the app and affects the app and all drivers

  • Version 0.3.0 - 2020-05-30
    Added the option to unlatch the door when the unlock command is sent

  • Version 0.3.1 - 2020-05-30
    Minor tweaks

  • Version 0.3.2 - 2020-06-06
    Updated support for Nuki Opener (open and close should work now ...)

  • Version 0.3.3 - 2020-06-15
    Bug correction: ping command at Bridge driver now works again

  • Version 0.4.0 - 2020-06-17
    New feature: support for Nuki Bridge BETA firmware 2.6.0, where the door status (open, closed) is reported back when the Nuki door sensor is installed - It allows HE users to execute actions based on when the door is opened/closed (using the "Contact" capability)

    Note: the Lock's driver will act accordingly with the user's Bridge firmware version: if 2.6.0 or later is installed, it will report door open/close events and only if the door sensor is installed and properly configured; if the Bridge version is prior to 2.6.0, the door sensor will just be ignored.

  • version 0.5.0 (2020-07-06)
    New feature: creation of the Ignores LOCK command when the door is open/ajar option - when set, this option prevents the execution of a LOCK or LOCN N' GO command if the door is either open or ajar.

    Note: This option is effective only with Bridge firmware 2.6.0 or higher and will be ignored with prior versions.

  • version 0.5.2 (2020-09-25)
    Code reorganisation to make its version easier to spot.

  • versions 06.0 & 0.6.1 (2020-12-29)
    Minor updates to address the no detection of when the Nuki Bridge was not configured for HTTP API access and improvements at the UI to better report when occasional errors were found.

  • version 0.6.2 (2021-01-04)
    Bug correction at the HTTP API enabled detection code.

  • version 0.6.4 (2021-11-14)
    Bug correction at Bridge Firmware version support to the door sensor.

  • version 0.8.0 (2022-07-09) - yeah, I forgot to register versions 0.7.0, 0.7.1 and 0.7,2 - sorry
    Added support for the Nuki Lock 3.0

  • version 0.8.1 (2022-07-09)
    Corrected wrong driver name at app - Thanks @amithalp !!!

  • version 0.8.2 (2022-08-13)
    Tiny optimisations

  • version 0.8.3 (2022-12-14)
    Using Bridge IP as DNI - NOTE ****** Now it's MANDATORY to use static IP address on the bridge!

  • version 0.8.4 (2023-04-08)
    Smart lock driver now correctly detects and handles absense of the nuki door sensor

  • version 0.8.5 (2023-06-04)
    Created the [reboot] command

  • version 0.9.0 (2024-05-05)
    Renaming of app & drivers to reflect support of Nuki Lock versions 2.0/3.0/4.0

12 Likes

Well done! Thank you.
I have installed the App and Drivers. I have tested the buttons on the device. Works perfectly.

I will be moving my Rules from IFTTT later today!

This is great news @pietsnot!

I’ve started the tests of how it works with Alexa voice control - so far ao good. So, if it works with Alexa it should work with RM. However, the recognized events so far are “locked” and “unlocked” - and everything in between.

Please keep me up to date with how it goes and be absolutely free to make suggestions and critics, either on the app/drivers or documentation.

Thank you again for using it.

Marco

Hi Marco,

I have installed the App and Drivers.

First thing that I definitely had to do was restart (unplug and plug back the bridge to get it to be found. You might want also make a note that BEFORE you select "Install selected bridges" Tab the light on the Bridge should be OFF and that it will permanently light up the moment that the "Install selected bridges" Tab is pressed and that is when you need to briefly press the button on the bridge.

When I did that it told me that it had found:

Nuki bridge 'Nuki Bridge (137649906)' successfully installed
Paired devices:

  • Nuki Opener 'HAUSTÜR' sucessfully installed
  • Nuki Smart Lock 2.0 'WOHNUNGSTÜR' sucessfully installed (typo in there btw:))

however I do not see a device named "WOHNUNGSTÜR" in my devices. I realised that I had already created a virtual lock named "Wohnungstür" so I deleted all the flukes and device using the same name and tried again. Still no device named "WOHNUNGSTÜR" is created even if I delete the device "Nuki Bridge" first.

Any ideas?

Chears,
Marcus

Oh one important thing to add....

Nuki pushed a firmware update to v. 1.9.3 this morn ing which I have installed. The http commands (LOCK, UNLOCK, UNLATCH) still work fine as they did with the older FW. but seeing as we have the lock working with your App and Driver in Holland, maybe that is the difference

Have a look under "N" - mine appear as Nuki Bridge, with my 'WOHNUNGSTÜR' under that...

Great!

Was the bridge with any LED lit up or blinking when you´ve executed the app? If I´m not wrong, I think that there´s a way of detecting it. I´ll check.

Good point. I´ll do that. And see if I can warn the user that the bridge is not responsive too.

Well, it should not install the Opener .. currently there´s no driver ready yet. I´ll take a look at that.

Oops ... will correct it. Thanks for reporting it !

Not even as a Nuki bridge´s child device?

I need to document it better - all devices paired to a bridge are created as childs devices of it.

I know that usually this is not the way things are done regarding parent/child devices. However, since the device does not work without bridge for automation´s sake, I´ve decided to take that path. This way I´m able make clear the relationship between the bridge and its paired devices, share code between childs/parent and make it easier to remove (delete) a bridge and paired devices. Since it does not affect the overall use of the devices, I´ll keep it that way.

I´ll see what I can do to avoid this problem (creating a device with a name already in use).

Please remove the bridge and start over. And look at the child devices of the bridge if it shows there.

I´ll upgrade my bridge later today, as a matter of fact all the other points too - I´m working now and I have twelve hours of shift ahead of me ...

That´s how it should look like.

Latter today or probably by tomorrow morning (GMT -3:00) I´ll have news.

Thank you all for your help !

Marco

No.... nothing under the Nuki Bridge as child device or anywhere else in the devices.

I have....

1, Deleted the Bridge and retried installation...
2. Even changed the names in Nuki App to HAUSTUER and WOHNUNGSTUER (eliminated the Ü) did not help.
Deleted the App and both drivers and reinstalled, Always shows that WOHNUNGSTUER and HAUSTUER are found and installed but I do not seeing either of them (LOCK or OPENER) as a device

@pietsnot is your Lock FW updated to the 1.9.3? You only have a Lock and no Opener right?

@maffpt Maybe you should just search for DeviceType:0 until you have a driver for the Opener. Maybe that is causing the problem?

Also do I need to enable OAUTH when installing the App?

Kind regards,
Marcus

Strange ...

Please enable the debug logging option at the Integration app, select the log option at the HE and run the app in a different browser tab. Then send me the log.

After that, use the ultimate debugging tool: power cicle your HE and try again. But please collect the log first. I need to see what´s going on inside the app/drivers to identify the point where I can at least detect the problem an act accordingly.

I really don´t know ... let´s check the code and also see what the debug log shows. It should not install the Opener at all.

No, it´s not necessary. The Integration app connects to Nuki´s servers to discover all bridges installed on your network then talks to them with no need for OAUTH.

Marco

I don't know if I'm looking in the correct place, but in the app it says my firmware version is 2.6.6 :thinking:

No, I do not have an opener.

Apple or Android App?

The firmware ic shown in the (iOS App) under Administration see screenshot

underneath you can update the fw too, if your feeling like a challenge:)

I've updated about three weeks ago. FW is 2.6.6. Android App.

I've checked now and FW 2.7.20 is available now :grin:

Could be an OS thing, or a language thing... I'm a bit scared to update the firmware now :slight_smile: Scared that the Hubitat connection will be lost...

EDIT: Okay, I've upgraded to 2.7.20 - still works... The Nuki Bridge in Hubitat still shows the smartlock as 2.6.6 - I'll check if it changed by tomorrow.

Do you have an email for the log... its BIG and it will take me all day to delete the IDs and Tokens etc so I can post it here...

Interesting that they have totally different FW for iOS and Android....

Glad it still works for you..... :slight_smile:

1 Like

Sure: maffpt@gmail.com

Isn´t different smartphone app for Android and iOS? The firmware (FW) for the Bridge, once updated, should be the same, regardless the platform, iOS or Android. And the firmware for the lock itself is another thing.

So, resuming, we have smartphone app version, that can be different betwenn iOS and Android, and the firmware (FW) for the bridge, the lock and, possibly, the Opener.

@MarcusD, please don´t lose your faith! :smile:

Marco

No worries just sent you the log files.....

FYI here are my iOS Nuki Software Phone App versions:
Bridge: 1.15.1
Lock: 1.93
Opener: 1.4.3

I am sure we will figure this out.... I hope I sent the right log files... I uninstalled and tried using Chrome as a browser.... No difference......

Your PM remark has called my attention regarding the handling of Nuki bridge´s token. Currently I hadle it as a plain text, but there´s another way of handling it that is using a hashed token - it would add an extra security.

Yes, you sent the proper log. Now I need to check some debug data that I´m kind of thinking that is missing - nothing wrong with the logs you sent, probably some error that I mishandled. Will check it later tonight.

Thanks.

@MarcusD,

I knew that something was missing in the logs: you've filtered the log entries to select only those related to the Integration app and doing so you left out the log entries related to the drivers installation.

Let me explain to you how the whole installation process works (in generic terms):

a) The Integration app detects all bridges installed on your LAN and every Nuki device paired to each bridge found

b) The Integration app proceeds to install each detected bridge

c) When a bridge is installed, the very own bridge driver takes care of all the tasks necessary to fully install the bridge

d) The bridge driver then proceed to, for each paired device to the bridge being installed:

d.1) Install the paired device

d.2) When a device is installed, the driver for the paired device takes care of all the tasks necessary to fully install that device

As you can see, the Integration app starts the installation of a bridge and that bridge, during it’s installation, starts the installation of all paired devices to that bridge and, doing so, the specific driver for that device completes the installation of that particular device - it’s a cascading process. Doing that way I could isolate the installation tasks details inside each component.

So, please clean up all devices that you may have installed previously, select again a new log session on HE then, in another browser tab, run the Integration app again. And send to my email the resulting log, not filtering it.

While you do that, I'l start the development of the driver for the Opener - since it's the only difference in your environment from @pietsnot, I'm confident that's the reason for the problems, since the installation of the Opener failed for sure and a message was generated telling that the driver was not installed. Also, my code failed miserably by not properly handling that, and not reporting the error on the last page of the Installation app.

Nonetheless, I need that full debug log to be sure.

Thank you for your help.

Marco

OK.... I understand, Sorry for the filtering of the logs, thought that would make it easier for you...

All don, logs just sent

Thanks,
Marcus

@MarcusD, I can't find your e-mail with the full logs. Would you please send them again ?

Thanks

Marco