Code: Select all
services:
frigate:
# user: "1002:1002"
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
stop_grace_period: 30s # allow enough time to shut down the various services
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "1024mb" # update for your cameras based on calculation above
devices:
# - /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
- /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://github.com/jnicolson/gasket-builder
# - /dev/video11:/dev/video11 # For Raspberry Pi 4B
# - /dev/dri/renderD128:/dev/dri/renderD128 # AMD / Intel GPU, needs to be updated for your hardware
# - /dev/accel:/dev/accel # Intel NPU
volumes:
- /etc/localtime:/etc/localtime:ro
- /home/frigate/config:/config
- /media/frigate:/media/frigate
- type: tmpfs # 1GB In-memory filesystem for recording segment storage
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "5000:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "password"frigate config.yaml (working recording with detection and mqqt)
Code: Select all
mqtt:
enabled: true
host: 192.168.1.28
port: 1883
user: frigate
password: frigate
topic_prefix: frigate
client_id: frigate
detectors:
coral:
type: edgetpu
device: pci
snapshots:
enabled: true
timestamp: true
bounding_box: true
retain:
default: 10
objects:
track:
- person
- car
- dog
- cat
- bird
go2rtc:
streams:
front_lhs:
- rtsp://login:password@192.168.1.70:554/ch01/2 # mobile
front_door:
- rtsp://login:password@192.168.1.71:554/ch01/2 # mobile
front_rhs:
- rtsp://login:password@192.168.1.72:554/ch01/2 # mobile
front_rhs_gate:
- rtsp://login:password@192.168.1.73:554/ch01/2 # mobile
mid_rhs:
- rtsp://login:password@192.168.1.74:554/ch01/2 # mobile
back_rhs:
- rtsp://login:password@192.168.1.75:554/ch01/2 # mobile
shed:
- rtsp://login:password@192.168.1.76:554/ch01/2 # mobile
back:
- rtsp://login:password@192.168.1.77:554/ch01/2 # mobile
back_lhs:
- rtsp://login:password@192.168.1.78:554/ch01/2 # mobile
electrical_box:
- rtsp://login:password@192.168.1.79:554/ch01/2 # mobile
cameras:
front_lhs:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front_lhs # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: front_lhs # <--- Specify a "friendly name" followed by the go2rtc stream name
zones:
front_lhs_zone1:
coordinates: 0,0.518,0.628,0.405,0.894,0.492,0.841,1,0,1
loitering_time: 0
objects: person
motion: {}
review:
detections:
labels:
- person
# - car
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
# - car
- person
required_zones: front_lhs_zone1
front_door:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front_door # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: front_door # <--- Specify a "friendly name" followed by the go2rtc stream name
zones: {}
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
front_rhs:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front_rhs # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: front_rhs_mobile # <--- Specify a "friendly name" followed by the go2rtc stream name
zones:
front_rhs_zone1:
coordinates: 0.111,0.214,0.467,0.197,0.999,0.516,1,1,0.132,0.997
loitering_time: 0
objects: person
motion: {}
review:
detections:
labels:
- person
# - car
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
# - car
- person
required_zones: front_rhs_zone1
front_rhs_gate:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front_rhs_gate # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: front_rhs_gate # <--- Specify a "friendly name" followed by the go2rtc stream name
zones:
front_rhs_gate_zone1:
coordinates: 0.993,0.367,0.668,0.153,-0.001,0.283,0,1,1,1
loitering_time: 0
objects: person
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
required_zones: front_rhs_gate_zone1
mid_rhs:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/mid_rhs # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: mid_rhs # <--- Specify a "friendly name" followed by the go2rtc stream name
zones: {}
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
back_rhs:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/back_rhs # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: back_rhs # <--- Specify a "friendly name" followed by the go2rtc stream name
zones: {}
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
shed:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/shed # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: shed # <--- Specify a "friendly name" followed by the go2rtc stream name
zones: {}
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
back:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/back # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: back # <--- Specify a "friendly name" followed by the go2rtc stream name
zones: {}
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
back_lhs:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/back_lhs # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 640 # Ensure this matches the detect stream resolution or is close
height: 480
live:
streams:
Main Stream: back_lhs # <--- Specify a "friendly name" followed by the go2rtc stream name
zones: {}
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
electrical_box:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/electrical_box # <--- the name here must match the name of the camera in restream
input_args: preset-rtsp-restream
roles:
- record
- detect
record:
enabled: true # <--- Enable recording
detect:
enabled: true
width: 320 # Ensure this matches the detect stream resolution or is close
height: 240
live:
streams:
Main Stream: electrical_box # <--- Specify a "friendly name" followed by the go2rtc stream name
zones: {}
motion: {}
review:
detections:
labels:
- person
alerts:
enabled: true
# Optional: labels that qualify as an alert (default: shown below)
labels:
- person
version: 0.17-0
semantic_search:
enabled: true
model_size: large
face_recognition:
enabled: true
model_size: small
lpr:
enabled: true
classification:
bird:
enabled: falsehttps://community.home-assistant.io/t/frigate-mobile-app-notifications-2-0/559732
Proxmox MQTT LXC
https://community-scripts.org/scripts/mqtt
Code: Select all
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/mqtt.sh)"