core
core copied to clipboard
Nuki Opener: No more events
The problem
I don't get any events from my Nuki Opener anymore using the nuki integration. Opening works fine, the device is responsive but there are no events fired into Home Assistant at all for some time already (likely started with 2023.1.x)
What version of Home Assistant Core has the issue?
core-2023.6.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
nuki
Link to integration documentation on our website
https://www.home-assistant.io/integrations/nuki/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @pschmitt, @pvizeli, @pree, mind taking a look at this issue as it has been labeled with an integration (nuki
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of nuki
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign nuki
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
nuki documentation nuki source (message by IssueLinks)
Also notice this feature missing. Would be great to have it working again, as I use it to broadcast on the googles that someone was ringing.
Interesting, as I don't have an compatible doorbell anymore I couldn't test this. I'll have a look at the issue
@pree Happy to support with any debug logging or something. My bridge wasn't updated (I think) and is currently sitting at 1.10.1 at the Opener, 2.15.0 on the bridge, the bridge is discoverable and HomeAssistant is able to enable RTO.
EDIT: I also went into the API from the bridge and can confirm that the bridge does have a Webhook configured with the right IP, not sure about the path but maybe you can say, the URL requested is http://10.0.8.95:8123/api/webhook/09246f1fa0442c15dcc7eaef7abc2c5f
Deleted previous comment, the JSON was malformed.
OK so I can send manual requests to the web hook endpoint in HAS and the get accepted. However, I currently can't read the code completely to understand how to manually construct a ring event being sent to HAS
Same here - no ring events for quite a while. Worked flawlessly some time ago.
Webhook is registered correctly.
I don't know if this information will help, but 2 days ago I received a notification triggered by this event. I thought it was fixed, although it only worked once, and then it stopped working again. I could not find anything on the logs, neither from it working or not.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is still not fixed.
I tried listening to "unlocking" and "unlocked" from the Nuki Opener to trigger my front door via a SwitchBot Bot (really old intercom with no direct integration), but no events at all. The state switches between "locked" and "unavailable"
Yes, it's definitely a HomeAssistant issue. The nukio HomeBridge plugin still reacts to the webhook events perfectly fine.
I have done some more research and was able to do a workaround to trigger an automation when someone rings my bell. It seems that something is broken between the webhook, that Nuki bridge triggers, and the Nuki event in home assistant.
This was what I did, hope it helps someone in the meantime:
I used this documentation to add a new callback to the Nuki Bridge that will call a home assistant webhook (http://HA_IP:Port/api/webhook/UniqueString).
This will trigger an automation every time Nuki reports something to Home Assistant. I used a condition template to check if it was regarding my opener ( {{ trigger.json.nukiId == OpenerID}} ). I used the List Endpoint from Nuki API to check the nukiId for the Opener, but you can first print the JSON received and check the IDs there.
Can confirm that this works as expected and I do get events although not always. Have you removed the original hook before?
I didn't remove the original hook, as I think it still works to update the other properties. Just added a new callback and use that one on my automations.
There is a new binary sensor that triggers when the doorbell is pressed, have you tried trigger an automation using this? @joaofreire11
@pree in which Version? I don't see it in my HomeAssistant yet
With the official Nuki integration? I also don't have it. I even removed the devices and added them again. The Opener doesn't have any sensors.
Yes, with the official integration. It was merged on Jan 12th but hasn't landed in a release yet. Should be in 2024.2.0 then.
Great, thanks for the update @pree ! Happy to give it a try with the next release :)
I'm checking it. I can't test this hypothesis right now: as webhook support was added here (https://github.com/home-assistant/core/pull/88346), and as the event is currently only sent inside the polling strategy method when the opener state changes, maybe it could be that the webhook updates the opener, and this condition doesn't pass anymore (The condition that triggers the event).
Initial: ring = false
Webhook called: ring=true
Polling: old_ring == new_ring? No, they are the same, so no event
I'll find some time to check it, if nobody else is working on it.
Btw, I've just seen that the new binary_sensor was added. Maybe it would be better to just deprecate the event, as it adds no value now (?)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.