Unifi Doorbell Homekit Integration

Have a unifi setup at home including quite a few items. One of those items is the G4 Doorbell. I also use Homekit extensively. Prior to installing Home Assistant I have been using Homebridge to connect Unifi Protect to Homekit and it did so well, including exposing the doorbell to homekit as a doorbell and not just a video stream so that when someone hits the doorbell I get a notification within homekit and am prompted with the video stream and ability to talk to them, as though it were a homekit native doorbell.

However, in Home Assistant using the Homekit integration it only wants to expose the doorbell to Homekit as a video stream it seems. Making it not function within Homekit as a full doorbell. Am I missing someting? Is Homebridge really better at this integration than Home Assistant?

Similar issue with MyQ Garage Door Opener. Homebridge exposes it to Homekit well. Home Assistant doesn’t even offer it as an item to send to Homekit via its Homekit integration.

Essentially I am trying to avoid running both Homebridge and Home Assistant if I can get Home Assistant to reproduce the functionality of Homebridge.

I have same issue, seems that the UniFi Protect on HomeBridge is much better because it specifically supports UniFi features. When you send a camera accessory across via a Home Assistant HomeKit bridge, all it knows is the audio/video stream and no other features ie. it does not know it is UniFi. It also does not support HKSV so it seems (at least in my brief test).
Because of this, I just run HomeBridge on a small Raspberry Pi for now and all it does is run the UniFi Protect, probably will eventually move to something else and repurpose the Pi for something better. Everything else goes through HA HomeKit Bridge and works fine.

You might have more luck posting this on the developer page instead of the community page: Issues · home-assistant/core · GitHub

You need to configure the doorbell in YAML (last I checked linked_doorbell_sensor wasn’t available in the UI). So in the YAML it would look something like:

homekit:
  - filter:
      include_entities:
        - camera.your_doorbell
    entity_config:
      camera.your_doorbell:
        linked_doorbell_sensor: binary_sensor.doorbell_sensor

If you’re using the UI to configure your doorbell camera (which is recommended now), you can’t use the yaml to modify the entity_config, but you can manually edit it in .storage/core.config_entries and restart. For some reason the wrong binary_sensor had been selected when it created the config entry in my case. After that, I had to remove and re-add the accessory from the home kit side and it finally worked.

If your hardware can handle the extra load, Scrypted is a lot better at this than HA or Homebridge. HA doesn’t even support HKSV. There is an officially supported Add-on to run Scrypted in HA. Scrypted is directly linked to HomeKit.

Camera feeds and full doorbell now load in 0,1-0,2s in HomeKit when running Scrypted on a NUC with an i3-1315U. Home Assistant itself still takes about 1s to load the stream and sometimes black for 1-2secs before picture appears.

Notifications from HomeKit are now faster than from Unifi Protect itself and definitely a lot faster than a HA notification would be.

The feeds for UniFi Protect on HA are not actually delayed. Neither are the notifications. They are instant (as soon as UniFi Protect sends them). If your feeds are appeared delayed in your dashboards, it is because your HTTP configuration is not set up correctly to utilize LLHLS. Or the dashboard disconnected from the Websocket and the video feed fell behind.

Unfortunately, neither of those are things I am able to improve as the video player for the frontend just sucks so badly. It requires more-then-it-should technical knowledge to get LLHLS working correctly, and the player is just too dumb to fix itself when it falls behind from disconnects/etc.

I have complained a bunch to the stream integration owners, but the issues do not bother them since they have the HTTP for LLHLS configured correctly and do not use their players for more than a few seconds at time.

LL HLS is working, as it sometimes loads correctly instantly. Without it you would have 5-15s delay, which is not the case. I am using NGINX Proxy Add-on for local and external, as mentioned in your configuration tips.

I think it has more to with the wonky video player in HA.

But many times I see the video and the preview works, than when I click it takes a few secs to show the video that was actually playing before :sweat_smile:. I have preload/Live enabled as I have enough performance left on my HA server.

I am still using the Protect app, so whenever I need to check some footage it’s fastest and easiest to do just that. HomeKit I mainly use for the notifications as that is consistent and always fast.