Since some people liked the solution on github for the presence sensor, i post this again on the “right” forum. To use nuki hub for presence, just add this as an mqtt sensor:
mqtt:
sensor:
- name: "nuki_presence_sensor"
state_topic: "nuki/presence/devices"
value_template: "{{ 'home' if 'YOUR-iBEACON-ID' in value else 'not_home' }}"
unique_id: "nuki/presence/devices_uid"
Then you have a sensor if your iBeacon ID is recognized by NukiHUB, home if recognized and not_home if you are away.
Ahh, ok. This is not just so easy, beside i am not a templating expert.
Maybe some of the really advanced users here have an idea for us.
Nuki gives us a text string like this:
I would think the most easy way would be, ha converts this to json and then we would search the right name and pick the value from this data set, but i don’t know how this is done exactly in a template.
Maybe @123 oder @Didgeridrew have an idea when reading this?
Oh my bad, i was not aware of that rule. Sorry that i tagged you, but i have read so many threads where both you made advanced templates, so i thought you could help us here.
Again sorry that i made some circumstances for you and didgeridrew.
Hello guys, thanks for this amazing project! I’m currently facing the following behavior:
if I use the function lock’n’go, the state of the lock in Homeassistant stays “open”, while the Nuki is locked, so the state is not synchronized. What I’m doing wrong? Thanks!
I don’t know also, but it is a way to extract and it works, many thanks. It’s far beyond my knowledge, but in a quiet minute i will try to understand the logic.
Since it wasn’t for me, @xaris33 here is the mqtt sensor for the rssi of your beacon:
mqtt:
sensor:
- name: "nuki_esp32_presence_rssi"
state_topic: "nuki/presence/devices"
value_template: >
{% set nuki_list = value %}
{% set pos = nuki_list.find('YOUR-iBEACON-ID') %}
{% set pos2 = nuki_list[pos:].find('\n') %}
{{ nuki_list[pos:pos+pos2].split(';')[1] }}
unique_id: nuki_esp32_nuki_presence_rssi_unique_id
All credits goes to Josh for this wonderful solution!!!
Hi,
I am trying to get a nukihub running here but the image flash constantly fails at exact 63%: with error “serial port is not ready. close any other application using it and try again”
already tried various cables
already tried other ESP32 (same type, which already worked as bluetooth proxy in home assistant
shall i try different type of ESP32 ? (C maybe??)
any other hint to get this done ?
thanx in advance
never trust a windows machine
but still I am curios what the problem is - as I saw that also on the raspi at exact 63% it kind of was stuck shortly and then immediatly switched to 100% and installation complete
very strange … looks like some final steps in the flash process which fail on the windows machine => will try another windows machine to check whether its an instance problem of that one windows setup
will keep you posted
cheerz
Does anyone have any tips for me on how to write an automation that flashes an LED every time the NUKI latch is unlocked. Even if the door is opened with Autounlock via the Nuki APP.
I installed Nuki Hub fresh and it works very well thx a lot.
I have used the MQTT auto discovery.
I have activated the unlatch in Home Assistant and I can unlatch and receive the log in home assistant.
However, If I open the door with keypad no message appears.
I only see messages if door is locked or unlocked, no unlatch.
Is there a chance to get this message?
From GitHub:
MQTT Interface
Lock
lock/state: Reports the current lock state as a string. Possible values are: uncalibrated, locked, unlocked, unlatched, unlockedLnga, unlatching, bootRun, motorBlocked
hi,
next question from my side is how to pair Nuki opener with nukihub:
I checked the “opener enabled” checkbox in nukihub admin gui
I started the opener setup in Nuki app and came to the subprocess where it says to press opener button for 10 seconds to put opener in pairing mode with bridge (which I assume is surrogates by the nukihub esp32)
I tried to reboot the nukihub, as this also worked to pair it with Nuki lock
BUT nothing happens
and nukihub web gui still shows “opener paired” as disabled
am I missing something ? or is in this case the nukihub not meant to act as a bridge …
-You should hold the button for 5 seconds, not 10 (the light should be on, not flashing).
-Try disabling and re-enabling the bluetooth pairing from the app (In the Nuki smartphone app, go to “Settings” → “Features & Configuration” → “Button & LED” and make sure “Bluetooh Pairing” is enabled.). This worked for me.