NUKI Hub firmware for the ESP32

Hello and thank you for this great work. After first using unsuitable ESP32, I can now get the Bluetooth connection and the connection to the Mqtt. But unfortunately I’m probably too stupid to integrate the whole thing into HA. I configured the following according to the pictures:


However, I can’t see the entities in HA. Despite hours of testing, its empty

Anyone have an idea? It is actually planned to use the connection of the Nuki via the HA platform in Homey. The HA Top is suitable for this… But unfortunately I fail here…

@Kai102
There must be something wrong with the discovery of the lock. Normally you should have a state in MQTT Explorer. Mine looks like this:

image

According to this, NUKIhub should show the state too:

Second thing, for autodiscovery the topic normally is homeassistant. It should be set here in NUKIhub:

And in my HA it looks like this:

If its working right in NUKIhub you should have 2 topics in MQTT, nuki for the state of the lock etc and homeassistant for the autodiscovery. But at first you should have to check why the lock state isn’t shown.

@streetjumper16
Yes you can, just make an automation, trigger by entering your zone and make an action to unlock your opener. Unlocking it means to enable RTO, how long RTO is enabled you have to configure before in your opener with the nuki app.

Same here, did you manage to get it faster?
I remember that it was 1-2 seconds in the past
I think it is something with the last update of the Nuki Lock device and not the esp32 device

@madface
It’s going ok ! The problem was … (I don’t know :slight_smile: )
I reinstalled the Nuki lock again. It worked on the third attempt, but then everything was there all of a sudden. 15 entities found. And quickly the integration into Homey and then it looks like this:

From here I can continue to control everything I want (love the Homey :wink:… HA is a great thing and can certainly do everything that the Homey can do, but with the Homey I feel in better hands and use it therefore HA only as a bridge, but that’s very much appreciated…
The correct ESP32 is important. I use this one here

and they work. The ones currently offered by AZ unfortunately already fail with the 2nd project (this one and Miflora …)

Thx

okay, little bit to early for Happiness!

:frowning:

2 Likes

The type of the esp32 shouldn’t make a difference in my opinion, since the chip is always the same.
I use this one:

https://www.amazon.de/AZDelivery-Bluetooth-Internet-Entwicklungsboard-kompatibel/dp/B08BTLYSTM/ref=sr_1_4?__mk_de_DE=ÅMÅŽÕÑ&crid=3KDM2R395NT6K&keywords=az+delivery+esp32&qid=1681571401&sprefix=az+delivery+esp3%2Caps%2C82&sr=8-4

Since it has not pin header i though it has more charme :wink:. But i should work with your one either.
Maybe the distance is too far to the lock. If you reboot the esp, does it show the state after rebooting?
Maybe the logs could help, to set up a sensor with the logs, it’s a little above:

If the lock state is “undefined”, NUKI Hub will not publish auto discovery topics. I means the communication with the lock failed, so there it 1. makes no sense to publish anything and 2. it needs to query the lock to decide wether to publish some topics or not (e. g. wether to publish the door sensor topic).

If you have a Pro lock, it’s now official that you can’t use Wifi and NUKI Hub (or the official NUKI Bridge) at the same time. As soon as you enable Wifi, communication with NUKI Hub stops.

Hello, I have nuki integrated in home assistant via esp32 it works fine , I bought a nuki keypad, is integrated with the nuki app and works perfect, but I cant integrate to home assitant I clicked "Enabled keypad control via MQTT" but after this I´m lost. I´m trying to follow the steps by the github page but I don´t know too much about mqtt, I go to services and mqtt:publish I tryed to wright something like this, but I dont know if is the way…
topic: nuki/keypad/command/name
payload: user

Hi
Is it not possible extend maxim number Characters in passwords. Like Mqtt password. ?

I have a password provided by the system and it’s more than 30 characters.

Br

Does anyone knows if the fingerprint sensor in the Nuki keypad 2.0 is also supported?

It’s a fixed limit compiled into the firmware. You’d need to change that limit and recompile the firmware.

Adding and updating codes on the Keypad 2.0 is supported, but NUKI Hub doesn’t provide any functionality for the fingerprint sensor.

1 Like

Great project. Did some tests with it. Only thing I am facing is that it’s kinda slow. It I use the Bluetooth Nuki app on my phone everything is instant.

If I use the Nuki esp bridge it takes like 4-10 seconds before an action takes place. Is this as expected or should it be instant?

My MQTT is encrypted, but is instant, there is no delay there with other applications. I have configured the Nuki hub as bridge, not as app.

I don’t think the delay is on MQTT side. How’s the bluetooth reception on the ESP … how far is it from the lock, are there any walls in between?

There is one thin wall between the lock and the ESP and the distance is about 2 meters total. Reception is around -65dBm and I am using the M5stack ATOM lite ESP32.

It’s hard to tell what the exact issue is. 2 meters sounds fine, maybe you can still move it closer at least for testing. For me even with the app it sometimes takes a moment the lock action starts.

1 Like

Nice Project,
I am having problems adding it into Home Assistant

Do I have to install the Nuke official Nuki Lock Integration via hacs? If so, where do I gute the Bridge API Token?

What should I do to get the thinks into my home assistant installation.

Thanks for your help

Hi ChrisBeeChicken,

did you read the information from the project website on GitHub?

You don’t need the Nuki Bridge (this project is about replacing the Nuki bridge with an ESP32). You need an ESP32 and MQTT in Home Assistant.

Alternatively you can also check out different installation method like the Core Integration or Nuki ng