Hello everyone,
I ve been searching around for a while to find a solution for this, and last night i finally got it after combining several github and community posts, so here is my final setup for anyone that’s interested
This config enables the mic and speaker icon in the frigate ui and when pressing it i have super snappy 2-way audio.
(the “…” in the code are indicative as i have other chunks between and should be omitted)
Frigate configuration:
...
go2rtc:
streams:
dn_lr_1_cam:
- ffmpeg:rtsp://rtspUN:rtsp:PW@cameraIP:554/stream1#audio=aac#video=copy
- tapo://appPW@cameraIP
dn_lr_1_cam_sub:
- rtsp://rtspUN:rtsp:PW@cameraIP:554/stream2
...
Where rtspUN and rtspPW are the ones you set for extra control in the tapo app in the camera settings
and app PW is the tapo app password, tested with simple characters (no special chars). Ive read it also works if you provide the MD5 hash of your pw but have not tested it.
Nothing special in the code below (it’s pretty default), just pasting it for completeness:
...
cameras:
...
dn_lr_1_cam:
ui:
order: 3 # to rearrange the cameras in my ui
ffmpeg:
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/dn_lr_1_cam # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
# - detect
- path: rtsp://127.0.0.1:8554/dn_lr_1_cam_sub # <--- the name here must match the name of the camera_sub in restream
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: dn_lr_1_cam #set to main or sub stream depending on the camera
motion:
mask: 0,0.048,0.355,0.048,0.352,0,0,0
...
The following setup also allows me to talk from the HA ui, using the frigate card integration from HACS:
HA card config:
type: custom:frigate-card
cameras:
- camera_entity: camera.dn_lr_1_cam
go2rtc:
modes:
- webrtc
live_provider: go2rtc
menu:
buttons:
microphone:
enabled: true
mute:
enabled: true
The only issue I have now is that once I press the mic icon to enable the 2-way audio from the android app, it works ok, but i can’t mute the feed by pressing the mic icon again… but that’s fixed by closing the app or switching to another dashboard.
I wont bother about it now but if any1 has a solution to that, very welcome!
Hope it helps someone