Random "HTTP 503 Unavailable"

Hello,

I have got a Nuki v2 and I am having following issue. I have also Nuki v1 and this problem NEVER occurs. There is some incopatibility between Nuki v2 and the bridge probably…

Bridge-http-API is giving back “HTTP 503 Unavailable” in about half of API calls. Same issue for Lockstate as well as LockAction.

  • Connection Status from Nuki App is GREEN
  • When I go to Manage Bridge, hold 10s the button and see the connection in Bridge I see the SmartLock as RED/Not Connected

Same issue is with Nuki APP, I am not getting Lock status as well I am not able to send commands in about 50% of tries.

http://ip_of_the_brige:8080/info?token=my_token

  • I am getting this:

{“bridgeType”: 1, “ids”: {“hardwareId”: xxxxxxxx, “serverId”:
xxxxxxxxxxxxx}, “versions”: {“firmwareVersion”: “1.11.4”,
“wifiFirmwareVersion”: “1.2.0”}, “uptime”: 13, “currentTime”: null,
“serverConnected”: false, “scanResults”: []}

and in about half of tries this:
“HTTP 503 Unavailable”

thx
Jakub

From where do you access the HTTP-API? I only get this behaviour when trying it directly from a browser (and there is no big difference for SL v1 and v2).

Low uptime and currentTime:null hint on the Bridge was just restarted/plugged in.
How does the result look later on or does the value not change?
Also looking at server Connected:false too it could mean that the bridge is in fact offline. Did you try to reconnect it to your Wifi?

If that doesn’t solve your problem please contact our customer support at contact@nuki.io as this might require sharing logs and other sensitive data.

P.S.: I edited out your Bridge ID. Please never post such details here in the forum.

EDIT: Btw. do you have Homekit activated?

Hello,

after some time it looks fine:
“versions”: {“firmwareVersion”: “1.11.4”, “wifiFirmwareVersion”: “1.2.0”}, “uptime”: 6915, “currentTime”: “2019-01-04T12:43:31+00:00”, “serverConnected”: true, “scanResults”: []}

how ever the bridge in Nuki App always says the Lock is NOT connected, please see the screenshots.

no homekit activated

Jakub

Hello,

I have performed the FACTORY RESET and now I see the lock in “GREEN” state in manage-bridge.

However HTTP 503 Unavailable is still being sometimes displayed.

Jakub

Hi,

I have exactly the same problem.
A lot of "HTTP 503 Unavailable"with callback/list, /list or /auth.
With /lockstate it works a little better.
With /auth (when it works), I got: {“success”: false}.
In Nuki app - Connexion status, everything is in green: Nuki ->Bridge->Server->Smartphone.
Any idea?

Thanks a lot.

Schlew

My /info:

{“bridgeType”: 1, “ids”: {“hardwareId”: XXXXXX, “serverId”: XXXXXX}, “versions”: {“firmwareVersion”: “1.11.4”, “wifiFirmwareVersion”: “1.2.0”}, “uptime”: 9770, “currentTime”: “2019-01-08T00:26:11+00:00”, “serverConnected”: true, “scanResults”: [{“nukiId”: XXXXXX, “name”: “XXXXXX”, “rssi”: -79, “paired”: true}]}

This issue is ridiculous and I am waiting already for about a week. NUKI support is super slow which in comparison to price of the product is very strange.

Right now I am absolutely lost with the usage. And it is even worst when I send the command it does not get lost it will arrive to lock later (sometimes in about 30s) and what is absolutely strange is that if I send the command twice it will be delivered twice - in case of OPEN ACTION you can imagine :slight_smile:

I need to have this solved ASAP, there is a problem in FW it must be, because HTTP503 does not drop the action it is just delayed so the problem is most probably between BRIDGE<>LOCK

Jakub

To repeat my question from above:

Hi Stephan ,

The 503 error occurs as well in a browser (chrome, edge) or when I use script with my domotic system to parse json with script.
Schlew

The way a standard browser handles (and retries) requests will always cause problems, that’s why they should not be used to directly call the HTTP API.

Testing with e.g. lynx or cURL should not get you unregular 503 errors and/or delays and I can’t reproduce the problem with those with the current FW here for me.

I am not sure what your domotic script uses though.

