Cameras and HA to me seems to be some kind of unicorn, so… LoL
I have 3 types of cameras at home:
- Ubiquiti G3 Instant (FHD) on Unifi Protect
- Ubiquiti G4 Instant (2K) on Unifi Protect
- Ubiquiti G5 Flex (2K) on Unifi Protect
- Sonoff gk-200mp2-b (FHD)
I’ve configured all of it on go2rtc and to view on frontend I’m using WebRTC Camera custom component.
The Sonoff is connected to the go2rtc using rtsp directly from the camera.
The Ubiquiti ones are connected using rtsps (to work well I’m using rtspx, honestly I don’t know the difference) to the Unifi Protect.
My HA “server” is a VM running on Proxmox connected via cable directly on the Ubiquiti Dream Machine (Unifi Protect server also) and my PC is connected via cable directly to the UDM too, so the connection should be really stable.
My HA server and host are running with more than enough resources.
So here comes the questions:
1- Some cameras (the FHD ones) are being streamed in RTC, the 2K ones in MSE. Do you know why? Is RTC better? If yes how to “force” the 2K cameras to RTC?
2- I use the WebRTC Camera custom component because it has much better controls (Mute, PIP,…) and is better to use than the HA “regular one”. Is there a better way? P.S.: I use a lot the PIP function.
3- One last question, sometimes my camera stream is working just fine on pip (picture in picture) and with no apparent reason is just freezes the stream (stays like a picture), I have to close the PIP and open it again. Do you know what may be happening?
My go2rtc config:
streams:
john:
- rtsp://user:[email protected]:554/av_stream/ch0 #Sonoff FHD
- ffmpeg:john#audio=aac
mary:
- rtspx://192.168.10.1:7441/abcdefgh #Ubiquiti 2K
- ffmpeg:mary#audio=aac
garagem:
- rtsps://192.168.10.1:7441/qwertyu #Ubiquiti 2K
estar:
- rtspx://192.168.10.1:7441/drmifa #Ubiquiti FHD
- ffmpeg:estar#audio=aac
...continues
WebRTC Camera card:
type: custom:webrtc-camera
url: rtsp://homeassistant:8554/john?mp4 #FHD RTC
ui: true
muted: true
type: custom:webrtc-camera
url: rtsp://homeassistant:8554/mary?video=all&audio=all #2K MSE
ui: true
muted: true
type: custom:webrtc-camera
url: rtsp://homeassistant:8554/garagem?mp4 #2K MSE
ui: true
muted: true
type: custom:webrtc-camera
url: rtsp://homeassistant:8554/estar?mp4 #FHD RTC
ui: true
muted: true
…continues
Thanks!!!