How to request an Nuki Opener to open a door?

Hi,

I want to buzz a door open using a Nuki Opener.

Here is what I get

curl "http://192.168.188.56:8080/list?token=abc"

Response

[{"deviceType": 2, "nukiId": 508330330, "name": "Julie Opener", "firmwareVersion": "1.3.1", "lastKnownState": {"mode": 2, "state": 1, "stateName": "online", "batteryCritical": false, "timestamp": "2020-08-20T10:28:30+00:00"}}, {"deviceType": 0, "nukiId": 536197236, "name": "Julie", "firmwareVersion": "2.6.4", "lastKnownState": {"mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "doorsensorState": 2, "doorsensorStateName": "door closed", "timestamp": "2020-08-20T11:37:49+00:00"}}]

Than

curl "http://192.168.188.56:8080/unlock?nukiId=508330330&token=abc"

But that fails with a HTTP 404 Not Found

Also

curl "http://192.168.188.56:8080/lockAction?nukiId=508330330&action=1&token=abc"

gives me a 404.

So what do i miss?

1 Like

is this the IP of your bridge or of your opener?

I’m controlling the opener with my bridge with this command:

Activate RTO:
http://<ip_of_bridge>/lockAction?nukiId=<id_of_opener>&deviceType=2&action=1&token=<secret_token>

Here is a list of possible smart lock actions (chapter 6. Smart Lock Actions)
https://developer.nuki.io/page/nuki-web-api-1-3-0/3/#heading--smart-lock-action

If you want to activate the electrict strike, then this request will help you:

http://<ip_of_bridge>/lockAction?nukiId=<id_of_opener>&deviceType=2&action=3&token=<secret_token>

Thxs Peter.

But no. I was using the bridge IP. That’s why I included the list call

Any other ideas?

yep…you have to include the device type in your request. Otherwise the bridge will respond with a 404. see my examples for further details.

That did the trick! Thxs!

In the docu the deviceType is marked as optional - maybe somebody can fix that

Thanks for the notice. I already fixed it in the HTML version (https://developer.nuki.io/page/nuki-bridge-http-api/4) and it will be also fixed in the next PDF version.

Correct is that the parameter defaults to 0 (for backward compatibility reasons with previously existing Bridge API integrations) if not provided, i.e. it will work for Smart Locks (deviceType=0), but throw the error you saw for a Nuki Opener (deviceType=2).