Bluetoooth + API without pairing

Hi.
Please advise on a tech solution to this situation.

I have a lock, which I address via the API (not using the Nuki app). I want to grant access to another persion via the API too. It’s all good until the lock has connection to the internet.

If a lock loses the connection, can I have a person, to whom I have granted access, open it via Bluetooth from the outside, meaning that person never created a pair prior and is not capable of creating one from the outside either?

Is there a solution?

Thank you so much in advance.

Not sure which API you are using, but obviously when the internet connection is down people can only lock via BLE, which means that you need to create BLE credentials which you can only create through the BLE API.

If you use the Nuki ecosystem (Nuki Web for creating invites, Nuki App for locking/unlocking) this is working out of the box. If you create your own you will have to deal with this on your own. i.e. you need to implement a BLE credential sharing and/or pairing process in your own ecosystem.

Hey Jürgen,

Thanks for your detailed reply. I would be grateful if you could still explain a couple of things.

Yes, it is a totally separate ecosystem that works with Nuki via the API. So do you happen to know where the link to the Nuki BLE API docs is?

And did I get it right, that the visitor doesn’t have to press the hard buton on the lock for 5 seconds (otherwise how would one do that from the outside :slight_smile: to get in if the mentioned invites are used? I mean like for the first-time-ever visitor.

Thanks. Hopefully the docs are suffficient to figure this out :slight_smile:

@Juergen didn’t tag you above. Thanks

A paired user can create a new pair of keys via BLE without the Smart Lock beeing in pairing mode. It requirs only the knowledge of the Admin PIN.

Another practical solution could be to always use the same keys (for all your guests), which you have stored inside your app. In this case you can not use the access management of the Smart Lock (e.g. expiring or deleting a key after a certain time window, access logs, …) and have to handle that (shared) key securely inside your own App, but you work around the need to create new keys for every guest.

Searching for libraries that have the BLE API implemented is a good source for understanding how it works. e.g. GitHub - I-Connect/NukiBleEsp32

This does not speed up the response time :wink:

Still can’t find a solution to this. Can anyone help me once again please? It’s a nightmare :sweat_smile:

So let’s look at the suggested solution:
“Another practical solution could be to always use the same keys (for all your guests), which you have stored inside your app.”
Can I get a direct answer please - yes or no - does such guest have to pair with the lock to unlock it?
If the answer is a yes, then does (s)he have to press the hard button on the lock to establish a pair (which is impossible from the outside)?

Another text above says:
“A paired user can create a new pair of keys via BLE without the Smart Lock beeing in pairing mode. It requirs only the knowledge of the Admin PIN.”
So what is meant by “a paired user without being in pairing mode”? Does it mean a preciously paired user? So for the house owner I need to pair that user to generate the keys? What methods are used? Where are the keys stored? When should the admin pin be entered? I don’t use the Nuki app. And I use Nuki Smart Lock 2.0 and 3.0.

Is there a particular document on this? Because all I see is this doc
https://developer.nuki.io/page/documents/1/
which has nothing about it.

In any case, how do I let users grant such access for their guests inside my app? I am using this endpoint: Swagger UI

It doesn’t return keys or any data that I need for establishing a BLE connection. What should I trigger to get this keys?

I looked at this code:

Ok, this one would work … with a Raspberry PI. But that’s not my case :grin:

I’m OK to read it and figure it all out, I don’t ask to provide me a step by step instructions. But I really can’t find anywhere to even read about this. What do I start with? I’m totally lost :pensive:

Thank you so much in advance! :slight_smile:

@Juergen :pray:

Can someone help please?

Have you considered just using a keypad? You can just add/remove codes for guests, this is also possible via the API.