This was the tutorial that I used: https://www.google.com/amp/s/www.habitat-domotique.fr/2018/07/07/associer-serrure-nuki-et-jeedom/ sorry, it is in french.
I will try with my own script in curl tonight (I m at work) and will give you my feedback ASAP.
Just FYI, everthings worked really well when I setup the script between Christmas and the New Year. I received the nuki for Christmas.

Hello,

I have a nother installation of Nuki v1 and bridge at my brother’s in law house and he NEVER experience this error. Everything works 100% with Loxone.

Jakub

Ok, I test it.

With this script:
curl -s http://192.168.XX.XX:8080/list?token=XXXXXX 2>/dev/null | jq -r ‘.[].lastKnownState.stateName’
I have sometimes the good state and sometimes: “parse error: Invalid numeric literal at line 1, column 5” even with my domotic Jeedom or with putty.
Only with curl -s http://192.168.XX.XX:8080/list?token=XXXXXX : HTTP 503 Unavailable
Another idea?

Schlew.

Another thing I just noticed:

I see a value of RSSI =-79 in your output above. That is a suboptimal value which means that the bridge is barely reaching the Smart Lock via BLE and could be sometimes blocked for a longer timeframe trying to connect to it. Could you try again with a setup where the bridge is nearer to the Smart Lock?

In the last couple of days unfortunately I see the same behavior with my nuki bridge. In this morning two lockstatements received a http error 503 with 3 seconds between them.
I tried to call the bridge-api with curl and get this behaviour:

$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                     
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable          
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
HTTP 503 Unavailable                                                                                                                                                                  
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
{"bridgeType": 1, "ids": {"hardwareId": XXXXXX, "serverId": XXXXXX}, "versions": {"firmwareVersion": "1.11.4", "wifiFirmwareVersion": "1.2.0"}, "uptime": 3756353, "currentTime": "2019-01-09T08:06:29+00:00", "serverConnected": true, "scanResults": []}                                                                                                                                                                       
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
{"bridgeType": 1, "ids": {"hardwareId": XXXXXX, "serverId": XXXXXX}, "versions": {"firmwareVersion": "1.11.4", "wifiFirmwareVersion": "1.2.0"}, "uptime": 3756496, "currentTime": "2019-01-09T08:08:52+00:00", "serverConnected": true, "scanResults": []}                                                                                                                                                                       
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
{"bridgeType": 1, "ids": {"hardwareId": XXXXXX, "serverId": XXXXXX}, "versions": {"firmwareVersion": "1.11.4", "wifiFirmwareVersion": "1.2.0"}, "uptime": 3756498, "currentTime": "2019-01-09T08:08:54+00:00", "serverConnected": true, "scanResults": []}                                                                                                                                                                       
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
{"bridgeType": 1, "ids": {"hardwareId": XXXXXX, "serverId": XXXXXX}, "versions": {"firmwareVersion": "1.11.4", "wifiFirmwareVersion": "1.2.0"}, "uptime": 3756499, "currentTime": "2019-01-09T08:08:55+00:00", "serverConnected": true, "scanResults": []}                                                                                                                                                                       
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
{"bridgeType": 1, "ids": {"hardwareId": XXXXXX, "serverId": XXXXXX}, "versions": {"firmwareVersion": "1.11.4", "wifiFirmwareVersion": "1.2.0"}, "uptime": 3756500, "currentTime": "2019-01-09T08:08:56+00:00", "serverConnected": true, "scanResults": []}                                                                                                                                                                       
$ curl http://192.168.178.68:8080/info\?token\=XXXXXXXXXXXXXXXX
{"bridgeType": 1, "ids": {"hardwareId": XXXXXX, "serverId": XXXXXX}, "versions": {"firmwareVersion": "1.11.4", "wifiFirmwareVersion": "1.2.0"}, "uptime": 3756501, "currentTime": "2019-01-09T08:08:57+00:00", "serverConnected": true, "scanResults": [{"nukiId": XXXXXX, "name": "XXXXXX", "rssi": -61, "paired": true}]} 

As you can see the first couple of requests gets a 503 and the the bridge-info shows no nuki. A only on the last request you can see a paired nuki?

I have homekit activated.

The nuki bride is about 1.5m from the nuki…
Will try at 5cm…:rofl:

I have exactly the same Problem.
The API does not work:

HTTP 503 Unavailable[22:33:51] openhabian@openHABianPi:~$ curl -s http://192.168.250.232:8080/info?token=XXXXXXX

10 posts were split to a new topic: Any API requests results in a HTTP 503 Unavailable