[BETA] Nuki Smart Lock 2.0 & 3.0

OK... finally found time to uninstall the app and drivers and reinstalled via Hubitat Package Manager.

The good news I have everything re-installed and when I click on Update in HPM I am no longer told that there is an update available. I checked, the app and all the drivers are 0.5.0.

btw.. It would be nice if the current version of the driver would be shown on the very top in BOLD TEXT of the driver file, so you can quickly find it. For example the line showing the driver version of the Nuki Lock 2.0 is in line 144, out took be a while to find it when I was checking on my small iPhone screen :slight_smile:

The not so good news... at least for me, I am still not seeing the status being changed to "Locked OR "Unlocked" when I lock or unlock the door, regardless if I do it within Hubitat or via the Nuki App. I still habe to click on "status" within the Nuki Lock driver to get the dashboard status updated. Without this happening automatically the the whole integration has no value for me (as far as the lock goes) as I cannot use the lock status for automation like turning HSM on and off or changing the mode when the door is locked or unlocked.

Kind regards,
Marcus

Hi @MarcusD !

Welcome back!

Are you seeing/checking the "Lock" attribute? It's this attribute that represents the status of the lock.

In my configuration, I have a rule that when the "lock" attribute changes, I send myself a message, and it works fine.

About your comment about the version field in the code, before next week I´l change it. I've recently moved from my apartment and my setup still is a mess.

Again, welcome back!

Marco

Marco, Thank you for the welcome back (I hope you don't regret seeing me back with my issues:))

Yes sure I am using the Lock attribute on the Dashboard. Like I said it works well, as in I can lock and unlock the door via the dashboard button without any issues. Just after any lock or unlock the correct status of the lock is not updated (shown) so I cannot use that status within HE to force further automations.

I followed you advice and wrote a RM rule that now checks every time the lock attribute is changed during the locking/unlocking process and when the status is NOT either locked or unlocked pushes a status update (after waiting 20s) that forces the correct status to be updates in the driver/dashboard (see below)

That solves the issues when using the button on the dashboard but not when somebody manually uses the button on the look OR uses the NUKI APP to either manually or automatically open the Doors when arriving home (which I am sure is how most have the Nuki lock installed)

To solve this (hold your breath) I have creating a virtual switch in Hubitat that I made available via IFTTT and created two IFTTT rules that both also push a status update of the lock whenever it is lock or unlocked manually or automatically when the lock button is pressed or via the NUKI APP.

I hate using IFTTT for obvious reasons as it defeats the whole purpose of HE and local control, but suprisinglz the new IFTTT Pro is really fast and seems to be very reliable unlike my earlier experiences when using it.

So, I kind of have a solution, but was of course expecting to be able to control AND see the correct status of the NUKI lock at all times, without using external sources and extra rules etc.

Kind regards,
Marcus

Hi @MarcusD !

I hope I won't regret too .... :rofl:

Kidding ...

Marcus, the whole point of having users testing is the valuable feedback they provide. Please, keep being the pain in the @ss that you have been! Kidding again ! :rofl: :rofl: :rofl:

There is a noticeable delay between the command execution (meaning, the lock operating and finishing the lock/unlock operation) and the moment the hub is notified. I don't recall right now how long, but it happens. And the "lock" attribute is updated only after the physical lock reports back - so it takes sometime.

I'm using a beta version of the bridge/lock that this delay is somewhat smaller.

I've changed my RM rule that worked with the door status change and I need to reinstall the lock to rebuild the rule. But I have one that reports every time the door is opened/closed and it is working fine:

Of course, it takes some time to report too, but not as long as the lock/unlock operation.

This weekend I'll be tied to my regular work - work in shift sucks ... - but Monday I intend to reinstall the lock and check your comments.

Only one comment about this: I need to work hard to get you back to local processing ASAP !!!

So, I kind of have a solution, but was of course expecting to be able to control AND see the correct status of the NUKI lock at all times, without using external sources and extra rules etc.

Please, don't loose hope! We'll get there!

Best,

Marco

Hi @MarcusD !

You may have noticed that I did the code change you've suggested - now the version of the codes can be seen right at the beginning of the code. The funny thing is that all that code was there because I didn't know that I could put it at any place within the source file and I saw, few days ago, a code sample with it at the end ... so, nothing happens by chance! It's overall clear now.

I've reinstalled my lock from the beginning and I did some tests.

Be back with more information soon.

Best

Marco

Hi Marco,

yes I saw that 2 days ago and updated the Lock App immediately.... Thanks for now showing the version info on the first page, I’m sure this will help people when troubleshooting ans quickly be able to identify what version they are currently using. Saw no change in functionality, still have to push the “status” of the lock driver via RM to get the updated correct state of the lock to show when locking or unlocking the door via HE. :frowning:

Kind regards,
Marcus

Hi Marcus,

This is how it is working here:

Dashboard tile transition - video

a) The video starts with the lock unlocked, the tile with green background, with the text "unlocked" located under the "unlocked padlock" icon;

b) When the tile is clicked (and the operation confirmed), the background color changes for black and the text under the "hourglass" icon changes to "sending";

c) Less than 2 seconds later, the icon changes for a "circled question mark" and the text under it to "locking" - note that this text is provided by my driver, but so far I had no success in defining a meaningful icon for it (choose an icon);

d) After approximately 14/15 seconds, the tile background color changes to green, the icon to a "locked padlock" and the text under it to "unlocked".

e) During the transition, my phone received the messages generated from the following rule at RM:

