[Support]: Home Assistant with "WebRTC Camera" and Frigate Setup #21015
Describe the problem you are havingI was using the "WebRTC Camera" integration in the past with my Tapo C320WS camera to have a latency less and two way audio possibility in Home Assistant. Now I throw away MotionEye as it was not really working good for me and moved over to Frigate. I started having go2rtc enabled in Frigate but now switched on using the go2rtc streams provided by the "WebRTC Camera" integration. I think its better to just have one access to the camera rtsp instead of two. I am just asking myself if that is the best way to do it or if there would be better approaches, how they look like and what kind of advantages they have. Version0.16 What browser(s) are you using?Google Chrome Frigate config filemqtt:
enabled: false
birdseye:
enabled: false
detectors:
cpu:
type: cpu
#go2rtc:
# streams:
# dima-cam_main:
# - rtsp://user:pass@192.168.178.17:554/stream1
# dima-cam_sub:
# - rtsp://user:pass@192.168.178.17:554/stream2
cameras:
dima-cam:
ffmpeg:
inputs:
# rtsp://127.0.0.1:8554/dima-cam_main
- path: rtsp://192.168.178.4:8554/camera.dima_cam_hd_stream
input_args: preset-rtsp-restream
roles:
- record
# rtsp://127.0.0.1:8554/dima-cam_sub
- path: rtsp://192.168.178.4:8554/camera.dima_cam_sd_stream
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: true
objects:
track:
- person
- dog
- cat
- racoon
- squirrel
- bird
- fox
- rabbit
- skunk
motion:
enabled: true
contour_area: 50
snapshots:
enabled: true
timestamp: true
bounding_box: false
clean_copy: true
retain:
default: 30
mode: motion
record:
enabled: True
retain:
days: 3
mode: motion
detections:
pre_capture: 30
post_capture: 120
retain:
days: 30
mode: motion
detect:
enabled: false
version: 0.16-0Relevant Frigate log outputNot relevantRelevant go2rtc log outputNot relevantFFprobe output from your cameraNot relevantFrigate statsNo response Install methodHome Assistant Add-on docker-compose file or Docker CLI commandNot relevantObject DetectorCPU (no coral) Network connectionWired Camera make and modelTapo C320WS Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Replies: 3 comments 6 replies
|
Based on your setup, using Frigate's built-in go2rtc is the recommended approach rather than relying on the WebRTC Camera integration's go2rtc instance(1)(2). Recommended Configuration: Enable Frigate's go2rtc and configure it to connect directly to your camera(1): go2rtc:
streams:
dima-cam:
- rtsp://user:pass@192.168.178.17:554/stream1
dima-cam_sub:
- rtsp://user:pass@192.168.178.17:554/stream2
cameras:
dima-cam:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/dima-cam
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/dima-cam_sub
input_args: preset-rtsp-restream
roles:
- detectWhy This Approach is Better:
Your current approach of using the WebRTC Camera integration's go2rtc creates an unnecessary extra layer and prevents you from leveraging Frigate's optimized streaming pipeline(1)(2). 📚 Sources: Have another question? Just tag @inkeep. |
|
For two-way audio with your Tapo C320WS camera, you need to configure go2rtc with the Tapo protocol(1): go2rtc:
streams:
dima-cam:
- ffmpeg:https://192.168.178.17/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=pass#video=copy#audio=copy#audio=opus
dima-cam_sub:
- rtsp://user:pass@192.168.178.17:554/stream2
- ffmpeg:dima-cam_sub#audio=opus
dima-cam_2way:
- tapo://user@192.168.178.17The For the Lovelace Dashboard Integration: Once Frigate's go2rtc is configured, you can use the Home Assistant Frigate Integration to add camera views to your dashboard(2). The integration provides first-class support and will automatically use Frigate's live streams(2). To enable two-way talk in the Frigate UI, see the Live View documentation(2). Audio Configuration: If you want to enable audio detection events as well, add the audio role to your camera inputs(3): cameras:
dima-cam:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/dima-cam
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/dima-cam_sub
input_args: preset-rtsp-restream
roles:
- detect
- audio
audio:
enabled: TrueThe stream with the 📚 Sources: Have another question? Just tag @inkeep. |
|
You're correct to point out the need for clarification. Based on the available documentation, here's what I can confirm about configuring go2rtc streams for Tapo cameras: For Tapo cameras with two-way audio, the go2rtc configuration should include separate stream entries(1): go2rtc:
streams:
dima-cam:
- rtsp://user:password@192.168.178.17:554/stream1
- "ffmpeg:dima-cam#audio=opus"
dima-cam_sub:
- rtsp://user:password@192.168.178.17:554/stream2
- "ffmpeg:dima-cam_sub#audio=opus"The documentation shows that for audio support with both MSE and WebRTC, you need PCMA/PCMU or AAC for MSE, and PCMA/PCMU or opus for WebRTC(2). The For the Lovelace dashboard integration, once Frigate's go2rtc is properly configured, the Home Assistant integration provides live stream support(2). However, I don't have specific documentation about the If you need detailed Tapo-specific two-way audio configuration, I recommend checking the GitHub discussions or visiting the official documentation for the most current guidance. ** 📚 Sources: Have another question? Just tag @inkeep. |
okay, I went the way like this:
with that I have achieved all my goals:
thanks for all your help @hawkeye217