NEW BINDING creation support Request - NUKI SMART LOCK

Shame on me :frowning:

I think it should be, but it wasn´t. Now it works great. Thanks Max.

In which interval is your method asked for the bridge? With the Rule Method there is a interval from 1 Minute.

Kay

i update every 30 seconds, however think of changing that to a longer period and also use the webhooks which are described somewhere - that way the lock sends any changes in status directly to openhab, and for battery/RFFI status as well as “doublecheck” 5 min should be ok. reason is I’m pushing tons of updates to openhab using http for other stuff, i guess someday my network will be congested or openhab cant cope with it anymore :slight_smile:

How do you set the 30 seconds interval with the item ?

And the Nuki Webhook aka Callback doesn´t work at the moment because the type of json and not plain text. I read this in another thread.

Yes - but if you use my nuki-proxy python script (linked here) you can use the callback URLs with openHAB. I have been using this for a few months and now that the bridge firmware has had a few bugs ironed out, it is working very very well.

1 Like

I tried it. It works, but i got problems with it running in background. So i think for me it is better to use my Method.

Kay

Fair enough - for anyone else interested I would recommend supervisor for running these sorts of little scripts/processes. Very easy to install/setup and monitor.

Maybe i give supervisor another chance :slight_smile:

:30000:

this part of the item definition means it is supposed to be updated every 30.000 ms :slight_smile:

1 Like

Awesome :slight_smile:

Thanks.

Kay

Does anyone have a how-to for Nuki with webhook so that a Nuki event could even trigger other actions?
I currently have implemented the Setup from Max w/o the Widget and have Nuki connected to Amazon Alexa with an echo dot and hue emulation (limited to locking the door at night when I tell Alexa to switch off home (all lights, plugs, sonos and now also ensuring that the door is locked with just one spoken command).

BR

Uwe

1 Like

I would like to see the same - maybe @ben_jones12 can help here?

Have you seen this? Run this simple python script, with the appropriate settings for your openHAB server, and add the proxy URL to the list of callbacks in your bridge.

E.g. http://nuki-bridge:8080/callback/add?token=xxxxxx?url=http://nuki-proxy:9090

Then you should start seeing openHAB get updates whenever the lock changes state.

Hi @ben_jones12,

yes I’ve seen and tried it. Unfortunately, it did not send requests to openHAB, or openHAB did not like them. I have the feeling this is due to my username and password (I used the ones from myopenhab). Are username and password needed when I run the proxy and openHAB on the same system?

Thanks a lot!

Edit: This is what I see in nukiproxy when I lock nuki:

ip-of-nuki-bridge - - [25/Feb/2017 22:19:23] “POST / HTTP/1.0” 200 0

You need to delete the comments to the right of the items in the .ini file, i.e:
OPENHAB_ITEM_LOCKED = VT_Lock_Locked # ContactItem

needs to be:
OPENHAB_ITEM_LOCKED = VT_Lock_Locked
Make sure to delete any spaces to the right of your item name.

1 Like

Anybody knows the Homematic Door Lock too?

Is there a big difference between this and the NUKI?

Is the NUKI better?

I have both. The underlying system is the same: it’s simply a keyturner. This means you need a cylinder with “emergency function” and the cylinder must be a “Euro Profile Double Cylinder”. That’s all similarity.
The homematic keymatic either uses a keypad to open and close or the Homematic CCU and feels a bit more like plastic in comparison with the Nuki smart lock. The Nuki can natively be opened/closed via secure Bluetooth Connection to your mobile. You could add a Nuki Bridge so you can remote control your Nuki Smartlock via the App even if you’re not at home.

openHAB Integration: the Nuki Bridge and the CCU can be controlled via an API. So you can both integrate in openHAB. I find the configuration of the homematic CCU a bit trickier as the Nuki Bridge/App. But both work. As described in this thread, the Nuki API callback uses JSON, which can’t be interpreted by openHAB ootb, so you must use @ben_jones12’s python script for this.

So long story short: Both work, but I tend to Nuki, because of the App. It allows easy invitation for friends or housekeeping and setting days or times for easy access to them.

Thanks a lot! This did it!
Now, I only need some more info to make this run reliably. Does anyone have some additional info regarding supervisor or something similar?

Sure, install supervisor (Google for instructions) and add a conf file for nukiproxy containing something like;

[program:nukiproxy]
directory = /opt/openhab/etc/scripts/nukiproxy
command = python nukiproxy.py
user = ben
1 Like

Hi!
I’m currently developing a openHAB2 binding for Nuki Smart Locks.
If you are interested, please see

cu Markus

1 Like

Hey Markus,

thanks for taking care of this. I think Nuki has a lot of potential which can be helpful in Smart Home automation and a binding would be great.
I am willing to test.
Just saw on github that the binding seems to be close to be merged. Wow.

Uwe

1 Like