-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Nuki Smart Lock Ultra support #519
Comments
I ordered it right now. And my M5Stack Atom POE (ESP32-S3 Version) is already flashed with nuki hub and ready to be used :-) |
@HolgerHees Did you order it from their website? It says "This product variant is currently not available" for me. |
yes, its available since today. And you get 3 keys, but you can order additional keys later with the security card. |
just installed Nuki Ultra and it doesn't automatically pair with nukihub 😔 Nuki Ultra works with the Nuki App, no NukiBridge installed. |
@reznikov: If I am correct the Nuki Ultra doesn't support the Nuki bridge. This might mean it also will not support using NukiHub in bridge mode with the Ultra (which is the default). Have you enabled And tried pairing with the Ultra again after changing these settings |
I'm not running a Nuki Bridge.
tried enabling them both and holding the button on the lock - no luck, didn't pair. I've enabled MQTT logging and I see it alternative between the following messages:
|
If you have enabled these options correctly (and rebooted NukiHub) you should see the message |
I’ve tried both, and had both messages appear. Still doesn’t pair |
@iranl There's a chance that that UUID used for the services are different for the ultra locks, so that the app can detect that an ultra lock is being paired. If that's the case I'd expect changes to the API. With some luck it's still compatible and they just added functionality. It's a shame they don't document anything anymore. |
That would be my guess as well. I'll try to do some debugging, but it is possible I'll need to get my hands on one to properly add support. |
I've got mine today and I can confirm it's not possible to pair it with Nuki Hub. Also tried enabling and disabling hybrid mode but it didn't work. Please let me know if there is any kind of logs that I can send to help debug. Thanks for your work! |
I am pretty certain the new UUID's are:
It also seems to implement secure pairing, but I am not sure if this is mandatory. This combination probably makes this too hard to work on without:
Having the keyturnerServiceUUID unchanged does probably make the process pretty straightforward after the pairing is sorted. I might be able to get my hands on one of these devices when it goes back on sale again. I have updated the README to show the Ultra is unsupported at this time. I am doing a one-time only (without owning the device myself) test build which you can find at: https://github.com/iranl/nuki_hub/actions/runs/12473517959. You will need to manually flash the binary using esptool. This test build will not work with the regular lock. If pairing starts but fails and usefull information is provided using serial logging I might consider a follow-up build. |
I've flashed the binary you provided. Still unable to pair with nuki hub. <LOGS CUT (iranl)>
I used this app to scan for bluetooth devices and my nuki appears to have the following UUID: "a92ee200-5501-11e4-916c-0800200c9a66". I can also see UUIDs 0x1801, 0x1800, 0x180A, 0xFFF6 listed but I don't really know what that means.
I didn't find any logging options in the advanced settings, this is what the page looks like: |
@mallorca2288: Test build was made not against the latest master by my mistake. Sorry for that. That is why you didn't find the Nuki debug logging functions at the bottom of the advanced page. Your logs did provide some usefull insights. It seems the pairing process starts and gets pretty far along. I also believe I have found how Nuki has made pairing secure on https://help.nuki.io/hc/en-001/articles/4407702320017-Security-code The Ultra requires you to set a 6-digit PIN code which is needed as part of any bluetooth pairing operation. Can you try with this build: https://github.com/iranl/nuki_hub/actions/runs/12482870076 Steps: Note that it is possible that your ESP was banned (temporarily) from connecting/pairing looking at your second log (for trying repeatedly with the default PIN of 123456). Usually easiest fix would be to restart the Nuki device by removing the batteries from the Nuki device, but I am not sure if that is even possible with the Ultra. |
I've tried pairing it two times with the new build, here are the logs: <LOGS CUT (iranl)> Thanks for your time! |
Try number 3: https://github.com/iranl/nuki_hub/actions/runs/12483995128 (still building, should be up by 16:30 UTC) Same steps. This version will try to force a secure connection from the client as your logs show the passkey is never used. |
Logs with last build: <LOGS CUT (iranl)> I'm using a temporary pin code so no problem if it shows in the logs, I'll change it later. |
Try 3 still didn't secure the connection using the PIN. Turns out I didn't add it in the right place. Try 4: https://github.com/iranl/nuki_hub/actions/runs/12484546616 We are looking for the messages |
Logs with this build: <LOGS CUT (iranl)> Debug with this build: <LOGS CUT (iranl)> |
Ok. So now it tries to create a secureConnection but the correct PIN/passkey is still not used/requested. I'll think on this over the holidays and maybe try testing this with a custom BLE server mimicking a SmartLock Ultra before creating a new build. @mallorca2288 Thanks for all the work up to this point. Your input makes this work possible at all without help from Nuki and/or owning a device myself. Happy holidays |
I have another build up at: https://github.com/iranl/nuki_hub/actions/runs/12509007186 I changed a few things that might (emphasis on might) help. |
Logs with the latest build 😉 <LOGS CUT (iranl)> |
So trying to force the secure connection probably fails and it actually gets less far than on the unsecured connection. |
Also tried setting the PIN code of the lock in the Credentials page but it doesn't work with my password. |
Slowly getting there. Please unpair again as there is still an issue with saving the authorization ID (this is what probably causes the failure of all commands after pairing). Test 13: https://github.com/iranl/nuki_hub/actions/runs/12756923186
The credentials page is not used for the Ultra yet. |
Test 13 logs after unpairing: <LOGS CUT (iranl)> Showing as paired on the info page. |
The last log is not from test 13. Build ID is 12756923186 for test 13. |
Awesome. This should basically be it for changes to the BLE communication library in regards to the Ultra. Will need to make a couple(/many) changes to NukiHub to add proper support before this can be merged for 9.08, but this was the hard part. @mallorca2288: Your help has been invaluable. Couldn't have been done without your excellent support. Shall I add you as co-author on the final PR? |
Many thanks to you @iranl ! You did all the work. I'll be happy to test all the changes in the code and will report back on things that don't work as expected. Thanks again, I appreciate you taking the time to do this. |
@mallorca2288: Can you test: https://github.com/iranl/nuki_hub/actions/runs/12776839680 And report on each of the following:
Optional:
|
Forgot to say, unfortunately the motor speed setting is not showing in my Home Assistant. Also I can't find the state of the speed setting using MQTT explorer. EDIT: |
~~
The motor speed state should be in the MQTT topic
Can you connect to serial logging and then reboot NukiHub (using reboot button on the webconfigurator) and get me the logs from boot all the way to it getting all the configuration settings (and also showing the BLE disconnects). Note that you need to refresh the WebConfigurator to get the current Hybrid connected state (it doesn't update on the background as the other settings) |
After this it keeps flooding the console with the disconnecting BLE on timeout message a couple of times per second. |
Just FYI to anyone interested, the Ultra is back in stock in Nuki's website. |
Info page is wrong. Will be fixed in next build
Battery type is not supported by the Ultra, as it doesn't support the battery pack and only has the option of the internal battery.
What does the MQTT topic
BLE disconnecting flooding should stop in latest build. @mallorca2288: You can (should) now disable Nuki debug logging (at least hex and readable data) to prevent leaking possibly private information. New build: https://github.com/iranl/nuki_hub/actions/runs/12791586801 |
Ultra support has been merged in master and is available in 9.08-master2. I will keep this topic open for now to get further feedback from @mallorca2288 and other users with an Ultra. |
Hi, Will experiement with it over the next few days. Thanks for your work on this. I'm unsure how stable the matter (thread) mqtt comms are from the lock, so having a backup plan is great. A curiosity question.... I don't have a nuki door sensor, but I do have a door sensor as part of my alarm system that is available in home assistant. |
I've been testing the latest binary and everything seems to be working ok. Tried enabling and disabling keypad entries again and it worked as expected. Hybrid connection to the lock has been stable without any issues. The "BLE disconnecting" message flooding the logs has disappeared but now a new message keeps flooding the mqtt log (updated multiple times per second): I'll keep testing and report back if I find any issues. Right now I feel like this build is very stable for releasing. Thanks again! |
Disable all Nuki debug logging to stop logging the iBeacons |
You are asking for emulation of Nuki accessories. The communication between a Nuki lock/opener and it's accessories is completely undocumented by Nuki and thus emulation is no easy task. |
I noticed you mention an advanced setting of force look door sensor connected? I think there is a typo in the below.... Advanced Configuration should say get?page=advanced ? Thanks, |
Correct, tnx for the report, fixed.
This only has an effect when you have a Nuki door sensor |
Closing this issue for now, please open a separate issue if any specific issues with the Ultra pop up. |
We are looking for owners of the new Nuki Smart Lock Ultra
that can confirm if NukiHub works with the new device as expected.
Testing will include confirming:
If you use NukiHub with the Nuki Smart Lock Ultra please let us know if any or all of the above works as expected or not in this issue.
The text was updated successfully, but these errors were encountered: