HA, Nabu Casa, WebRTC and frigate config guide?

With 2024.11 we got a built in go2rtc, webrtc and relay through nabu casa, however i’m still not finding any guide on how to configure it so that i get live video streams when i’m not home.

There is a lot of info out there (some out of date, some current) and options but nothing that seems to pull it all together into something on how to make it work. Specifically looking to how to get it working for external connection on mobile device.

my environment:

  • 4 cameras all supplying RTSP streams
  • go2rtc (1.9.8) LXC container on proxmox, initially deployed because the version bundled in with Frigate was older and missing some features, not married to it can move it to the frigate server if needed
  • Frigate (0.14.0) running in docker with PCIE coral
  • Nabu casa subscription
  • frigate-card and webrtc card installed
  • frigate integration setup (latest)
  • webrtc camera integration setup pointing to my go2rtc container
  • go2rtc config in HA config.yaml pointing to the go2rtc container

I have seen a number of issues when trying to connect externally, from streams not loading to only loading images once per second, 5 second lag until you get some sort of live video etc.

Not looking for troubleshooting steps as there are so many variations it would be a lot of overhead, looking for a guide, if you were to set this up from scratch in a new HA install how would you do it

If you place go2rtc binary in frigate config folder it will load that version

You must name it “go2rtc” and set file as executable

I added frigate as a dashboard in HA.
Slow loading locally for you or when outside home? Frigate lags realtime maybe 3-5 seconds at best. Literal real time is simply not possible as I expect your cameras lag by some amount. I consider 3second lag over web is amazing.

Docs are best there are

Guides are eventually outdated almost immediately as any version update can make them irrelevant weather it be HA update or frigate

After that it’s your choice to proxy with nginx,vpn or some tailscale type setup. I proxy with no issues. Adding frigate to ha dashboard allows full function, zoom and live video without delay

Thanks, but I’m looking to get this working through nabu casa and their webrtc proxy, not to add another service on top.

and while yes guides do get outdated, at least they give you something to go on a starting point. There seems to be nothing out there that explains how the HA built in go2rtc and nabu casa proxy are supposed to work for cameras.

just updating on something i did that got it working externally with sub 1sec latency.

i added the RTSP stream generated by go2rtc as a generic camera and put that camera into a frigate card with the following config

type: custom:frigate-card
cameras:
  - camera_entity: camera.test
    live_provider: ha
live:
  show_image_during_load: false
status_bar:
  style: outside
  position: top
  popup_seconds: 30

the video feed loads instantly on the mobile app externally, so maybe thats how its supposed to work? i’m guessing it will work with the RTSP feed from the camera directly as well. I’m also able to see the stream in the built-in go2rtc server when turning on the debug_ui.

Now the question becomes why does it work on a generic camera and not on a frigate provided camera from the integration.

Misunderstood your goal

You only use one instance of go2rtc.

If using frigate you add the ip:port of your frigate go2rtc instance in config per the docs

To add camera to HA ui just add them as generic camera and use same url you use in frigate config. If your frigate config is correct ithey will be in “streams” section of frigate config

With this the cameras will be in UI and play smooth and fast.

I agree here. I think if you already have go2rtc in frigate it is unneeded but feel it adds some minor benefit that should be explained in HA docs.

thanks, I guess what I was expecting was to be able to use the camera entities provided by the frigate integration, instead of having to setup duplicate cameras by adding them as generic cameras and losing the frigate functions for snapshot and recordings that come with the integration.

Guess you can’t have you cake and eat it too.

This is entirely possible, there is no need for the generic camera integration as Frigate provides the camera entities when go2rtc is setup.

That is generally true but not in the case of HA. HA’s internal go2rtc instance uses separate ports than the defaults, they can perfectly co-exist together without issues.

How? i have frigate docker instance, setup my cameras RTSP steam in the frigate bundled in go2rtc, setup frigate to point to the go2rtc url, setup the frigate integration in HA, setup the frigate card on a dashboard. Setup HA through nabucasa, setup mobile app on IOS.

after all that stream loads fine on the LAN, but stream does not load outside the lan (externall).

what am i missing?

Where are you viewing streams? It should work if the ports are forwarded on the router

I meant, it’s not necessary.

I guess the question that’s lingering is how do you create a camera for viewing in HA UI with this?

And I guess you’re saying to use the HA ports(11984 and 18555) for camera stream and not frigates? This may not matter so much

You just use the camera entities provided in the frigate integration

I have frigate container but do not use the frigate integration.

Okay, well that would be the recommended way to only have one connection to the camera

so i think i was able to trace down the issue, i had “Use Frigate-native WebRTC support” enabled on the Frigate integration, once i disabled it frigate camera stream started to load externally just fine, utilizing the HA built in go2rtc server.

1 Like