nuki_hub
nuki_hub copied to clipboard
Cant pair my Nuki Lock 2.0
I am not able to pair my Nuki. Trie dseveral ESPs and Reflashed everything again and again. But I am not able to get the Nuki Hub paired with my lock. Any help?
System Information
Nuki Hub version: 8.33 run: true confVersion: 833 deviceId: 677313223 deviceIdOp: 677313223 mqttbroker: 192.168.178.72 mqttport: 1883 mqttuser: *** mqttpass: *** mqttlog: false checkupdates: false lockena: true mqttpath: nuki openerena: false openercont: false mqttoppath: maxkpad: opmaxkpad: mqttca: mqttcrt: mqttkey: hassdiscovery: homeassistant hassConfigUrl: dhcpena: true ipaddr: ipsub: ipgtw: dnssrv: nwhw: 1 nwwififb: false rssipb: 60 hostname: nukihub nettmout: -1 restdisc: false rstbcn: -1 lockStInterval: 1800 configInterval: 3600 batInterval: 1800 kpInterval: 1800 kpEnabled: false accLvl: regAsApp: false nrRetry: 3 rtryDelay: 100 crdusr: crdpass: pubauth: false pubdbg: false prdtimeout: 60 hasmac: false macb0: macb1: macb2: MQTT connected: Yes Lock firmware version: Lock hardware version: Lock paired: No Lock PIN set: - Lock has door sensor: No Lock has keypad: No Network device: Built-in Wifi Uptime: 1 minutes Heap: 88852 Stack watermarks: nw: 6200, nuki: 2296, pd: 264 Restart reason FW: NotApplicable Restart reason ESP: ESP_RST_POWERON: Reset due to power-on event.
Hi,
Did you already factory reset the ESP before flashing? That often helps especially if the ESP was paired before.
Yes, and I already tried out a brand new ESP. Same result...
It's hard to say, but the 2.0 lock is supported and users have confirmed it works.
You can try:
- make sure your lock and ESP are in close proximity
- factory reset your lock. Not convenient, but it does help from time to time
- observe serial logs, for example with hterm. Baud rate is 115200
2 Meters should be close enough I guess? Will try the factory reset on the lock :)
2 meters should be fine.
After reset of the lock. Do I have to pair with the Smartphone App first?
No not necessarily, but it maybe makes things a bit easier, you can for example check paired devices
Ok, I resetted the lock. Paired with the App again. Took a brand new ESP and flashed NukiHub. Still not able to pair with the lock :(
Very strange. Could you check with an older version of NUKI Hub? There were quite a few changes recently, though I don't believe any related to pairing. 8.30 for example
I am also having issues pairing my Nuki Lock 3.0 with Nuki Hub version 8.33 on a brand new ESP. I have a different ESP (that I want to replace) running 8.32 that had no issues pairing with the lock. Maybe this has to do with version 8.33?
Read your comment right after posting mine @technyon and just installed 8.32 on the new ESP. Was able to pair my Nuki on the first try. So at least for me it seems to be connected with 8.33
Ran through the diff between 8.33 and 8.32 (https://github.com/technyon/nuki_hub/compare/8.32...8.33) but can't find any obvious changes that explains why 8.33 would have trouble pairing.
I agree there's nothing obvious in the diff. We changed from sdk 2.0.9 to 2.0.14 though, that would update the bluetooth stack as well. Could you retry with this build? It's 8.33 rebuild with sdk 2.0.9.
Thanks! I am currently on a weekend trip, will test it on Monday
@technyon I tried that build. But sadly no pairing possible :(
Also tried 8.30. Also no pairing possible. I also resetted the lock again and didnt paired with the app first. Also no success with Nukihub. Anything else what I can try?
Ok, weird thing. Not I got it paired. I set a username and password before pairing. No, it paired without a problem. Could that be a reason with username and password didnt set?
Do you mean credentials to log into nuki hub?
Yes, exactly
I agree there's nothing obvious in the diff. We changed from sdk 2.0.9 to 2.0.14 though, that would update the bluetooth stack as well. Could you retry with this build? It's 8.33 rebuild with sdk 2.0.9.
Thanks for supplying the 8.33 build with the old SDK @technyon 🙏 I was able to test it out now. However, I still have the same error – pairing is not happening. In the log there is just a continuous stream of
Nuki lock start pairing
messages. However, after setting the Lock PIN in the settings, there is also a continuous and very fast spam of this error message:
scan_evt timeout
interrupted by the occasional Nuki lock start pairing. I hope that helps!
I just went back to the "regular" 8.33, flashed and configured it while having the console open. When configuring the Wifi, 8.33 with the new SDK does not list the APs for me. Both 8.32 and and 8.33 with SDK 2.0.9 do that. The error in the log with 8.33 is
*wm:[ERROR] scan waiting
No idea if that is relevant 🤷♂️
However while typing this message, after trying to pair the lock with the "regular" 8.33 again, it suddenly worked 😵💫. I did absolutely nothing different. Operating the lock via MQTT is slow and not 100% reliable, but it is working. Distance between the ESP and the lock is ~1m. I am rather confused right now…
Operating the lock via bluetooth can be slow, it's more or less expected. It should be reliable though, you can increase the number of retries if necessary. All of this points to reception problems, though 1m is more than close enough. Does control with the smartphone app work without problems?
Controlling it with the smartphone app works without problems, yes. I also use Auto Unlock, which works from a considerable distance. Honestly, I am at the point where I just ordered the official Nuki bridge and opener 😅. Even when the connection between ESP and lock was working reliably < 8.33, the hub went inactive in Home Assistant after a few hours, sometimes a day and needed to be restarted. I guess the official bridge will make it transparent if the reception problems came from the lock or the ESP.
You can enable restart if no beacons received, at least it should restart on it's own.
I can confirm the pairing problem with Nuki Hub 8.33 and a Nuki Lock 4. It is a fresh ESP32 with a fresh Nuki Lock. After downgrading to Nuki Hub 8.32 via OTA, the lock immediately paired.
I agree there's nothing obvious in the diff. We changed from sdk 2.0.9 to 2.0.14 though, that would update the bluetooth stack as well. Could you retry with this build? It's 8.33 rebuild with sdk 2.0.9.
I can confirm, that with this version pairing with my Nuki Lock 4.0 worked right away. Thanks!
I've paired ESP32, ESP32-S3 and ESP32-C3 devices without issue to a Nuki Lock 4.0 Pro using Nuki Hub 8.33 and 8.34. As Nuki Hub has only been build for the S3 and C3 with 2.0.15 it is unlikely that there is a structural problem with the newer Arduino Core version.
Pairing can sometimes be finicky but there is no structural problem with Nuki Hub 8.33 and up. Pairing is confirmed working in both app and bridge mode on multiple different ESP's (all models) with Nuki 4.0 and Nuki 4.0 Pro on 8.34.
When pairing is difficult it can help to restart the ESP a couple of times (when pairing fails within 60 seconds) and restarting the pairing process on the Nuki Lock/Opener a couple of times by pressing the button. Eventually it should pair.