Unifi G4 Doorbell Pro - Button Press Event

I have the Unifi G4 Doorbell Pro and I am trying to set an automation that is triggered when the button is pressed (to play the chime through my Sonos).

I have set this up following the below linked guide but it is not working as the initial event is not being triggered.

Looking at the logs the binary sensor never changes from “off” when the doorbell button is pressed. I have monitored the events whilst pressing the doorbell button and I can’t see anything being triggered.

Does anyone else have this issue? Is the Pro not compatible with HomeKit yet?

Hi James,

I have had this working for almost a year with a G4 doorbell. (not the PRO)
I followed the same guide and was very pleased until about 10 days ago when this stopped functioning an I cant for the life of me figure out why.

As far as the Binary sensor goes, I have it set the following way

platform: state
entity_id:
  - binary_sensor.front_door_doorbell
to: "on"

hope that helps.

I had the exact same issue. Did a bunch of digging but based on homebridge-unifi-protect/Troubleshooting.md at ea1c878b621c5e4bbb6cf1c0f32ce8cd70793b9e · hjdhjd/homebridge-unifi-protect · GitHub tried to check for additional info. Turns out my clock between Unifi Protect and Home Assistant was off by 1 min. (HA was ahead) - after re-syncing with an NTP server things started working again, magically. - I am still not 100% convinced timing being off is the issue, but worth checking.

That was the issue.

Because of all of the electrical issues Protect doorbells have, if a ring event comes in with a timestamp more then 30 seconds in the past, it is ignored. Getting a ring event that late simply is not helpful.

Having accurate time is a very important thing. You should always make sure you have a NTP daemon running on everything.

Fully agreed! - Debugging though was a pain. If I may recommend an improvement? Maybe throwing a warning in the event log if such a case is detected vs silently ignoring it?

And I will also fully admit, I should never assume things are synced to NTP without verifying :slight_smile:

It is not silent ignored. There is a log message. It is only a debug log message though. You cannot please everyone because if the message was a warning, then you would have people complaining about it being too noisy rather than them just fixing them environment. People even complain about log messages for their Protect system being completely unreachable like that is my fault or have any control over it.

It does not help I do not really have much control over my own documentation for the integration because the core devs nitpick every detail for the docs site.

1 Like

I hear you! - Thank you for the clarification!!! :slight_smile:

Hi,

For some reason I don’t have that binary sensor for a button press at all:

What am I missing here?

1 Like

Same issue here… Had a G4 Doorbell which died on me… ordered the G4 Pro doorbell but missing the needed entity :man_shrugging:

Same issue here, looking for the entity also

OK so I fixed it. @mrmannetje @martijnDutch

My local user did not have all the permissions. I created a new role in Unifi OS

Gave it those permissions, added the local user, and reloaded the integration and bingo

1 Like

Then I had the sensor

1 Like

@robsewell, thanks!
Works like a charm now!!!

Sorry to resurrect this but I’m having the same original problem of HA not even seeing the event of a button press. I’ve already gone through and made sure the time was sync’d so I do not believe that is the issue. Any other known issues that can come up and prevent it from working?

Thank you.

Any traction on this one? I noticed that my doorbell presses stopped sending automations and I just got around to checking it and sure enough, it’s missing. Reloaded, Re-added, changed Perms…ect

Still missing :frowning:

G4 Pro (Non-POE)
Protect 2.9.42
HA 11.1

am seeing the same - was working fine for 6months - not sure whether Protect or HA upgrade broke it but cannot get it working again - not even sure the event is detected by HA anymore - plenty of other events but not doorbell pressed (annoying done have comparable logs from before)

G4 Pro (POE)
Protect 2.10.11
HA 2023.12.0 (also tried 2023.12.1,2023.12.2,2023.12.3)

2023-12-20 09:38:56.724 DEBUG (MainThread) [pyunifiprotect.api] Skipping update since websocket is active
2023-12-20 09:39:01.725 DEBUG (MainThread) [pyunifiprotect.api] Skipping update since websocket is active
2023-12-20 09:39:06.725 DEBUG (MainThread) [pyunifiprotect.api] Skipping update since websocket is active
2023-12-20 09:39:11.726 DEBUG (MainThread) [pyunifiprotect.api] Skipping update since websocket is active
2023-12-20 09:39:12.558 DEBUG (MainThread) [homeassistant.components.unifiprotect.data] Updating device: G4 Doorbell Pro (E438830C38CD)
2023-12-20 09:39:12.561 DEBUG (MainThread) [homeassistant.components.unifiprotect.select] Updating dynamic select options for Doorbell Text
2023-12-20 09:39:12.633 DEBUG (MainThread) [pyunifiprotect.data.bootstrap] last_ring for 643e2e7a01aee103e4005fb7 (True)
2023-12-20 09:39:12.633 DEBUG (MainThread) [pyunifiprotect.data.base] Event ping timer started for 643e2e7a01aee103e4005fb7
2023-12-20 09:39:12.633 DEBUG (MainThread) [homeassistant.components.unifiprotect.data] Updating device: G4 Doorbell Pro (E438830C38CD) 
2023-12-20 09:39:12.634 DEBUG (MainThread) [homeassistant.components.unifiprotect.select] Updating dynamic select options for Doorbell Text
2023-12-20 09:39:13.826 DEBUG (MainThread) [homeassistant.components.unifiprotect.data] Updating device: G4 Doorbell Pro (E438830C38CD)
2023-12-20 09:39:13.826 DEBUG (MainThread) [homeassistant.components.unifiprotect.select] Updating dynamic select options for Doorbell Text
2023-12-20 09:39:15.634 DEBUG (MainThread) [pyunifiprotect.data.base] Event ping callback started for 643e2e7a01aee103e4005fb7
2023-12-20 09:39:16.727 DEBUG (MainThread) [pyunifiprotect.api] Skipping update since websocket is active
2023-12-20 09:39:17.411 DEBUG (MainThread) [pyunifiprotect.websocket] WS Timeout loop sleep 29.99984071799554
2023-12-20 09:39:21.727 DEBUG (MainThread) [pyunifiprotect.api] Skipping update since websocket is active
2023-12-20 09:39:26.729 DEBUG (MainThread) [pyunifiprotect.api] Skipping update since websocket is active

got around this by swapping the automation to trigger on change “G4 Doorbell Pro Last Doorbell Ring”