No Webhook State after LockAction Nuki 2.0

Generally, I do not get CallBacks through the Bridge API, no matter if I switch to HomeKit, FHEM or the Nuki App.

HomeKit gets the status but signaled, there it is always correct.

could you have a look in the bridgelog and search for the term HTTP-POST? You can access the bridgelog with http://< bridge-ip >:8080/log?token=< your api-token >

No HTTP-POST in the logfile
Here is the log from the bridge when I have the Nuki app locked.

timestamp: 	2018-11-14T08:22:32+00:00	 	type: 	HTTP-Log	 
timestamp: 	2018-11-14T08:22:32+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:22:09+00:00	 	type: 	HTTP-PostFailed	 	urlId: 	0	 
timestamp: 	2018-11-14T08:22:08+00:00	 	type: 	WLAN-SocketDisconnected	 	 connection: 	3	 
timestamp: 	2018-11-14T08:22:05+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:22:05+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:22:04+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:22:04+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:21:55+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:21:55+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:21:54+00:00	 	type: 	HTTP-Post	 	urlId: 	0	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:52+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	3	 
timestamp: 	2018-11-14T08:21:51+00:00	 	type: 	HTTP-PostStart	 
timestamp: 	2018-11-14T08:21:51+00:00	 	type: 	BLE-Disconnected	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:51+00:00	 	type: 	BLE-Disconnect	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:50+00:00	 	type: 	SSE-KeyturnerEventReq	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:50+00:00	 	type: 	BLE-ReceivingMsg	 	nukiId: 	XXXXXXXX	 	cmdId: 	000C	 
timestamp: 	2018-11-14T08:21:50+00:00	 	type: 	BLE-SendingMsg	 	nukiId: 	XXXXXXXX	 	cmdId: 	0001	 
timestamp: 	2018-11-14T08:21:50+00:00	 	type: 	BLE-Connect	 	handles: 	ARRAY(0x6393b60)	 
timestamp: 	2018-11-14T08:21:50+00:00	 	type: 	BLE-Connected	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:49+00:00	 	type: 	BLE-Connect	 	macAddr: 	XXXXXXXXXXXX	 
timestamp: 	2018-11-14T08:21:49+00:00	 	type: 	BLE-Connect	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:49+00:00	 	type: 	BLE-Retry	 	nukiId: 	XXXXXXXX	 	count: 	1	 
timestamp: 	2018-11-14T08:21:49+00:00	 	type: 	BLE-Disconnected	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:49+00:00	 	type: 	BLE-Connected	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:48+00:00	 	type: 	BLE-Connect	 	macAddr: 	XXXXXXXXXXXX	 
timestamp: 	2018-11-14T08:21:48+00:00	 	type: 	BLE-Connect	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:48+00:00	 	type: 	BLE-StatusUpdate	 	nukiId: 	XXXXXXXX	 
timestamp: 	2018-11-14T08:21:39+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:21:39+00:00	 	type: 	HTTP-Info	 
timestamp: 	2018-11-14T08:21:39+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:21:14+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:21:14+00:00	 	type: 	HTTP-Info	 
timestamp: 	2018-11-14T08:21:14+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:20:47+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:20:46+00:00	 	type: 	HTTP-Info	 
timestamp: 	2018-11-14T08:20:46+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:20:25+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:20:25+00:00	 	type: 	HTTP-Info	 
timestamp: 	2018-11-14T08:20:25+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:20:04+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:20:04+00:00	 	type: 	HTTP-Info	 
timestamp: 	2018-11-14T08:20:04+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:19:42+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:19:42+00:00	 	type: 	HTTP-Info	 
timestamp: 	2018-11-14T08:19:42+00:00	 	type: 	WLAN-SocketConnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:19:23+00:00	 	type: 	WLAN-SocketDisconnected	 	connection: 	0	 
timestamp: 	2018-11-14T08:19:16+00:00	 	type: 	HTTP-Info

The Smartlock is removed from the bridge and added.
CallBack deleted from the bridge and created again.

I found HTTP-POST Events in the Log

