Callback only functionality

Hi nuki devs,

I successfully integrated Nuki with Home Assistant, it works fine, callback included. The official integration lacked the callback, so there was a huge delay for lock/door events, solved introducing the callback. Here’s the Home Assistant card with all the sensors:

Unfortunately, since I also wanted to know the status of the system, I also implemented list and info commands via a REST sensor (http GET) and I started facing the well-known communication problems due to the fact that the bridge accepts only 1 call at a time. So I introduced serialization, and things are way better than before.

The problem though is that also if you serialize, when the bridge is busy with the lock via BT/BLE (I see several entries in the bridge log), http calls are not honored, even when serialized.

Now, since the callback mechanism is way more efficient, would it be possible to implement a callback for all the info provided in list/info commands? That way we’d have no need to query the lock, we would only rely on the bridge calling and passing info about events or periodic updates of the system status.

It would greatly help the integration and automation of the Nuki.

Thanks,

Alessandro

3 Likes

Have you tried using the “nowait” option when sending lockActions? This might help because it frees up the bridge as soon as the Smart Lock did “accept” the lock command.

1 Like

I’m using lockAction, because I wanted to give users the possibility to choos the action for unlock (some users need unlatch). So I made the call with lockAction flexible. But I see many entries in the log regarding BT/BLE operations between bridge and lock.

rest_command:
  nuki_lock_action:
    url: "{{ states('input_text.nuki_bridge_url') }}/lockAction?action={{ action }}&nukiId={{ states('sensor.nuki_id') }}&token={{ states('input_text.nuki_bridge_token') | urlencode }}"

Sorry Juergen, now I see what you mean, I completely missed this:

image

I’ll implement it right away, thanks. But still, the request remains: it would be great if you could enrich the callback with all the info we have with list/info commands, so we don’t need to do any gets, except when configuring the bridge the first time. :slight_smile:

Also, a periodic callback (every hour or configurable) would be great, in case no lock/door events are triggered…

1 Like

This would be better in a seperate feature request with a proper description which /list changes/infos you’d exactly like to see in a callback.

1 Like

I will move it there, thanks for the nowait idea. :slight_smile:

I created the FR: Nuki Bridge: callback data - enrich the json response with more data about the system

Thanks again.

1 Like

Juergen, with nowait=0 the bridge wouldn’t trigger the callback until the action of the lock was completed, right? If so, that could explain why it took 8-12 secs for lock actions. So now users should see immediate status update with nowait=1, correct?

UPDATE: I did some tests and it takes the same time to receive the callback, 10 secs.

Another question: some users asked me why they never see the locking/unlocking/unlatching status, I did some tests and I noticed the bridge doesn’t send those via callback. Is that correct? So when I press the lock button on the GUI, they would like to see the appropriate intermediate state, but I’m not receiving callbacks from the bridge for those.

Thanks for any help on this.

Alessandro

Your obersvations are all connected to each other:

  1. When you send a lock command to the Smart Lock, the Smart Lock first “Accepts” it (= it says that it will perform it). At this point the client (e.g. App, Bridge, Keypad) could disconnect and the Smart Lock will still perform the action. If the client stays connected it receives state updates until the lock action results in a final “Complete” messages (or error). At this point every client should disconnect.

  2. Together with the complete state a log entry is written in the Smart Locks activity log and the bridge is notified that there is a change in the lock state. Which triggers the bridge to fetch the current state and forward it via callback.

Point (2) is why you typically don’t get transition states as call back, because the transition already happened before the log entry is written and the bridge is notified. If you want to free up the http connection you can use the “nowait” command. This will reduce the likeliness of a concurrency problem, because the duration of the lock action is much shorter (only 1-2sec instead of e.g. >20s if you trigger lock’n’go) but this has no impact on the callback. This will still only be triggered after the “complete” is written and after the bridge did fetch the state from the lock.

Thanks a lot for the explanations, a few questions:

I’m using the Bridge API in my HA integration, I guess what you described in point 1 does not apply, because there’s no real connection, I only do REST API calls via http GET, as per Bridge API documentation, correct?

That’s why I don’t see the intra-states, because the Bridge gets notified at the end of the action. Clear now. So the callback always provides only the final state of the action.

If I had known this before, I would’ve probably not needed to serialize the communication. Now I applied both the nowait=1 and I also serialized the http calls. I introduced a 1s delay between each call, do you think it’s necessary? It’s working fine now, no error 503, but probably I could make it faster removing the delay between each call.

Is there a sort of flow-chart or state-diagram that describes how it all works? If you can share it, obviously. :slight_smile:

