-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unpair Nuki not working correctly #149
Comments
Hi, I was able to unpair and re-pair without issues. Communication with the lock was restored as soon as pairing was completed. Can you record logs during unpair/re-pair ? MQTT logs should suffice in this case. |
@deadly667 Do you have any update on this? It's always unfortunate if I can't reproduce the issue, but so far you're the only one who reported this. |
+1 ❗ There you should find enough information to test this by yourself. For the records in case it might be of help (maybe hardware dependant? I don't think so but who knows) I use these ESPs: https://www.amazon.de/AZDelivery-LOLIN32-Bluetooth-kompatibel-Arduino/dp/B086V1P4BL Disclosure: And I'm done with testing and Nuki hub for a while, so currently not in the mood of providing further logs or stuff (spending time). And if @deadly667 would have responded during the last month, I would probably have saved 3 hours of this weekend... Hopefully not many others will run into this. I don't think so as re-pairing seems to be a corner-case based on the assumed usual usage (flash, pair, leave it/only maintain it with updates etc.). |
Can you give this binary a try? |
I will try to do it today evening. As I have only one Nuki and it's on main door I need to be careful with WAF :P and also need to find spare time for this operation (flash, try to recreate, flash to stable and make everything work as it was before) |
There's no need to mess with your current setup. You can just use another ESP for testing, just check "Register as App" before pairing. If you do that, you main ESP will stay paired with the lock. |
I have good and bad news. 8.23 version (the one you provide me) didn't solve the problem. Good news is that I have now full logs. Main Nuki hub, it was on version 8.21. Then I update it to your version (via web ui) and the same issue. See the logs:
I masked some sensitive numbers and data with xxxxx. |
this is what I have under info So for recreating it's important to factory reset Nuki lock trough Nuki APP. Unapir and pair without factory reset working fine but as I said I assume that during Factory reset of Nuki Lock, some information are getting changed but Nuki hub don't override old value with unpair and communication ends in timeouts/errors. Can I do something else while I'm in this faulty mode? |
Hi, thanks I'll look into it. There are four values stored by the library handling the NUKI communication. In this test binary, all four values are deleted. I can't think of anything else that's stored on the ESP that has to to with pairing ... its somewhat of a mystery. |
Ok. Maybe I have one more important clue. When Hub is in Register as app mode everything works (8.23 version)!! I can unpair and when it's paired again everything works. app mode - unpair/pair works Are we maybe looking in the wrong direction? Maybe something is not sent to Nuki lock what is needed when in bridge mode? I don't know how communication looks like so just guessing. Here is the log of app mode where everything works. It's restart after repair (I forgot to take a log while repair in app mode) app mode:
|
After factory resetting the lock, did you set it up in the smartphone app before pairing it to the ESP? I've noticed it paired only after configuring via the smartphone app. If you can exclude that as a reason, can you test this binary? I've noticed there's there one more thing stored on the ESP, the device id that each device identifies itself to the lock. I've added some code so that after unpairing, a new random device id is generated. |
Yes, after factory reset the lock I set it up fully via the smartphone app and then when all is configured I pairing it to the ESP. Unfortunately, we still have the same problem. device identifier didn't help.
I noticed that when unpair and then start pairing that it pairs like instant (but ends in error), but when I reflash ESP (clean ESP ) it takes a few seconds to pair. Also what I capture during reflashed (clean ESP) pairing is this log:
It can be that it's only a glitch in the serial port in that moment, but I don't see anything like that when unpair/pair which ends in errors and timeouts. |
I'm out of ideas so far. Like I said, there four values saved after pairing, which are deleted when unpairing. The state regarding pairing should be exactly the same as when reflashing. I'll add this to the readme for now. |
How to recreate:
I tried multiple times unpair, restart, reset to AP mode and setup WIFI again but always had the same outcome.
What worked was flash ESP32 again with the same firmware 8.18 so that flash wipes all the data and then everything was as it should be, from the first try successful.
I will assume that some token or information still remains there after unpair which then got reused after pair which in my case of factory reset was not correct.
Nuki Hub - 8.18
Nuki 2.0
Lock firmware version: 2.14.5
Lock hardware version: 11.1
The text was updated successfully, but these errors were encountered: