Bridge api don't respond

Hello, i have a the new nuki 2.0 with the bridge and i’m facing some issue.

The api don’t respond

When i try to call for exemple locking i don’t have response, and the ip is correct

curl http://192.168.2.209:8080/lockAction?token=XXXXXX&nukiId=XXXXX&action=2
curl: (7) Failed to connect to 192.168.2.209 port 8080: Connection refused

And here is my bridge infos

{
  "bridges": [
    {
      "bridgeId": XXXX,
      "dateUpdated": "2018-08-13T10:47:48Z"
    },
    {
      "bridgeId": XXXXX,
      "ip": "192.168.2.209",
      "port": 8080,
      "dateUpdated": "2019-02-19T14:13:21Z"
    }
  ],
  "errorCode": 0
}

Can you help.

Thanks

Please check your firmware version on the Bridge first.

If it is not >=2.1.36 please restart and then wait up to 25+ hours for an automatic update. If that does not help please contact or support via phone or contact@nuki.io for direct help.

I am having the exact same problem. Sometimes it works, sometimes it doesn’t. Any help here? I have the newest firmware (2.1.37).

Please provide more details about errors, error message and the way you call the API.

Sorry for my late response & missing info. Here is what happens:

When I call the lock via the bridge (via browser by calling e.g. http://192.168.x.x:8080/lockAction?nukiId=xxx&action=2&token=xxx) the latch closes correctly (or does any other action correctly according to “action=x”).

When that process is done and the lock-LED isn’t lit up anymore and I try to either:
1)call another action, e.g. http://192.168.x.x:8080/lockAction?nukiId=xxx&action=1&token=xxx
2)use the app via the bridge (bluetooth disabled!!! via using 4G)

the following happens:
1)the browser tries to load and load with eventually (after 1 or 2 minutes) saying the page couldn’t be loaded
2)the app doesn’t show the acutal lock state and says I need to enable bluetooth to use it. When calling an action anyways, nothing happens. When enabling bluetooth, the bridge works flawlessly.

When I wait several minutes, everything works like a charm again.

EDIT: I now managed to get this when trying to call the service again after only waiting for 10 seconds (via browser):
HTTP 405 Method not allowed

Unfortunately HTTP isn’t even listed in the documentation

Hi!

Thanks for the details.

2 things:

  1. Dont use a (Standard-)Browser to call the API. This will always give you errors and strange results as the Browser pre-fetches and automatically reloads pages, which is not a wanted behaviour when calling an API. You should instead use a CLI or a browser like lynx.

  2. Don’t keep the Nuki App open when testing. If you have the app open it will constantly check for the Smart Lock via all options and so keep the bridge busy. The bridge can not handle simultaneous calls well, so you should avoid tests with the App constantly open. If you reopen the App it will retest all fallbacks and everything should work fine again.

Lately I got 2 new white Nuki Bridges, each paired with 1 Nuki Smart Lock. One works fine and responds to API requests, the other one shows the same error as explained in this thread. Both bridges are in the same LAN and both bridges are directly talked to by a python tool (that btw worked fine with my old gen. 1 bridge, too). For testing purposes I also sent an API request via a REST-Tool to both bridges - with the same result: one responds correctly, the other one shows either a request time out or error 405. I also tried a factory reset and new install - that didn’t change anything of the behavior. And this behavior is also independent from running the App (in the App, the Smart Lock with the Bridge thats behaving strange, is always 1-2 seconds delayed when showing the status). Firmware is the latest and the same on both bridges (and SmartLock). I don’t understand that, so please help. Thank you.

@sharp7 Could you check the firmware versions of the 2 Bridges? Maybe one has not yet updated correctly from factory-firmware to the latest one?

As I wrote before, both bridges have the same firmware version - 2.7.0.