timestamp: 2018-11-14T09:44:10+00:00 type: HTTP-Info
timestamp: 2018-11-14T09:44:10+00:00 type: WLAN-SocketConnected connection: 0
timestamp: 2018-11-14T09:44:08+00:00 type: HTTP-PostFailed urlId: 0
timestamp: 2018-11-14T09:44:07+00:00 type: WLAN-SocketDisconnected connection: 3
timestamp: 2018-11-14T09:44:05+00:00 type: WLAN-SocketDisconnected connection: 0
timestamp: 2018-11-14T09:44:05+00:00 type: WLAN-SocketConnected connection: 0
timestamp: 2018-11-14T09:43:55+00:00 type: WLAN-SocketDisconnected connection: 0
timestamp: 2018-11-14T09:43:55+00:00 type: WLAN-SocketConnected connection: 0
timestamp: 2018-11-14T09:43:55+00:00 type: BLE-Disconnected nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:55+00:00 type: BLE-Disconnect nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:54+00:00 type: WLAN-SocketDisconnected connection: 0
timestamp: 2018-11-14T09:43:54+00:00 type: WLAN-SocketConnected connection: 0
timestamp: 2018-11-14T09:43:52+00:00 type: HTTP-Post urlId: 0 nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:52+00:00 type: BLE-ReceivingMsg nukiId: XXXXXXXX cmdId: 000E
timestamp: 2018-11-14T09:43:52+00:00 type: SSE-KeyturnerResponse nukiId: XXXXXXXX bytes: 188
timestamp: 2018-11-14T09:43:52+00:00 type: BLE-ReceivingSSE bytes: 55 auth: XXXXXXXX
timestamp: 2018-11-14T09:43:52+00:00 type: SSE-KeyturnerResponse nukiId: XXXXXXXX bytes: 256
timestamp: 2018-11-14T09:43:52+00:00 type: BLE-ReceivingSSE bytes: 107 auth: XXXXXXXX
timestamp: 2018-11-14T09:43:51+00:00 type: SSE-KeyturnerRequest nukiId: XXXXXXXX bytes: 96
timestamp: 2018-11-14T09:43:51+00:00 type: BLE-SendingSSE bytes: 96 auth: XXXXXXXX
timestamp: 2018-11-14T09:43:51+00:00 type: WLAN-SocketConnected connection: 3
timestamp: 2018-11-14T09:43:50+00:00 type: BLE-ReceivingMsg nukiId: XXXXXXXX cmdId: 000E
timestamp: 2018-11-14T09:43:50+00:00 type: SSE-KeyturnerResponse nukiId: XXXXXXXX bytes: 228
timestamp: 2018-11-14T09:43:50+00:00 type: BLE-ReceivingSSE bytes: 86 auth: XXXXXXXX
timestamp: 2018-11-14T09:43:50+00:00 type: SSE-KeyturnerRequest nukiId: XXXXXXXX bytes: 56
timestamp: 2018-11-14T09:43:50+00:00 type: BLE-SendingSSE bytes: 56 auth: XXXXXXXX
timestamp: 2018-11-14T09:43:50+00:00 type: BLE-ReceivingMsg nukiId: XXXXXXXX cmdId: 000E
timestamp: 2018-11-14T09:43:50+00:00 type: SSE-KeyturnerResponse nukiId: XXXXXXXX bytes: 212
timestamp: 2018-11-14T09:43:50+00:00 type: BLE-ReceivingSSE bytes: 73 auth: XXXXXXXX
timestamp: 2018-11-14T09:43:49+00:00 type: BLE-SendingSSE bytes: 56 auth: XXXXXXXX
timestamp: 2018-11-14T09:43:49+00:00 type: BLE-Connect handles: ARRAY(0x6089750)
timestamp: 2018-11-14T09:43:49+00:00 type: BLE-Connected nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:49+00:00 type: BLE-Connect macAddr: XXXXXXXXXXXX
timestamp: 2018-11-14T09:43:49+00:00 type: BLE-Connect nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:49+00:00 type: SSE-KeyturnerRequest nukiId: XXXXXXXX bytes: 56
timestamp: 2018-11-14T09:43:49+00:00 type: SSE-KeyturnerEventResp nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:49+00:00 type: HTTP-PostStart
timestamp: 2018-11-14T09:43:49+00:00 type: BLE-Disconnected nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:49+00:00 type: BLE-Disconnect nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:48+00:00 type: SSE-KeyturnerEventReq nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:48+00:00 type: BLE-ReceivingMsg nukiId: XXXXXXXX cmdId: 000C
timestamp: 2018-11-14T09:43:48+00:00 type: BLE-SendingMsg nukiId: XXXXXXXX cmdId: 0001
timestamp: 2018-11-14T09:43:48+00:00 type: BLE-Connect handles: ARRAY(0x6122ea0)
timestamp: 2018-11-14T09:43:48+00:00 type: BLE-Connected nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:48+00:00 type: BLE-Connect macAddr: XXXXXXXXXXXX
timestamp: 2018-11-14T09:43:48+00:00 type: BLE-Connect nukiId: XXXXXXXX
timestamp: 2018-11-14T09:43:48+00:00 type: BLE-StatusUpdate nukiId: XXXXXXXX

