frigate
frigate copied to clipboard
[Support]: Trying to setup new Frigate beta version
Describe the problem you are having
Ok i just gave it a run:
| s6-rc: info: service legacy-services successfully started
frigate | 2023-01-09 19:32:07.485826296 19:32:07.485 INF go2rtc version 0.1-rc.6 linux/amd64
frigate | 2023-01-09 19:32:07.486368969 19:32:07.486 INF [api] listen addr=:1984
frigate | 2023-01-09 19:32:07.486691646 19:32:07.486 INF [rtsp] listen addr=:8554
frigate | 2023-01-09 19:32:07.487092382 19:32:07.487 INF [webrtc] listen addr=:8555
frigate | 2023-01-09 19:32:07.487380846 19:32:07.487 INF [srtp] listen addr=:8443
frigate | 2023-01-09 19:32:08.364133450 2023/01/09 19:32:08 [error] 112#112: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.50.148, server: , request: "GET /api/stats HTTP/1.1", upstream: "http://127.0.0.1:5001/stats", host: "192.168.50.41:5000"
frigate | 2023-01-09 19:32:08.364194642 192.168.50.148 - - [09/Jan/2023:19:32:08 +0000] "GET /api/stats HTTP/1.1" 502 157 "-" "HomeAssistant/2023.1.2 aiohttp/3.8.1 Python/3.10" "-"
frigate | 2023-01-09 19:32:08.685189074 [2023-01-09 19:32:08] frigate.app INFO : Starting Frigate (0.12.0-0dbf909)
frigate | 2023-01-09 19:32:08.742573440 *************************************************************
frigate | 2023-01-09 19:32:08.742578549 *************************************************************
frigate | 2023-01-09 19:32:08.742583472 *** Your config file is not valid! ***
frigate | 2023-01-09 19:32:08.742585521 *** Please check the docs at ***
frigate | 2023-01-09 19:32:08.742586892 *** https://docs.frigate.video/configuration/index ***
frigate | 2023-01-09 19:32:08.742606759 *************************************************************
frigate | 2023-01-09 19:32:08.742608141 *************************************************************
frigate | 2023-01-09 19:32:08.742609721 *** Config Validation Errors ***
frigate | 2023-01-09 19:32:08.742610984 *************************************************************
frigate | 2023-01-09 19:32:08.742628902 1 validation error for FrigateConfig
frigate | 2023-01-09 19:32:08.742629951 live
frigate | 2023-01-09 19:32:08.742645232 extra fields not permitted (type=value_error.extra)
frigate | 2023-01-09 19:32:08.743494494 Traceback (most recent call last):
frigate | 2023-01-09 19:32:08.743498137 File "/opt/frigate/frigate/app.py", line 335, in start
frigate | 2023-01-09 19:32:08.743499407 self.init_config()
frigate | 2023-01-09 19:32:08.743500609 File "/opt/frigate/frigate/app.py", line 80, in init_config
frigate | 2023-01-09 19:32:08.743501703 user_config = FrigateConfig.parse_file(config_file)
frigate | 2023-01-09 19:32:08.743502853 File "/opt/frigate/frigate/config.py", line 1019, in parse_file
frigate | 2023-01-09 19:32:08.743503820 return cls.parse_obj(config)
frigate | 2023-01-09 19:32:08.743504941 File "pydantic/main.py", line 527, in pydantic.main.BaseModel.parse_obj
frigate | 2023-01-09 19:32:08.743506063 File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
frigate | 2023-01-09 19:32:08.743507225 pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
frigate | 2023-01-09 19:32:08.743509775 live
frigate | 2023-01-09 19:32:08.743510853 extra fields not permitted (type=value_error.extra)
frigate | 2023-01-09 19:32:08.743553681
frigate | 2023-01-09 19:32:08.743555138 *************************************************************
frigate | 2023-01-09 19:32:08.743556266 *** End Config Validation Errors ***
frigate | 2023-01-09 19:32:08.743565878 *************************************************************
frigate | s6-rc: info: service legacy-services: stopping
frigate | 2023-01-09 19:32:08.951588604 exit OK
My docker-compose.yaml:
version: '3.9'
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: blakeblackshear/frigate:0.12.0-beta2
shm_size: '256mb'
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- ./config/frigate.yml:/config/config.yml:rw
- ./media/:/media/frigate
# - /mnt/footage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554"
- "1984:1984"
# environment:
# FRIGATE_RTSP_PASSWORD: password
Thank you for your support.
Version
0.12.0-beta2
Frigate config file
(This is my old frigate.yml for the stable release)
mqtt:
host: 192.168.50.148
port: 1883
topic_prefix: frigate
client_id: frigate
user: mqtt
password: test
stats_interval: 300
record:
expire_interval: 10
timestamp_style:
format: "%m/%d/%Y %H:%M:%S"
color:
red: 255
green: 255
blue: 255
thickness: 2
effect: shadow
cameras:
license_plate:
ffmpeg:
inputs:
- path: rtsp://192.168.50.15:554/user=admin&password=test&channel=5&stream=0.sdp?real_stream--rtp-caching=100
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 5
objects:
track:
- person
- dog
- cat
- mouse
- car
filters:
car:
min_area: 15000
person:
min_area: 500
snapshots:
enabled: true
timestamp: true
bounding_box: true
# required_zones:
# - front_driveway_1_close_in
# - front_driveway_1_whole_area
crop: True
height: 500
retain:
default: 3
# zones:
# front_driveway_1_close_in:
# coordinates: 0,480,429,480,443,335,460,173,263,133,88,120,36,212,0,279
# objects:
# - car
# - person
# - dog
# - cat
# - bicycle
# front_driveway_1_whole_area:
# coordinates: 383,52,497,105,569,316,575,480,261,480,0,480,0,225,148,57
# objects:
# - person
# - cat
# - dog
# - bicycle
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
record:
enabled: True
retain:
days: 0
events:
retain:
default: 5
mode: motion
# required_zones:
# - front_driveway_1_close_in
# - front_driveway_1_whole_area
pre_capture: 5
post_capture: 15
greenhouse_2:
ffmpeg:
inputs:
- path: rtsp://192.168.50.170:554/user=admin&password=test&channel=3&stream=0.sdp?real_stream--rtp-caching=100
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 5
objects:
track:
- person
- dog
- cat
- mouse
filters:
car:
min_area: 15000
person:
min_area: 500
snapshots:
enabled: true
timestamp: true
bounding_box: true
# required_zones:
# - front_driveway_1_close_in
# - front_driveway_1_whole_area
crop: True
height: 500
retain:
default: 3
# zones:
# front_driveway_1_close_in:
# coordinates: 0,480,429,480,443,335,460,173,263,133,88,120,36,212,0,279
# objects:
# - car
# - person
# - dog
# - cat
# - bicycle
# front_driveway_1_whole_area:
# coordinates: 383,52,497,105,569,316,575,480,261,480,0,480,0,225,148,57
# objects:
# - person
# - cat
# - dog
# - bicycle
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
record:
enabled: True
retain:
days: 0
events:
retain:
default: 5
mode: motion
# required_zones:
# - front_driveway_1_close_in
# - front_driveway_1_whole_area
pre_capture: 5
post_capture: 15
front_driveway_1:
ffmpeg:
inputs:
- path: rtsp://192.168.50.15:554/user=admin&password=test&channel=6&stream=0.sdp?real_stream--rtp-caching=100
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 5
objects:
track:
- person
- dog
- bicycle
- cat
- car
filters:
car:
min_area: 15000
person:
min_area: 500
snapshots:
enabled: true
timestamp: true
bounding_box: true
# required_zones:
# - front_driveway_1_close_in
# - front_driveway_1_whole_area
crop: True
height: 500
retain:
default: 3
# zones:
# front_driveway_1_close_in:
# coordinates: 0,480,429,480,443,335,460,173,263,133,88,120,36,212,0,279
# objects:
# - car
# - person
# - dog
# - cat
# - bicycle
# front_driveway_1_whole_area:
# coordinates: 383,52,497,105,569,316,575,480,261,480,0,480,0,225,148,57
# objects:
# - person
# - cat
# - dog
# - bicycle
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
record:
enabled: True
retain:
days: 0
events:
retain:
default: 5
mode: motion
# required_zones:
# - front_driveway_1_close_in
# - front_driveway_1_whole_area
pre_capture: 5
post_capture: 15
front_driveway_2:
ffmpeg:
inputs:
- path: rtsp://192.168.50.15:554/user=admin&password=test&channel=8&stream=0.sdp?real_stream--rtp-caching=100
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 5
objects:
track:
- person
- dog
- bicycle
- cat
- car
filters:
car:
min_area: 15000
person:
min_area: 500
snapshots:
enabled: true
timestamp: true
bounding_box: true
# required_zones:
# - front_driveway_2_close_in
# - front_driveway_2_whole_area
crop: True
height: 500
retain:
default: 3
# zones:
# front_driveway_2_close_in:
# coordinates: 0,480,429,480,443,335,460,173,263,133,88,120,36,212,0,279
# objects:
# - car
# - person
# - dog
# - cat
# - bicycle
# front_driveway_2_whole_area:
# coordinates: 383,52,497,105,569,316,575,480,261,480,0,480,0,225,148,57
# objects:
# - person
# - cat
# - dog
# - bicycle
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
- 889,476,891,596,785,598,786,476
record:
enabled: True
retain:
days: 0
events:
retain:
default: 5
mode: motion
# required_zones:
# - front_driveway_2_close_in
# - front_driveway_2_whole_area
pre_capture: 5
post_capture: 15
front_porch:
ffmpeg:
inputs:
- path: rtsp://192.168.50.15:554/user=admin&password=test&channel=7&stream=0.sdp?real_stream--rtp-caching=100
roles:
- record
- detect
detect:
width: 1920
height: 1080
fps: 5
stationary:
max_frames:
objects:
person: 100
objects:
track:
- person
- dog
- bicycle
- cat
# mask:
# - 0,480,198,480,200,449,0,451
# - 640,0,640,36,640,111,608,135,485,96,504,0
# - 439,200,441,324,512,320,532,261,554,188,540,129,451,134
# - 370,0,356,100,291,79,292,0
snapshots:
enabled: true
timestamp: false
bounding_box: false
crop: True
height: 500
# required_zones:
# - front_porch_close_in
retain:
default: 5
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
#zones:
# front_porch_close_in:
# coordinates: 45,480,362,480,640,480,640,213,554,145,525,328,466,343,408,272,348,70,253,64,181,118,67,178
record:
enabled: True
retain:
days: 0
mode: active_objects
events:
retain:
default: 4
mode: active_objects
# required_zones:
# - front_porch_close_in
pre_capture: 5
post_capture: 15
back_porch:
ffmpeg:
inputs:
- path: rtsp://192.168.50.15:554/user=admin&password=test&channel=1&stream=0.sdp?real_stream--rtp-caching=100
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 6
objects:
track:
- person
- dog
- cat
- bird
- mouse
filters:
cat:
min_score: 0.3
threshold: 0.5
dog:
min_score: 0.3
threshold: 0.5
# person:
# mask:
# - 79,385,107,480,287,480,259,313,107,268
snapshots:
enabled: true
timestamp: false
bounding_box: true
retain:
default: 4
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
record:
enabled: True
retain:
days: 0
events:
retain:
default: 4
mode: motion
pre_capture: 5
post_capture: 15
diningroom:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]/live0
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 6
objects:
track:
- person
- dog
- cat
- bird
- mouse
filters:
cat:
min_score: 0.3
threshold: 0.5
dog:
min_score: 0.3
threshold: 0.5
# person:
# mask:
# - 79,385,107,480,287,480,259,313,107,268
snapshots:
enabled: true
timestamp: false
bounding_box: true
retain:
default: 4
motion:
mask:
- 1382,58,1872,55,1868,8,1382,7
record:
enabled: True
retain:
days: 0
events:
retain:
default: 4
mode: motion
pre_capture: 5
post_capture: 15
kitchen:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]/live0
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 6
objects:
track:
- person
- dog
- cat
- bird
- mouse
filters:
cat:
min_score: 0.3
threshold: 0.5
dog:
min_score: 0.3
threshold: 0.5
# person:
# mask:
# - 79,385,107,480,287,480,259,313,107,268
snapshots:
enabled: true
timestamp: false
bounding_box: true
retain:
default: 4
motion:
mask:
- 1382,58,1872,55,1868,8,1382,7
record:
enabled: True
retain:
days: 0
events:
retain:
default: 4
mode: motion
pre_capture: 5
post_capture: 15
garage:
ffmpeg:
inputs:
- path: rtsp://192.168.50.15:554/user=admin&password=test&channel=2&stream=0.sdp?real_stream--rtp-caching=100
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 6
objects:
track:
- person
- dog
- cat
- bird
- mouse
filters:
cat:
min_score: 0.3
threshold: 0.5
dog:
min_score: 0.3
threshold: 0.5
# person:
# mask:
# - 79,385,107,480,287,480,259,313,107,268
snapshots:
enabled: true
timestamp: false
bounding_box: true
retain:
default: 4
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
record:
enabled: True
retain:
days: 0
events:
retain:
default: 4
mode: motion
pre_capture: 5
post_capture: 15
greenhouse:
ffmpeg:
inputs:
- path: rtsp://192.168.50.15:554/user=admin&password=test&channel=3&stream=0.sdp?real_stream--rtp-caching=100
roles:
- detect
- record
detect:
width: 1920
height: 1080
fps: 5
objects:
track:
- person
- dog
- bicycle
- cat
snapshots:
enabled: true
timestamp: false
bounding_box: true
retain:
default: 3
record:
enabled: True
retain:
days: 0
events:
retain:
default: 4
mode: active_objects
pre_capture: 5
post_capture: 15
motion:
mask:
- 1211,102,1682,101,1679,62,1211,64
detectors:
coral:
type: edgetpu
device: usb
rtmp:
enabled: false
birdseye:
enabled: True
width: 1280
height: 720
quality: 1
mode: objects
live:
height: 640
quality: 1
Relevant log output
See above
FFprobe output from your camera
na
Frigate stats
na
Operating system
Other Linux
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Dahua
Any other information that may be helpful
HA is on a separate instance from frigate. I updated the latest frigate integration to beta as well as per the release instructions.
as it says in the release notes
live:
height: 640
quality: 1
is not a valid config anymore as it has been moved. This section need to be removed
Yup, i just did that and all started working. Thanks.
- Was the previous live version JSMPEG based? I think i almost preferred that over MSE (although i understand MSE is much quicker). Webrtc (as per the release notes) i think i need to do some more work on, it's not working as of yet.
- My docker file has this exposed:
ports: - "5000:5000" - "8554:8554" - "1984:1984"
But when it started, it started listening on these:
frigate | 2023-01-09 19:51:31.557845633 19:51:31.557 INF go2rtc version 0.1-rc.6 linux/amd64
frigate | 2023-01-09 19:51:31.558105177 19:51:31.558 INF [api] listen addr=:1984
frigate | 2023-01-09 19:51:31.558329154 19:51:31.558 INF [rtsp] listen addr=:8554
frigate | 2023-01-09 19:51:31.558689948 19:51:31.558 INF [webrtc] listen addr=:8555
frigate | 2023-01-09 19:51:31.558853134 19:51:31.558 INF [srtp] listen addr=:8443
Should i not expose 8555 and 8443 as well?
Was the previous live version JSMPEG based? I think i almost preferred that over MSE (although i understand MSE is much quicker). Webrtc (as per the release notes) i think i need to do some more work on, it's not working as of yet.
Yes, the previous live view was jsmpeg
Should i not expose 8555 and 8443 as well?
Only need to expose 8555 if you aren't going to run frigate as host networking mode (which is recommended) for webrtc
and there is no reason to expose 8443 as that is not used.
Only need to expose 8555 if you aren't going to run frigate as host networking mode (which is recommended) for webrtc
What does this mean exactly? Am i running it in host networking mode now ?
You are not currently using it, host networking is done with adding network_mode: host
to the config file.
Host networking means that the frigate container will have its network (and ports) on the host (device that is running frigate) directly., bridged mode means that the ports will be forwarded from your host device to that container.
The advantage of host networking is that it allows the container to access UDP port forwarding directly so the webrtc connection can be facilitated on random ports.
https://www.tutorialspoint.com/docker-host-network-vs-bridge-network may give some other perspective / information
So am i using the wrong mode? I'll have a read through, thanks for the link.
Looks like network mode is the easiest to configure webrtc as well:
WebRTC extra configuration:[](https://deploy-preview-4055--frigate-docs.netlify.app/configuration/live/#webrtc-extra-configuration)
webRTC works by creating a websocket connection on extra ports. One of the following is required for webRTC to work:
Frigate is run with network_mode: host to support automatic UDP port pass through locally and remotely. See https://github.com/AlexxIT/go2rtc#module-webrtc for more details
One other thing: I used to use webrtc and the lovelace card on my HA instance to display eufy camera RTSP streams (battery powered ones). I removed webrtc as it was already included in frigate. If i wanted to use these cards again, do i need to install webrtc in addition on the HA server ?
One other thing: I used to use webrtc and the lovelace card on my HA instance to display eufy camera RTSP streams (battery powered ones). I removed webrtc as it was already included in frigate. If i wanted to use these cards again, do i need to install webrtc in addition on the HA server ?
You need to install the beta https://github.com/AlexxIT/WebRTC/releases/tag/v3.0-beta.4 which will allow you to point directly at frigate_ip:1984
so it will use the embedded go2rtc. Then when it asks for a url in the card simply provide the name of the camera greenhouse
and NOT an actual RTSP url
Nice, doing that now.
Do i still need to install the Webrtc integration on top of this as well ?
Do i still need to install the Webrtc integration on top of this as well ?
which integration are you talking about? The one I linked is called WebRTC
I mean i just installed the WebRTC in HACS, but i used to have one in my regular integrations as well. Like this one:
I mean i just installed the WebRTC in HACS, but i used to have one in my regular integrations as well. Like this one:
that's exactly the one I just linked except it is a newer version of it. And it seems like you may not know this but downloading in HACS does nothing but download, you still have to set it up in Settings -> Devices & Services
Older probably though :-), mine was like a 2.x install screenshot from this morning.
Gotcha, i understand it now.
I mean i just installed the WebRTC in HACS, but i used to have one in my regular integrations as well. Like this one:
that's exactly the one I just linked except it is a newer version of it. And it seems like you may not know this but downloading in HACS does nothing but download, you still have to set it up in
Settings -> Devices & Services
both webRTC Camera integration and Frigate integration must be running? I presume webRTC just points to frigate goRTC at frigate:8555 server? can hostname for frigate be used instead of an IP?
both webRTC Camera integration and Frigate integration must be running?
I mean it depends what you are trying to accomplish. If you want to use webrtc in HA then that would be the recommended way to do it.
I presume webRTC just points to frigate goRTC at frigate:8555 server? can hostname for frigate be used instead of an IP?
It needs to point at port 1984 (the go2rtc api) not 8555
@atv2016 are there any more questions here or can we close this?
No close please, thank you for your amazing support
From: Nicolas Mowen @.> Sent: 11 January 2023 14:19 To: blakeblackshear/frigate @.> Cc: atv2016 @.>; Mention @.> Subject: Re: [blakeblackshear/frigate] [Support]: Trying to setup new Frigate beta version (Issue #4979)
@atv2016https://github.com/atv2016 are there any more questions here or can we close this?
— Reply to this email directly, view it on GitHubhttps://github.com/blakeblackshear/frigate/issues/4979#issuecomment-1378823549, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEBCFUY2XQZC7RAYY3BEONTWR26NZANCNFSM6AAAAAATV2CQK4. You are receiving this because you were mentioned.Message ID: @.***>