Http access for Smartlock Pro 3.0

Hello I am a new Smartlock 3.0 owner (without separate Bridge) and try to integrate it into my smarthome. First of all I try to send simple API request/queries to it before I evaluate further in Fibaro. So here ist my HTTP command with doesn’t work so far, and I appreciate any help:

http://nuki-ip:8080/info?nukiID=H2345678&token=h2..80

I got the response “ERR_CONNECTION_REFUSED”, which looks like an authorization issue. Here are my questions to the experts:
a) is the commandline http syntax correct
b) I have used Default Port 8080, but didn’t find any option in the App to set the Port for my Smartlock, please recall, I do not have a separate Bridge. So is 8080 correct, or where and how should I administrate the TCPPort
c) I have generated the token within the NUKI WEB API/API/generate API token:

.
It has 80 characters. Is this the correct way?
Is this a plain or a hash token, and do I get to a plain / correct token?

Would be nice if somebody can help me to get access to my Smartlock Pro 3.0 via http command
thanks

You can only use the Bluetooth API if you do not have a bridge.

With bridge you can use the local HTTP-API of the bridge or the cloud based Web-API.

It seem that what you are trying to do is to mix the Web-API with the HTTP-API which won’t work, even with a bridge.

If you have a Smart Lock 3.0 Pro (with integrated WIFI) you can only use the Bluetooth API or the Web-API as there is no IP based local API for this Smart Lock available. How to use the Web-API is described in a detailed example in the API specification (Sections 3.1 and 4.2). You will need a console to perform running curl or wget to perform the requests.

Dear @Juergen, appreciate your support and think I got it what you mean.
I am able to get information and act with my Smartlock 3.0 via Swagger UI.
The GET /Smartlock and Post /action works both. My challenge is to translate it into lua for Fibaro Homecenter2 . Wondering that no other NUKI owners, intended to integrate it in their Smarthome so far. if someone actually did, please follow my request to Fibaro Forum:

local Bearer = 'xxxxxxxxxxxxxxxxxxxxxxxxx'
local getRUrl = 'https://api.nuki.io/smartlock'
local http = net.HTTPClient()
http:request(getRUurl, {
    options = {
   		checkCertificate = false,
   		method = 'GET',
   		headers = {
        	['Accept'] = 'application/json',
        	['Authorization'] = Bearer },
   		data = {},
   		timeout = 10000
		},
	success = function(response)
   		local result = response.data;
       	if response.status == 200 or response.status == 201 then
			fibaro:debug(response.data)
       	else
			fibaro:debug(response.status)
       	end
    end,
	error = function(err)
		fibaro:debug(err)
   	end
})

end’s is the error message:

regards Christian

Any ETA for the local api on the pro lock? It’s not very pro if it’s missing features the non-pro verison has without reason… This would be a reason for me to return my newly bought lock as I don’t want to rely on the web api on your servers.

5 Likes

I am doing it via IFTTT and Webhooks which works to send Shelly Button http (only supported are http) requests to IFTTT and then execute a CURL command to the Nuki Web API to open my door…

I am very disappointed about the PRO Version and would never ever have purchased it if I knew in advance that it doesn’t support the local Bridge APIs.