Bridge discovery & HTTP-API activation

This is part of the Nuki Bridge API documentation.

Calling the URL https://api.nuki.io/discover/bridges returns a JSON array with all bridges which
have been connected to the Nuki Servers through the same IP address than the one calling the URL
within the last 30 days. The array contains the local IP address, port, the ID of each bridge and the
date of the last change of the entry in the JSON array.

Example:

{
 "bridges": [
 {
 "bridgeId":2117604523,"ip":"192.168.1.50","port":8080,"dateUpdated":"2017-06-14T06:53:44Z"
 }
 ],
 "errorCode":0
}

Once a bridge has been discovered on the LAN the API can be activated and the API token retrieved
by calling the /auth command. The user has to confirm this request by pressing the button on the
bridge. For more details see the description of the /auth command.

If discovery is disabled via /configAuth or through the Nuki App, the IP is 0.0.0.0 and the port 0. In
this case the /auth command fails with HTTP error 403.

See also the HTTP-API overview:

unfortnunatly that does not work for me. There is no ip written:
{“bridges”:[{“bridgeId”:833645707,“dateUpdated”:“2018-12-14T14:08:14Z”}],“errorCode”:0}

and the answer to http://ip:8080 is:
{“error”:“invalid api token”}

No idea what to do

Please try to restart Bridge.

You can also check the IP and the port via “manage Bridge” from the App (where you most probably set up your Bridge and paired the Smart Lock) by clicking on the Bridge icon.

Restart already done without success. I know the IP. That’s not the problem. As showed the command http://192.168.0.189:8080 I only get the error message. I also tried another smartphone as bridge with the same result.

HTTP API ist activated and token is set and you still get this error when calling an endpoint?

Http API is activated. “Token is set” means in the bridge app? Then yes. Is that to be done somewhere else?

Yes, I meant the token in the Bridge management.

Then you call an endpoint with e.g.
http://192.168.1.50:8080/list?token=123456

Which is working here for me. So I can’t reproduce your problem yet.
The error should only come, when you send a wrong token or no token at all.

I am using software bridge. I understood bridge management does not work.
In the bridge app I activated the option “http API” where I also found the local IP-address and an API token. Is this the token I should use? Or the API-token I created via web?
Sorry. I am a bit confused.

In addition:
The connection seems to work but I can’t reach the smart lock. Doesn’t make sense for me.

I deleted the smart lock in the software bridge and reconnected again. Now it seems to work. I get responces and it is also reachable from outside.

Thanks for help…

1 Like

Nice to hear it is working now! :slight_smile:

Hi there!

When I’m trying to list all smart locks, I get an ‘HTTP 503 Unavailable’ response, although I already activated the API in the app bridge management (while using the api key for the http request, of course).

A restart of bridge doesn’t work either. I also tried Holgers approach, but I wasn’t lucky.

In the app the smart locks have a green connection to the bridge and I’m able to performe lock/unlock etc.

Do you have an idea how to fix this?

Edit: Just found this new thread from today:

On the back of my bridge there is a Nuki-ID starting with the number 15. Is this the mentioned serial id of the new hardware revision? I’m a bit confused, because you mentioned shipping next week, but I got my bridge today. Did I got an early bird? :smiley:

Yes. First units shipped already this week.

1 Like

Hello!

maybe my question fits the topic. I would like to operate my bridge only “locally”. That means the bridge should not connect to a Nuki server to register itself or my Nukis or to oush states or allow actions from the internet. Firmware updates are allowed of course.

I have the bridge for the REST API.

Do I have to configure that extra, or is that the standard?

1 Like

I’d be also interested in an answer to that question.Is it possible to operate the bridge totally without a connection to any Nuki server? And bonus question: Can I still use the Nuki app when I’m (e.g. via VPN) in the local WiFi of the Bridge?

Or maybe I’ll formulate my question more exactly:

After issuing

curl -s "192.168.1.10:8080/configAuth?enable=0&token=TOKEN"

for Nuki it’s not possible to access the bridge - means it’s LAN only mode and uses the WiFi only for local connections and firmware updates. Right? @Stephan?

The Nuki Bridge in general works in an Wifi without connection to our server (except for it not getting firmware updates). We had some problems with new hardware revision bridges (FW 2.x) though, which should be solved with the current firmware (so please make sure to get it only for an update at least once; the bridge checks for updates 1 hour after a restart and then all subsequent 24 hours).

The Nuki App does never directly communicate with the bridge. The Bridge just “bridges” commands from the App to the Smart Lock (received via Nuki server) if the App is not in BLE range of the Smart Lock.

The local Bridge API on the other hand is independent from internet access, as it only works locally.

Hm, I’d appreciate if one could somewhere find an architecture diagram when who talks to who. I’d like to avoid that Nuki Bridge talks to your servers except for Firmware Updates.

When does the Nuki Bridge talk to your servers in which configurations? What happens when I do a VPN to my local network?

Sorry to ask these basic questions, but I’ve never found sufficient answers on your site.

Hi!

Just a quick answer as I try to catch up after being back in the office :slight_smile:

The bridge will always try to push status updates of the lock to enable remote access. You can’t just restrict that to firmware updates. If you set it up in an local network without internet access you can still use it locally and could for example bring it only from time to time to force an firmware update via Bridge API call.

PM me for more details if needed.

Leider lässt sich nach Aktivierung der API und trotz Eingabe einer fixen IP-Adresse diese nicht halten. Die IP ändert sich auf 0.0.0.0 und lässt sich auch nicht ändern.