Hi,
we are a gym chain offering group fitness classes.
We would like to deploy 1x Nuki Pro per Gym with a PIN Pad to give access to our studios to both staff and customers.
Staff should receive long-lived PIN codes (e.g. valid for 1 month)
Customers should receive very short-lived PIN codes (valid only for 1 hour for the class they booked)
Is it possible to use the API as it is to generate a PIN code for a specific lock that is only valid for a specific time period? I would then send this code to my customer via email and show it in my application.
After the PIN code expires, I am fine with deleting that code. Customers can book classes 2 weeks in advance, and we run around 90 classes per week per gym. So I would need to maintain around 200 codes per lock at any given moment. Is that something that is easily doable via the API?
The Nuki Keypad 2 is listed as supporting up to 200 codes (not beyond). Examples on how to create codes via the Web API are listed here: Web API Example: Manage PIN-Codes for your Nuki Keypad (Your keypad will need to be paired with the lock, the lock will need Internet access, and you will need to ensure your PIN codes are unique, …)
Of course, you could always drive the lock from your own server, either via the Web or other API, and then have whatever UI/keypad attached to that that you want. Could be a button in your app, a keypad, a camera/barcode scanner looking for a QR code that the user presents them, … (I do this with my Nuki Opener.)
All that said, I’m not sure using a lock to turn a key is the best option for you. (You might want to consider an access solution with an electromagnetic lock, or an electric strike that would allow your staff to use keys but guests to be buzzed in, …)
Hi Michel,
Thanks for the fast response. To be able to implement the solution you suggest - key turning for staff and buzzing in for customers, what hardware would I need from Nuki? The opener + PIN pad + lock pro?
I do similar remote programming of Nuki 4 connected over Bridge. Now Nuki Pro doesn’t seem to utilize a Bridge, but connects to cloud over WiFi. Anyway as long as the lock has Internet connection, it can be programmed remotely. I use a backend server that manages codes using Nuki API.
This works good. Although with small problems that I had to tune, like api for sending a pin to lock sometimes fails, so need to use a repeating mode until it succeeds. Eventually also this may fail, for example if your lock is disconnected, you can implement “give up” after some timeout (I use like 10 minutes).
You’re at edge of Nuki’s capacity with 200 codes. Your system certainly has to delete expired codes, and you can improve that by programming upcoming codes not too much ahead of time, so that the lock holds smaller amount of codes that are close to their working time range.
My server generates the pin codes few hours before guest’s arrival (I run apartment rent). If the api would fail for some reason, there’s still time to retry next hour and have the lock codes in them before guests come.
Once the lock has configured codes, and is for example connected with a keypad, then it works also without Internet connection (lock <> keypad communicate over Bluetooth I believe).
For our self-service gyms we started with Nuki and finally ended up with a custom smartlock solution for the following reasons:
Nuki battery with wifi and clients entering every hour doesn’t live long. With the number of gyms growing it’s a real chore to go and replace batteries every few weeks. Keypads battery lives longer but you have to monitor its state to know when it’s time to replace it.
The motor is not very strong. If your door is not perfect and a latch is smooth you can get issues with Nuki opening/locking the door reliably. We had issues with clients entering a wrong PIN and then pushing the door to open which was pressing the latch to the strike plate and then Nuki couldn’t move the latch unless the door is pulled a bit to free the latch.
Nuki API is not very reliable, it happens that the API accepts a code but it never ends up on the lock. To get around this sitation you would need to implement webhooks and some logic on a server to control the pin codes are actually synced to the lock.
Some codes get stuck on the lock. The API says OK it’s removed but it’s really not and it’s not possible to remove them via Web UI.
And the most annoying is the lock tends to get stuck in some states, especially when users manually rotate the control ring which is hard to prevent even by placing a warning “DO NOT TOUCH THE RING”. Every time it gets stuck in some state the only way is to go to the place and fix it manually otherwise next client won’t be able to enter. We had a monitoring job on a server to make sure the lock always is in the correct state but still it’s a lot of fun to rush to a premise to unlock it before a next client comes.
So all in all it’s a decent product that is good for Airnbn rentals but it’s barely sustainable to use it for short-term rentals like a gym chain.