[Config Support]: Frigate to Home Assistant Zone Occupancy Issues #16697
-
Describe the problem you are havingOne of my frigate goals is to trigger a Home Assistant automation when a cat is detected within a "Countertop" zone. My configuration is exposing a Countertop device in Home Assistant and I'm using the "Countertop cat occupancy became occupied" entity to trigger the automation. This has been working well when there actually is a cat in the zone. The issue I'm having is the "Countertop cat occupancy became occupied" entity will occasionally show "Detected" when frigate history shows there are no alerts or detections and the recording shows nothing, not even any motion that seems significant. My frigate instance is running in docker on an unraid machine, home assistant is in a VM on a separate machine. I feel I must be missing something in the config. Version0.14.1-f4f3cfa Frigate config filemqtt:
host: 192.168.50.3
user: ******
password: ******
database:
path: /config/frigate.db
ffmpeg:
hwaccel_args: preset-vaapi
record:
enabled: true
retain:
days: 31
mode: all
events:
retain:
default: 60
mode: motion
detectors:
ov:
type: openvino
device: GPU
#detectors:
# coral:
# type: edgetpu
# device: pci
go2rtc:
streams:
murphy:
- rtsp://admin:******@192.168.50.48:554/live
- ffmpeg:murphy#audio=opus
counter:
- rtsp://admin:******@192.168.50.66:554/live
- ffmpeg:counter#audio=opus
driveway:
- rtsp://admin:******@192.168.50.42:554/live
- ffmpeg:driveway#audio=opus
garage_se:
- rtsp://admin:******@192.168.50.131:554/live
- ffmpeg:garage_se#audio=opus
garage_sw:
- rtsp://admin:******@192.168.50.47:554/live
- ffmpeg:garage_sw#audio=opus
doorbell:
- rtsp://admin:******@192.168.50.150:554/h264Preview_01_main
- ffmpeg:doorbell#audio=aac
cameras:
murphy: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/murphy # <----- The stream you want to use for detection
roles:
- record
- path: rtsp://admin:******@192.168.50.48:554/cam/realmonitor?channel=1&subtype=1
roles:
- detect
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 640
height: 480
snapshots:
enabled: true
motion:
mask: 0.747,0.041,0.75,0.075,0.968,0.076,0.965,0.039
threshold: 15
contour_area: 10
improve_contrast: 'true'
doorbell: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/doorbell # <----- The stream you want to use for detection
roles:
- detect
- record
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 640
height: 480
snapshots:
enabled: true
motion:
threshold: 15
contour_area: 90
improve_contrast: 'true'
mask: 0.636,0.944,0.636,0.972,0.964,0.973,0.964,0.942
driveway: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/driveway # <----- The stream you want to use for detection
roles:
- detect
- path: rtsp://admin:******@192.168.50.42:554/cam/realmonitor?channel=1&subtype=1
roles:
- record
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 1024
height: 452
snapshots:
enabled: true
motion:
threshold: 15
contour_area: 90
improve_contrast: 'true'
mask: 0.738,0.036,0.738,0.088,0.962,0.088,0.962,0.034
garage_se: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage_se # <----- The stream you want to use for detection
roles:
- detect
- path: rtsp://admin:******@192.168.50.131:554/cam/realmonitor?channel=1&subtype=1
roles:
- record
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 704
height: 480
snapshots:
enabled: true
motion:
threshold: 15
contour_area: 90
improve_contrast: 'true'
mask: 0.663,0.031,0.663,0.077,0.973,0.076,0.973,0.032
garage_sw: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage_sw # <----- The stream you want to use for detection
roles:
- detect
- path: rtsp://admin:******@192.168.50.47:554/cam/realmonitor?channel=1&subtype=1
roles:
- record
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 704
height: 480
snapshots:
enabled: true
motion:
threshold: 15
contour_area: 90
improve_contrast: 'true'
mask: 0.729,0.04,0.729,0.081,0.973,0.076,0.973,0.032
counter: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/counter # <----- The stream you want to use for detection
roles:
- detect
- path: rtsp://127.0.0.1:8554/counter
roles:
- record
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 2560
height: 1440
snapshots:
enabled: true
motion:
threshold: 15
contour_area: 10
improve_contrast: 'true'
mask: 0.969,0.088,0.967,0.034,0.752,0.033,0.753,0.089
zones:
Countertop:
coordinates:
0,0,0,1,0.38,1,0.077,0.566,0.242,0.477,0.432,0.441,0.511,0.439,0.606,0.38,0.662,0.374,0.66,0.251,0.171,0
inertia: 3
loitering_time: 0
objects: cat
review:
detections:
required_zones: Countertop
alerts: {}
version: 0.15
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
- cat
filters:
cat:
min_score: 0.88
threshold: 0.9
model:
path: plus://******* Relevant Frigate log outputLogs are clear after startup. Relevant go2rtc log outputLogs are clear after startup. Frigate statsNo response Operating systemUNRAID Install methodDocker Compose docker-compose file or Docker CLI commandStandard Unraid template with frigate+ api key and intel igpu /dev/dri device for intel iGPU. Object DetectorOpenVino Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
See the FAQ in the official docs for the Home Assistant integration: https://docs.frigate.video/integrations/home-assistant/#i-have-set-up-automations-based-on-the-occupancy-sensors-sometimes-the-automation-runs-because-the-sensors-are-turned-on-but-then-i-look-at-frigate-i-cant-find-the-object-that-triggered-the-sensor-is-this-a-bug |
Beta Was this translation helpful? Give feedback.
Sorry, I realize there may be room for confusion. I used "detection" in context to what happens internally with Frigate's object detector.
Frigate searches for objects in your camera frame, but does not immediately mark everything it sees as a valid object. The object detecting AI models can produce false positives, so Frigate does a lot of work behind the scenes to make sure that a
person
is actually a person. Once Frigate is sufficiently confident, a tracked object is recorded and/or saved (depending on your Frigate config).The Home Assistant sensors have fewer filters in place and do not go through the process of checking if detected objects are false positives or not. Because this pr…