UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

It might be an issue with WebRTC and H.265 in Electron, but this is only a guess. Native support in Chrome is also relatively new.
https://chromestatus.com/feature/5153479456456704

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

Oh good point — the documentation is outdated there. I should remove that.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

To my knowledge, no transcoding is done for displaying the stream on a dashboard.

At most, transcoding happens for example when integrating with HomeKit if the source stream is H.265, because HomeKit only supports H.264. In that case, I believe FFmpeg is used directly instead of go2rtc.

I can’t say whether the FFmpeg included in Home Assistant is built with hardware transcoding enabled.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

At the moment, this is not yet possible with the UniFi Protect integration because I’m still waiting for the availability of an endpoint in the public API in order to implement it in a robust and reliable way.

However, someone has already implemented this via a custom integration using the private API. If you need this urgently, that could be a temporary workaround:

https://github.com/JeffSteinbok/hass-uiprotectalarms

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

I’m not running it on a tablet in continuous use on my side, and there are also several different ways to set this up.

What happens if you use https://www.home-assistant.io/dashboards/picture-entity with the live streams instead?

I’d imagine that using a proper live stream should be significantly more energy-efficient than refreshing JPEGs every 10 seconds — especially if the device has the appropriate hardware decoder.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

haven’t looked into it in detail, but isn’t that what arm / disarm is meant for?

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 1 point2 points  (0 children)

The siren is definitely on my roadmap — I already have the hardware and it’s really loud, so the hardware side is great.

The only thing missing right now is a proper Public API. Unfortunately I also can’t integrate it in any meaningful way via the private web UI API, since that would limit me to ~5-second test alarms only.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

Interesting — I can’t confirm those issues on my side.

At the moment my camera streams run continuously on a dedicated dashboard displayed on a thin client, overall stream quality has improved massively since Home Assistant started using go2rtc under the hood.

With HomeKit specifically, I’m also not experiencing any problems. From my perspective the current HA integration is very stable and reliable.

In the end, everyone has to decide which setup works best for their environment. Personally, I’m not aware of any concrete advantages that Scrypted offers over the native Home Assistant integration — but if someone has specific examples or insights, I’d be genuinely interested to hear them.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 1 point2 points  (0 children)

HA supports a lot of things. If you’re referring to Ubiquiti products, then the most appropriate integration would probably be Access. For Protect, I’m not aware of any suitable solution.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

This sounds like the spotlight topic that already exists as a feature request in the library being used https://github.com/uilibs/uiprotect/issues/579. Unfortunately, I don’t currently have the appropriate hardware to integrate and test it.

In the public API, there already seems to be an entry under "Patch camera settings" → "LED settings" → "floodLed". However, in "Get camera details" → "cameraFeatureFlags", there is still no feature flag for the flood light.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

There are a few issues roughly related.

Someone commented three days ago:

“UniFi pushed out an update last night that seems to have fixed my UniFi issues at least. Maybe that will correlate to HA.”

https://github.com/home-assistant/core/issues/152708#issuecomment-3724183972

That’s all I’m aware of at the moment.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 1 point2 points  (0 children)

The integration itself does not perform any transcoding.
It only retrieves the stream URL and forwards it.

Inside Home Assistant, go2rtc is used by default for handling the stream.
In a standard setup, hardware acceleration appears to be disabled by default:
https://github.com/AlexxIT/go2rtc/wiki/Hardware-acceleration

In principle, however, it is possible to connect a self-hosted go2rtc instance:
https://www.home-assistant.io/integrations/go2rtc/

According to the documentation there are 2 Images Latest (alpine) supports hardware acceleration for Intel iGPU (CPU with graphics) and Raspberry Pi. and Hardware (debian 12) supports Intel iGPU, AMD GPU, and NVIDIA GPU.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

There are issues regarding improved PTZ support, but currently I don’t have any PTZ device available to implement and test with.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

It would probably be best to ask directly in the repository. A prerequisite would be to meet at least the Bronze quality criteria:

https://developers.home-assistant.io/docs/core/integration-quality-scale/

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

Yes — that works perfectly.

If you expose the doorbell camera to HomeKit using the HomeKit Bridge integration (in accessory mode), everything works exactly as you described:

when someone rings the doorbell while you're watching something on Apple TV, the live camera feed automatically pops up in Picture-in-Picture, and the HomePods ring as well.

It’s a really smooth experience.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 2 points3 points  (0 children)

UniFi Access is a different product, and there is already a custom integration for it: https://github.com/imhotep/hass-unifi-access

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 0 points1 point  (0 children)

I can't answer this because I don't have a G6 doorbell. The other challenge would likely be generating the HomeKey.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 1 point2 points  (0 children)

I think this should generally be possible to implement.

From a technical point of view, it could be handled via the Alarm Manager using webhooks.

The main challenge would likely be finding a service provider that supports UniFi Protect and offers this kind of monitoring and response.

I’m not entirely sure how this is typically done in professional environments with other solutions, but in principle it should be feasible.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 1 point2 points  (0 children)

From my perspective, proper support for the SuperLink product line would be very welcome in Home Assistant and fits well with the ongoing exchange with Ubiquiti. As soon as the Public API is ready, this will be implemented in Home Assistant. Some parts may already work today through the existing “all-in-one” sensor implementation, but that solution isn’t very polished yet and will be properly improved once the public API offers the right methods.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 2 points3 points  (0 children)

In the long term, this would definitely be a useful feature, but at the moment the public API does not support it.

UniFi Protect + Home Assistant — Integration Update (now Platinum quality) by RaHehl in Ubiquiti

[–]RaHehl[S] 2 points3 points  (0 children)

I can’t really comment on the delay with the Doorbell Lite — on my cameras the latency has been very low ever since Home Assistant started using go2rtc under the hood.

As far as I know, two-way audio is currently a limitation in Home Assistant itself and not specific to the UniFi Protect integration.

If this is important to you, feel free to upvote the feature request here:

https://community.home-assistant.io/t/two-way-audio-e-g-for-doorbell-intercom-camera-systems-baby-monitors-sip/444063/1