Nuki Opener API Error

Hello,

I have a problem with using the Bridge API and the new Opener.
I get a 404 when I call the lockState Endpoint, /list works.

http://IP:8080/list?token=token gives me the list of the bove devices I have:

0	deviceType	0
nukiId	12345678
name	"Wohnungstüre"
firmwareVersion	"2.5.4"
lastKnownState	
mode	2
state	3
stateName	"unlocked"
batteryCritical	false 
timestamp	"2019-09-04T10:27:09+00:00"
1	
deviceType	2 
nukiId	123456
name	"Haustüre"
firmwareVersion	"1.0.4"
lastKnownState	
mode	2
state	1
stateName	"online"
batteryCritical	false
timestamp	"2019-09-01T19:16:37+00:00"

That looks good as far I can tell, my call to the second one, the opener looks like that:

http://10.1.1.142:8080/lockState?nukiId=123456?token=token

As nukiId it tried the ID given with /list, the ID printed on the case and the ID in the lists array but nothing of them ends in a result other then 404.

FHEM, Home Assistant and OpenHAB all have their problems because of the HTTP response, i already did a factory reset but nothing seems to work. What can I do?

Bridge firmware:

firmwareVersion|"1.13.1 wifiFirmwareVersion|"1.2.0"

Ah, I’m very sorry, but where seems to still be an unclear part in the documentation.

The newly introduced deviceType paramater has to also be added for /lockState for an Opener (defaults to 0 for a Smart Lock to be backwards compatible).

So your call should be:

http://10.1.1.142:8080/lockState?nukiId=123456&deviceType=2&token=token

I will fix this in the code sampes in the documentation as soon as possible.

Hi Stephan,

thank you! It is working now.

1 Like

Any news about the documentation?
In the PDF there is still no info about Opener or the “deviceType”.

To which PDF/link are you reffering?
As far as I see the latest PDF-version (linked from https://developer.nuki.io/page/nuki-bridge-http-api-190/4/) contains all Opener information - including the correct parameter for /lockState.

I am refering to the sticky main post:

At the bottom there is a PDF.

1 Like

Ah, thanks a lot for finding this. Somehow I missed it on the last update! :-/

Correct version is now linked.
That’s the problem with PDF-direct-links. In doubt please always check the HTML-version where the URL will always forward you to the lastest version: https://developer.nuki.io/page/nuki-bridge-http-api-190/4/

1 Like