Not depending on NUKI here, but on HA to perform an API call that already works with the bridge currently.
I have a few addresses that I can use (beyond the DHCP range that my ISP uses) but it is very limited and I have used it for a variety of network devices (2 x NAS, switchm, 3 x wireless AP, printers…) and don’t have enough for the ton of IoT stuff in my house.
So unless HA can auto discover the bridge IP addres sduring reboot using the API call that I provided, I need to manually update it each time the lease expires and a new IP is handed off through DHCP.
That sucks not having enough static leases. You could try to raise your DHCP lease time to a week? They you only deal with the issue when your router reboots and loses his DHCP lease table.
I’d be happy to help by trying using my own Nuki Opener.
It’s actually well recognised as mentioned by @Larx, but unlocking/locking feature itself seems not to work…
Did you try the service lock.open for the Nuki Opener?
For me, lock.unlock activates “ring to open”. lock.open actually activates the door opener. That fooled me in the beginning, but seems quite logical in retrospect.
However, the Opener sometimes goes offline for me in HomeAssistant, but reappears after some minutes.
You are right, it actually works ! I missed the lock.open service.
I could bring a button in lovelace, calling for this service and my opener works.
But how to bring this button through Homekit now ?
Because HomeKit just received the default lock.unlock one and that’s it…
I understand the meaning, but I don’t think this is so useful as lock.open…
Thanks for posting this solution to the door sensor but my door sensor state just shows ‘closed’ all the time even when the door is open. I tried changing the bridge API call to /lockstate and /list but did not see any difference. I also tried the code posted by @svh1985 and got the same result.
Both the /lockstate and /list return the correct values on the web browser and so does the nuki app. Its just it doesn’t change in home assistant.
Below is the template I used:
binary_sensor:
platform: rest
name: Front Door Sensor
device_class: door
resource: http://192.168.1.30:8080/lockstate?token=XXXXXX
value_template: >
{% if value_json[0].lastKnownState.doorsensorState in [ 2, 3 ] %}
{{ value_json[0].lastKnownState.doorsensorState == 3 }}
{% else %}
Unknown
{% endif %}
Can someone please help?
Please ignore - finally got it to work. User error
I want to get a nuki smart lock, but have a question for the home assistant integration: Is the opener also integrated, can it fire events if someone rings at the door, and is it possible to turn off the bell from Home Assistant?
As for me the Opener does not integrate with the doorbell signal, I can only answer the first part of your question:
Yes, at least for me the Opener was recognized without any further work by the HA Nuki integration. Ring-to-open functionality is activated by service lock.unlock, door opener by lock.open.
ah ok, I used the Nello opener till they stopped the service, and I really liked that it fired events when somebody ringed at the door, so I could notify myself for example if I have headphones on and couldn’t hear the bell. If the nuki integration would have this feature I would buy it instantly
Hi,
since bridge API update last year it is possible to get the Opener bell ring event. I guess a dev could integrate in few minutes for easier nuki integration. Miss that feature too… in my understanding it is possible to register a callback url. So all we need is a webhook? as trigger in Homeassistant to fire a bell ring event???
I tried this in the meantime and it was really easy. Once you setup the callback in nuki bridge just publish a mqtt message in homeassistant and voila, perfect to use in automation as bell ring event.
Use this payload instead:
payload: ‘{{ trigger.json.ringactionState }}’
I used as topic: nuki/klingel
Only thing to do is create 2nd automation with trigger mqtt, mqtt topic nuki/klingel and True as payload
i create my lock, script, sensor on my HA because with integration (need bridge on internet) my smart lock every day is offline. I have problem with my bridge(?) or smartlock(?) when is on internet. I stop internet connection bridge on router. Only LAN.
Pardon my ignorance.
I just read through the whole thread and I have one question.
Is this lock local control?
I see some posts hinting that. Or did I misunderstand something.