The trigger event is based on the capability "lock" and the device from where the event will be expected is "Porta" (door in Portuguese).

Also, I had to make some adjustments at the Dashboard templates definitions:

a) Here I've configured the icon and background color of the tile when the door is locked

b) And here when the door is unlocked:

As I said before, so far I could not find a solution to select the tile background color and icon. The lack of documentation at HE is really tiresome - you need to check dozens of topics and code files to identify what you have to do to accomplish what you want. I won't give up, but I think that a proper documentation is in dire need here.

As you stated before, it is not working as I've shown here. Could you provide me a screen recording of what's happening? But without you RM rule forcing the update, please.

Marco

Hi Marco,

thanks for the video and the info on how to change the dashboard colours when the lock is locke d or unlocked. That works well!

I have uploaded a video of what happens when I lock the button in HE. I have checked app and drivers are all 0.5.2. When I pause my "status" rule the lock status does not change to unlocked or locked. I installed you rule to push the lock status to pushover and show on my phone. You can see these notifications as well as the Nuki app notifications showing that the process is executed correctly. If I unpause my status rule it works but not without.

In addition this only handles the locking of the door within HE, How do we get the status updated when the lock is opened or closed manually with the lock button or key, or by the NUKI App, without using IFTTT as I am right now,

Kind regards,
Marcus

https://www.dropbox.com/sh/5ls63jibsgn469l/AACqa_gVvjEdXGvktgpH7WD1a?dl=0

Hi Marcus,

Everything seems to be ok, but I can't understand why the tile behaviour is different.

Have you created the tile again after the installation of 0.5.2? Just trying to find something different ...

Marco

Yes.... many many times....: :man_shrugging:t4:

And the firmware versions of Lock and Bridge? Please give me them. Still trying to find something ...

EDIT: HE firmware version too !

Hi Marco,

Lock 1.10.3
Bridge 1.17.1
HE 2.2.3.148

I‘m sure we are both using the latest versions I am using the HE and Nuki beta versions of the app, but I only signed up for the betas AFTER this issue with the lock thinking that you as a developer might be running those versions:) So I’m pretty sure that’s not the issue🤷🏽‍♂️

Hope all is well,
Marcue

@MarcusD,

Is your lock the version 1.0 or 2.0? Mine is 2.0 and the firmware beta version that I have here is 2.9.0.

And the Bridge - I’m not at home to check it - I’m pretty sure it is not the same as yours.

Oh ■■■■... Never thought about that... That could be it I supported theres guys on Kickstarter mine is definitely a 1.0 lock version for sure!

Don’t worry !

I’ll check the lock 1.0 and see if I can identify what’s going on.

Probably I’ll need a lot of debug logs, but let me prepare myself first to identify the differences to narrow the place where to look at.

Be back to you soon.

Meanwhile I have reached out to Nuki and asked them to give a helping hand to one of their very first customers and crowdfunding backers. I asked they what I am trying to get working and mentioned you are working on a integration into the Hubitat system that works with the 2,0 version but not 100% with the 1.0 lock version.

Who knows, maybe they will offer to exchange the lock🤷🏽‍♂️

Happy Sunday,
Marcus

1 Like

Worth the try ... :smiley:

Hi to all!

First of all say that I’m a total newbie in HE. I’ve just received my HE yesterday and this is actually my first post. Hope there will be much others!

I have a Nuki Smart Lock and I have linked it to HE without any problem. Thank you for your great work. Now I’m triying to set my first rules. My idea was the following: when Nuki makes an autounlock, turn on the light behind the door.

The problem is that I don’t see the option of setting “autounlock” as a trigger. Is it possible? I have set the trigger “when the door is open”, and the rule works, but in this way it also turns on the light when I am leaving, and I would like it only donit when I am arriving (that’s why I would like to use autounlock).

Sorry about my english and sorry also if I am asking a stupid thing.

Kind regards from Spain,

Carlos

Hi @CarlosE!

Welcome to our community! You'll find here a bunch of people really helpful.

Thank you for your comments :smile:

Sorry, but Nuki's API doesn't offer this kind of feedback.

What I could suggest to you is to use a presence sensor and work with both triggers in tandem:

a) Nuki "opened" event occurs

b) Test if the presence sensor was not triggered in the last 1 minute (or 30 seconds or whatever - you'll need to adjust it for your convenience)

c) If (b) is true

d) Turn the lights on for some time

However, you must take into consideration that:

a) The Nuki Bridge take some time to trigger the "opened" event - when I say some time I mean 1 to 2 seconds, tipically

b) The presence sensor must be installed in such a way that it is not triggered when someone pass near the door (inside your home)

I know that the cost of a presence sensor adds up to the solution, but it could also be used as a security resource - if the sensor is triggered without the door being opened, I mean, without using the smart lock, it could mean that someone has forced the entry at your home - through the door, of course ... :sweat_smile:

I'm Brazilian - not a native english speaker too, so, I think that the important thing is to make people understand what you mean, and you did it!

And there is no thing as a stupid question ... imagine if Einstein didn't asked himself if he could develop a General Relativity Theory? Our world would be quite different nowadays !!!

Kind regards from Brazil - for now, at least. When this nasty pandemic is over, it would be "Kind regards from Portugal" !

Marco

Hi Marco!

Thank you very much for your answer and for your warm welcome.

I think I will try your option with the presence sensor. Im sure I would give it more uses, and it is an affordable cost.

Regards,

Carlos

1 Like