HTTP-PostStart shows that the callback has been sent.

HTTP PostFailed urlId: 0
normally means that the URL for the 1. set callback was not reachable.

We could track down the problem and hope to fix it with the next FW-update.

1 Like

sounds great :slight_smile:

Thank you all for helping. I found my problem. Thanks Nuki, as always faster and more helpful support.
Short explanation. It probably freeze my webhook socket. Sorry for troubble.

Leon

1 Like

No worries with your thread we found that my problem is indeed a firmware bug :slight_smile:

Have a nice day,
Niklas

1 Like

I just changed my lock with a 2.0 version to find out this is indeed not working ATM. Do you have an ETA for when this fix will be available?

Sorry, no ETA yet. But I will update it here as soon as possible.

The new Beta-FW for the SL is out since yesterday (v.2.3.4) and fixes the issue in our tests (and also according to @creak :wink: )

2 Likes

Hello. I have FW 2.3.10 on my Nuki Lock and current lock state does not update through webhook. Since I’m having problems with current lock state in HomeKit I tried to use nukiio homebridge plugin (https://www.npmjs.com/package/homebridge-nukiio?activeTab=readme). I set webhook server ip and port and I can see it in callback list (IP is RPi’s one where homebridge in running). But when I make action state in Home app is not changed and I can see in homebridge log that state in actually wrong. I tested all of the below options:

Only first option where HTTP lockState call is made every time seems to work OK. The second one and also the third one are returning wrong current lock state.

I can’t say anything about the function of the homebridge plugin.

Regarding our HTTP API:

  • If you keep pulling the state via /lockState endpoint this will drain the Smart Locks batteries quite fast

  • /list endpoint shows correct lockStatus for me with a very small delay

  • /callback is also working for me with SL with FW 2.3.10

I am the developer of the homebridge plugin. Please post your issue here: https://github.com/benzman81/homebridge-nukiio/issues

Thank you for your answer. Is it possible than when I lock/unlock SL and have phone near SL with bluetooth turned on that phone gets connected to SL via bluetooth and then Nuki Bridge doesn’t send webhook state change because bluetooth connection is made by phone and not by Nuki Bridge? I tested it now first with phone bluetooth on and state didn’t change and then with my phone bluetooth off and then state did change through webhook. I don’t know if this is coincidence or it works that way. But if it works like this why are there no delayed state change through webhook? I have Nuki Bridge Android app (Huawei P10 Lite smartphone) which is always plugged in and only 2 meters away from SL, wifi and bluetooth are always enabled and I have all of the additinal settings checked in app (auto connect, developer mode, reconnect in case of bluetooth problems). Am I missing something?

It should make no difference how you lock (as the Bridge only forwards the command and the state change should be pushed anyway from the Smart Lock to the Bridge).
But I will test the callbacks again tomorrow - as you described it, with Android Bridge App and one time with and one without bluetooth - to see if I can reproduce the issue on our side.

I could reproduce some of your issues which seem to be related with the Android Bridge.
But we need to investigate further.

Could you please activate the debug mode on your Android Bridge App, try it again and then send us an error report to developer@nuki.io?

The process is similar to the one on the Android App described here (only that the menu is on the top right):

OK. I sent you log report (I’ve already had debug mode enabled). If you can’t find any useful tell me and I’ll try to reproduce this problem later.

Hello, I didn’t see your post here. I think there is no issue with homebridge-nukiio plugin so I won’ post issue for now. I think your plugin works without any mistakes. The only thing I noticed is that every log messages (for example when there is a response to lockState request) is printed twice in homebridge log.