I use Frigate and I’ve used WebRTC from HACS. Since I learned of the 2024.11 release including native support for the WebRTC I was excited but I upgraded without removing the HACS WebRTC . I’ve noticed since the upgrade to 2024.11 none of my cameras stream from the entity – a static image shows and the loading spinner just spins indefinitely. All the frigate cards work great, but the entity just spins.
I looked at the Chrome console on a fresh load of the base Home Assistant URL and I see errors like this:
GET https://my-url/webrtc/webrtc-camera.js?v=v3.6.0 net::ERR_ABORTED 404 (Not Found)
and
Uncaught (in promise) https://my-url/webrtc/webrtc-camera.js?v=v3.6.0
I tried uninstalling the HACS addon and restarting Home Assistant but the problem persists. What do I need to do to get this to work? It seems I’m missing the webrtc-camera.js file in my installation.
Thanks @AlexxIT! That was the ticket to resolve the error message, I didn’t realize that the lovelace resources page was even a thing. It took me a few minutes to find it…
However, it looks like my Frigate camera entities still aren’t working with the built-in HA WebRTC stuff when I have this “Use Frigate-native WebRTC support” option checked:
I finally got this working with the help of a friend. I didn’t have my Frigate instance set up to stream RTC correctly.
I used the go2rtc dashboard of Frigate (at port 1984: http://<frigate_machine>:1984) to check it. You can click the “stream” link in the dashboard for each camera and it’ll pull up the stream in the browser. From there the top right of the frame will show MSE or RTC. I could see my streams were all still using only MSE.
I had this in my config:
go2rtc:
webrtc:
listen: :8555
streams:
front_door:
.... with all my camera definitions
but I found that I had to define the candidates in the webrtc section including the real network IP for the hardware as well as the stun thing:
go2rtc:
webrtc:
listen: :8555
candidates:
- stun:8555
- <ip of machine>:8555
streams:
front_door:
.... with all my camera definitions
Once I did that and restarted Frigate, I could pull up the streams for all my cameras and the browser would quickly switch the stream to RTC. Home Assistant entities now stream as well!