NUKI Hub firmware for the ESP32

then I make the connections you said and connect the 3.3v pin on the module and on the esp? THK

Thanks for the support, but I double checked the connections so many times and connected the 3.3v pins on the module and the esp but it doesnā€™t work. I abandon the module and stay with the wifi hoping that it is stable enough, it is 99% at the moment

I have several ESP32 modules and the wifi connection was never a problem (except you have a bad signal strength). Give it a try, my nuki esp works over months without wifi problems.

my wifi network is stable, and as a computer scientist I always want to wire everything :smiley:

Thanks for this keep up the good work

Will it run on this Lolin32 Lite (reporting as ESP32-WROOM-32)?

Read on GitHub - technyon/nuki_hub: Use an ESP32 as a Hub between a NUKI Lock and your smarthome. bout Devkit 1 not working and I think this one reports as such (in logs with stock ESPHome firmware). At the same time it is definitely not this hardware mentioned in the linked section: Cannot connect to the smartlock Ā· Issue #39 Ā· technyon/nuki_hub Ā· GitHub

In short: Is anyone running Nuki Hub on this Lolin32 Lite?

1 Like

Can anyone say if this board (Lolin32 Lite) is working with Nuki Hub and Lock 3 Pro?

Hi - thanks for the awesome work on this. I finally received my ESP32 module today, and managed to flash and configure it as a Nuki hub with homeassistant.

Since I do have a bridge as well, I currently have configued the module as Register as app. Control via Homeassitant works great, and I believe MQTT appears to be configured correctly (HA is showing updates to the bluetooth_signal_strength and wifi_signal_strength every few seconds).

However:

  • I also used to have an automation with the custom nuki integration where I could trigger some lights when the door was unlocked (when it was dark outside). Unfortunately the lock status is NOT updating in Home Assistant at all.

  • If I use my Nuki app (my wife uses this to auto-unlock when she gets home) then Homeassistant is NOT updated with the current state of the lock immediately. It stays as the old state.

How long should an update to the lock/unlock state take to reflect in Home assistant?

Edit: I have a Nuki 2.0 smartlock with bridge

The new state should be updated within seconds. Please check in MQTT if the ā€œlock/stateā€ node changes to the new state (from locked to unlocked or vice versa).

Thanks. I did a few more tests and looks like the door sensor is updating immediately however the door status (lock/unlock) is where the issue is.

I had it working last evening with updates within seconds, however overnight it seemed to not update at all (until the 300s interval that I had configured).

Interestingly opening the door (triggering door sensor) appears to push through ā€œstuckā€ door status updates as well, and then further status updates occur within seconds.

Bluetooth interference perhaps? Wifi is at 49db and bluetooth is stable between 66 and 70db.

We need to figure out where the problem is:

  • You can open the web portal of the NUKI Hub device and check the status there. If itā€™s wrong there, the problem is most likely somewhere with bluetooth
  • Use an MQTT client like MQTT Explorerer and check if the MQTT node has been updated. If not, something with MQTT or the network is wrong.
  • If the MQTT node is updated, but it doesnā€™t show up in HA, something with HA is not working as intended

Just went through the stepsā€¦ Thanks for pointing out MQTT Explorer, havent used it before but very handy tool indeed.

  • You can open the web portal of the NUKI Hub device and check the status there. If itā€™s wrong there, the problem is most likely somewhere with bluetooth

This seems to be where the issue is. ā€œNuki Lock Stateā€ takes some time to update. Again, it works most of the time - but after several hours of inactivity it seems to get stuck.

Might try and see if a scheduled restart every morning at 5am fixes this issue. This would be the ā€œRestart timer (minutes; -1 to disable)ā€ setting right? Not sure if I can trigger this from HA itself.

Thinking about it, running it in parallel with a bridge could be the problem here. The lock signals via the beacon that thereā€™s an update to the state. Both devices should pick this up and query the new state. If for some reason the ESP misses the beacons, but the bridge already requests the new state, the ESP will miss the update.

This is definitely a possibility - Iā€™ll power down the bridge for the next 2-3 days and see what the outcome is.

Very interesting. Keep us posted.

The first 24hr report is quite positive. Since turning off the Nuki bridge (but still keeping Nuki Hub in app mode, in case I need to power it again) - I have had no dropouts. Even during the long overnight period where I was having issues for the past few days. Updates into HA have been snappy and within seconds. Will keep monitoring for the next day or two.

1 Like

Sorry to ask again but i use the smart lock 3 with a bridge in combination with nuki ng.
I use the auto unlock function in nuki app which unlatches the lock and holds it for 10 seconds.
This works ok but sometimes you need to wait for like 8-9 seconds until the lock closes/latches.

I want to have the same functionality like with a nuki door sensor. I red about this will latch instantly when the sensor is closed. The only problem is that i dont own a nuki door sensor but an aqara one.

Is there any way to close/latch the lock instantly when my door sensor gets closed? or is the only way to spent some money on the nuki door sensor?

Thanks good to know. Keep me update, I can add it to the troubleshooting section. It seems thereā€™s a reason why they only allow one device that acts as a bridge.

Hi - just an update. After about 48hrs without issues, I decided to power on the Nuki Bridge to see if the issue would return - and it did manifest. So yes, if you have a Nuki Bridge (in app mode) and a Nuki Hub running in the same vicinity of the lock then it does appear that occassionally events will be missed.

I suspect that the same would also happen if you tried to pair Nuki Hub (in bridge mode) alongside a Nuki Bridge - but I am not running this configuration.

The solution is to only run one at a time. I am very happy with the reliability and speed of updates with Nuki Hub. My measurements showed sensor/lock status updates populated into HA within 1.5-3 seconds of them occurring.

Hi, thanks Iā€™ll advice against it in the readme. If you disable ā€œPair as appā€, you canā€™t pair NUKI Hub alongside a bridge. Itā€™s not really mode, just a flag when pairing. When a device pairs as a bridge, the previous bridge is unpaired and disconnected from the lock ā€¦ and I see now why they did it.

1 Like