Nuki 3.0 Pro without bridge

Hi,
is there a plan to support Nuki 3.0 Pro without separate bridge using the
Web API Nuki Web API - Web API - Nuki Developers ?

Thanks and Regards,
Alex

2 Likes

Not really, since noone requested it and until Nuki released smartlock pro there was not much point to it since you needed the bridge anyway.
The problem with web api is that it seems to be more designed for configuration/management, there is for exmaple no way to listen to events (like doors being opened or doorbell ringing). The binding would have to poll the status of smartlock and the added latency would make it useless for any automation (also Iā€™m not sure whether there are any rate limits on api).
What parts of the api would you like to use in the binding?

Hm I see the problemā€¦ I was thinking about getting myself a 3.0 pro as well but I might need to think againā€¦

I hate the idea of having to use another bridge though even if it should optimise the battery lifetime of the lock itself. Moreover the price difference to the non-pro is negligible (given you need to buy a bridge as well) but you get the less appealing device design-wise (which is only my subjective opinion of course). Apart from missing OH integration I really see no point in buying the non-pro version plus a bridge :unamused:

It might me possible to integrate it quite easily with the http binding. Once I got mine Iā€™ll try it out

Actually, I have not really an idea up to now. But when I have a new ā€œsmartā€ device I always think about integrating it to openhab. :grinning:
Polling is an option but then the question is if the api has call rate limitations.
But Locking / Unlocking etc. should be possible.
Iā€™ll try to integrate it using the http binding.

Iā€™m also interested in this feature.

More interested parties will probably come with the release of the Nuki 3.0 Pro.

I tried to connect using the Amazonechcontrol binding. Unfortunately, the device is not listed under Things.

Were you able to use the HTTP binding successfully?

1 Like

I ordered the 3.0 pro yesterday. Afaik most if not all my current use cases will be covered by the product itself. Would still be nice to have an integration. So still +1 from my side for this feature :wink:

Same here :slight_smile:
I did not order one yet because of lack of integration in openHAB :joy:

Feel free to open feature request in github, we can move discussion about what the binding should do there.
In the meantime you can integrate it the same way the binding would using HTTP binding (although its much less user friendly)

1 Like

Hi,

I tried it successfully with http binding and Smart Lock 3.0 Pro.
I included reading of the lock status and locking / unlocking

Thing:

Thing http:url:nuki "nuki" [ 
	baseURL="https://api.nuki.io",
	authMode="BASIC",
	stateMethod="GET",
	commandMethod="POST",
	contentType="application/json",
	headers="Authorization=Bearer <api key>", "key2=value2", 
	refresh=60] {
		Channels:
			Type string : state "Status" [ stateExtension="/smartlock/<id>", stateTransformation="JSONPATH:$.state.state" ]
			Type switch : action "Aktion" [
				mode="WRITEONLY", 
				stateExtension="/smartlock/<id>/action", 
				onValue="{\"action\": 2}",
				offValue="{\"action\": 1}"]
}

Items:

//Nuki
String          Nuki_Status                         "Nuki Status [MAP(nuki.map):%s]"                                        {channel="http:url:nuki:state"}
Switch          Nuki_Aktion                         "Nuki Aktion"                                                           {channel="http:url:nuki:action"}

Regards,
Alex

3 Likes

Thanks for sharing! Iā€™m still waiting for my deliveryā€¦

But I really donā€™t like having an api access token in the config file. Anybody a better idea?

I think this is the best you can probably do. Itā€™s at least better than username/password. Whenever your server gets compromised you can revoke the token and youā€™re good to go. No one can take over your account (but still potentially your house which is probably worse). Itā€™s definitely a security issue but I donā€™t see a way around that unless Nuki allows you to use an app on your phone or something similar as a 2nd factor for authentication or you reduce the grants for the api user to read only (if possible, I donā€™t know the Nuki API).

(Or you decide not to integrate with OH at all of course but this is beside the point of this thread)

1 Like

@Alexaas

Hello Alex,
I tried your way with the http-binding, but all i got is this message in log-file.

2022-09-05 17:12:50.802 [INFO ] [nding.http.internal.HttpThingHandler] - Using the secure client for thing ā€˜http:url:nukiā€™.
2022-09-05 17:12:51.993 [WARN ] [p.internal.http.HttpResponseListener] - Requesting ā€˜https://api.nuki.io/smartlock/ā€™ (method=ā€˜GETā€™, content=ā€˜nullā€™) failed: 400 Bad Request

I activated the web access, I generated an API token with all rights. I tried the smart ID as hex value and as decimal value. Is there anything else I have to configurate at the website? Do I need an advanced api access?

Regards
Basi

Same here

Unfortunately I am reading a lot of bad stuff about the new Nuki 3.0 pro: there is a recall because of bad bluetooth chips and another one because of too many positioning detections which leads to annoying noises. Temporary solution: shut down wifi.

https://support.nuki.io/hc/en-us/categories/360003773158

This however does not affect all devices. I own one as well and I havenā€™t experienced any problems yet.

2 Likes

@Basi
Could you post your thing config here?

This is my thing definition.

Thing http:url:nuki "nuki" [ 
	baseURL="https://api.nuki.io/",
	authMode="BASIC",
	stateMethod="GET",
	commandMethod="POST",
	contentType="application/json",
	headers="Authorization=Bearer <api token>", "key2=value2", 
	refresh=60] {
		Channels:
			Type string : state "Status" [stateExtension="smartlock/<smartlockid>", stateTransformation="JSONPATH:$.state.state" ]
			Type switch : action "Aktion" [mode="WRITEONLY", stateExtension="smartlock/<smartlockid>/action", onValue="{\"action\": 2}", offValue="{\"action\": 1}"]
}

It looks like yours.