Yes. “Client” in my response was reffering to a device that communicates with the Smart Lock via the BLE API. In your case the bridge is the client.

Yes, makes sense.

No, sorry. Nothing i can share with you.

Thanks a lot for all the information. Users are reporting that my integration is working much better now, with nowait=1 and serialization.

I hope the Feature Request for the callback gets considered. :slight_smile:

Ciao,

Alessandro

1 Like

@Juergen sorry to open this up again, I added support for the Opener to my Home Assistant integration with callback, but I’m seeing a 12-14 sec. delay since I click on lock/unlock and receive the callback. I’m using nowait=1 like you suggested.

Here are the logs of a lock and unlock, if you notice anything strange please let me know. The curious thing is that if I press the button on the opener to lock/unlock, I receive the callback instantaneously, I don’t understand why it takes 12-14 secs if I lock/unlock via REST call.

Any advice is more than welcome. Thanks in advance.

/unlock

{"timestamp": "2021-09-02T23:42:13+00:00", "type": "HTTP-Post", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:42:13+00:00", "nukiId": "1CA57B22", "type": "SSE-KeyturnerEventReq"},
{"timestamp": "2021-09-02T23:42:13+00:00", "nukiId": "1CA57B22", "type": "BLE-ReadStates", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:13+00:00", "type": "SSE-PushNukisResponse"},
{"timestamp": "2021-09-02T23:42:13+00:00", "type": "SSE-PushNukisRequest", "count": 2},
{"timestamp": "2021-09-02T23:42:13+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 1},
{"timestamp": "2021-09-02T23:42:13+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:13+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:12+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:42:12+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:12+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:42:12+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:12+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:11+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:42:11+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:11+00:00", "nukiId": "1CA57B22", "type": "BLE-StateChanged", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:10+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:10+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnect", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:10+00:00", "nukiId": "1CA57B22", "type": "BLE-ConnectionTimeout"},
{"timestamp": "2021-09-02T23:42:05+00:00", "nukiId": "1CA57B22", "type": "BLE-SendLockAction", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:05+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:05+00:00", "nukiId": "1CA57B22", "type": "BLE-GetChallenge", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:05+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 3},
{"timestamp": "2021-09-02T23:42:05+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:05+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:04+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:42:04+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:04+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:42:04+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 2},
{"timestamp": "2021-09-02T23:42:04+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:04+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:03+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:42:03+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:03+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:42:03+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 1},
{"timestamp": "2021-09-02T23:42:03+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:03+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:02+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:42:02+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:02+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:42:02+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:02+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:42:00+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:42:00+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:42:00+00:00", "nukiId": "1CA57B22", "type": "HTTP-LockActionStart", "action": "unlock"},

/lock

{"timestamp": "2021-09-02T23:51:16+00:00", "type": "HTTP-Post", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:51:16+00:00", "nukiId": "1CA57B22", "type": "SSE-KeyturnerEventReq"},
{"timestamp": "2021-09-02T23:51:16+00:00", "nukiId": "1CA57B22", "type": "BLE-ReadStates", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:16+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 2},
{"timestamp": "2021-09-02T23:51:16+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:16+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:51:15+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:51:15+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:15+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:51:15+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 1},
{"timestamp": "2021-09-02T23:51:15+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:15+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:51:14+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:51:14+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:14+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-02T23:51:14+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:14+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:51:13+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:51:13+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:13+00:00", "nukiId": "1CA57B22", "type": "BLE-StateChanged", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:12+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:51:12+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnect", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:51:12+00:00", "nukiId": "1CA57B22", "type": "BLE-ConnectionTimeout"},
{"timestamp": "2021-09-02T23:51:05+00:00", "nukiId": "1CA57B22", "type": "HTTP-LockActionSuccess"},
{"timestamp": "2021-09-02T23:51:05+00:00", "nukiId": "1CA57B22", "type": "BLE-SendLockAction", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:05+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:05+00:00", "nukiId": "1CA57B22", "type": "BLE-GetChallenge", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:05+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:05+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-02T23:51:04+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-02T23:51:04+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-02T23:51:04+00:00", "nukiId": "1CA57B22", "type": "HTTP-LockActionStart", "action": "lock"},

There are quite a few “BLE-Retry” and “BLE-EarlyDisconnect” which are indicators for a not perfectly well working BLE connectivity and thus lost time because of retries. You can try to move the bridge closer to the Opener or if you have a Smart Lock & an Opener on the same bridge, using separate bridges for both devices. Also changing batteries or removing the batteries and powering the Opener via USB might be worth a try.

I imagined that those retries could be an issue, I have the opener connected to the USB port of the PC while developing the integration.

What I don’t understand is why, if I use the opener hw button to lock/unlock, the callback is instantaneous. If BLE connection is bad, I should see the same delay, right?

I’ll put the Opener close to the bridge and let you know if it improves.

@Juergen I put the Opener 1 meter from the bridge, powered via USB. The RSSI values look good:

{“bridgeType”: 1, “ids”: {“hardwareId”: 458813202, “serverId”: 1352037564}, “versions”: {“firmwareVersion”: “2.10.1”, “wifiFirmwareVersion”: “2.2.0”}, “uptime”: 123212, “currentTime”: “2021-09-03T13:54:25+00:00”, “wlanConnected”: true, “serverConnected”: true, “scanResults”: [{“deviceType”: 2, “nukiId”: 480607010, “name”: “Nuki_Opener_1CA57B22”,“rssi”: -39, “paired”: true}, {“deviceType”: 0, “nukiId”: 469204325, “name”: “Nuki_1BF77D65”, “rssi”: -44, “paired”: true}]}

We’re down to 7-8s now. I still feel it’s too high, but you’re in a better position to judge this. :slight_smile:

/lock (8 seconds)

{"timestamp": "2021-09-03T13:50:32+00:00", "type": "HTTP-Post", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:50:32+00:00", "nukiId": "1CA57B22", "type": "SSE-KeyturnerEventReq"},
{"timestamp": "2021-09-03T13:50:32+00:00", "nukiId": "1CA57B22", "type": "BLE-ReadStates", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:32+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:32+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:50:31+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:50:31+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:31+00:00", "nukiId": "1CA57B22", "type": "BLE-StateChanged", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:31+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:50:31+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnect", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:50:31+00:00", "nukiId": "1CA57B22", "type": "BLE-ConnectionTimeout"},
{"timestamp": "2021-09-03T13:50:26+00:00", "nukiId": "1CA57B22", "type": "BLE-SendLockAction", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:26+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:26+00:00", "nukiId": "1CA57B22", "type": "BLE-GetChallenge", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:26+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 3},
{"timestamp": "2021-09-03T13:50:26+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:26+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:50:25+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:50:25+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:25+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:50:25+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 2},
{"timestamp": "2021-09-03T13:50:25+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:25+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:50:24+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:24+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 1},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:50:24+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:24+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:50:24+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:50:24+00:00", "nukiId": "1CA57B22", "type": "HTTP-LockActionStart", "action": "lock"},

/unlock (7 seconds)

{"timestamp": "2021-09-03T13:48:41+00:00", "type": "HTTP-Post", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:48:41+00:00", "nukiId": "1CA57B22", "type": "SSE-KeyturnerEventReq"},
{"timestamp": "2021-09-03T13:48:41+00:00", "nukiId": "1CA57B22", "type": "BLE-ReadStates", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:41+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 1},
{"timestamp": "2021-09-03T13:48:41+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:41+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:48:40+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:40+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:48:40+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-StateChanged", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-Disconnect", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:48:40+00:00", "nukiId": "1CA57B22", "type": "BLE-ConnectionTimeout"},
{"timestamp": "2021-09-03T13:48:35+00:00", "nukiId": "1CA57B22", "type": "BLE-SendLockAction", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:35+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:35+00:00", "nukiId": "1CA57B22", "type": "BLE-GetChallenge", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:35+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 2},
{"timestamp": "2021-09-03T13:48:35+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:35+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:48:34+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:34+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-Retry", "pairIndex": 1, "count": 1},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:48:34+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:34+00:00", "type": "BLE-EarlyDisconnect", "nukiId": "1CA57B22"},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-TurnOnNotific", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-Connected", "pairIndex": 1, "bleHandle": "0001"},
{"timestamp": "2021-09-03T13:48:34+00:00", "type": "BLE-Connect", "macAddr": "54D272A57B22"},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "BLE-Connect", "pairIndex": 1},
{"timestamp": "2021-09-03T13:48:34+00:00", "nukiId": "1CA57B22", "type": "HTTP-LockActionStart", "action": "unlock"},

This are the expected response times. You can only reduce that further if you reduce the opening time (i.e. how long a strike/relay is engaged). But this is not possible in every configuration scenario of the Opener.

The opener I’m using is not connected to anything, I’m just using it to develop the integration.

Why is that using the button on the opener to lock/unlock the response is immediate?

I think there is some delay when there is already an active BLE connection, which is not the case when you press the button on the device itself. Am currently not 100% sure about why this is.