Frigate Integration - Problem with Binary Sensor - no aligned with Frigate Alerts/Recording and firing at random

Hi everyone,

Looking for some help with my Frigate integration.

The HACS integration’s binary sensor for motion is completely out of sync with the Frigate add-on alerts & recordings. The binary sensor fires seemingly at random, but not (or not in sync) when the Frigate add-on registers an event and starts recordings.

I checked with the MQTT Explorer to see if I can trace back what drives the binary sensor changes, and indeed a MQTT message arrives changing it’s state to ON, but I don’t know how to trace back why the MQTT message arrives in the 1st place, because at the time the Frigate add-on did not register an event.

Also tried playing with the Motion Tuner. My threshold is now at 49 and contour at 44, but I wonder if that makes any difference. I mean, the add-on does not (correctly) register a event/starts a recording when the sensor is triggered.

Lastly, I have 3 camera’s, 1 from foscam, 2 from reolink. This only occurs with the Foscam, cam1 in the config file. For the sake of completeness, the last real event correctly registered by the add-on from this morning was also from cam1, while the binary sensor did not follow suit correctly.

This prevents me from properly launching automations when the add-on registers an event and starts recording

My setup is

  • HA on a Proxmox VM (all on the latest versions)
  • Frigate as full-access add-on in HA
  • Coral TPU

My config is
mqtt:
host: xxx
port: xxx
user: xxx
password: xxx

detectors:
coral:
type: edgetpu
device: usb

cameras:
cam1:
ffmpeg:
inputs:
- path: rtsp://xxx/videoMain
roles:
- record
- path: rtsp://xxx/videoSub
roles:
- detect
detect:
width: 1280
height: 720
fps: 5
objects:
track:
- cat
- person
motion:
threshold: 49
contour_area: 44
improve_contrast: ‘true’
mask: 0.012,0,0.268,0.017,0.267,0.06,0,0.067
xxx:
ffmpeg:
inputs:
- path: rtsp://xxx//h264Preview_01_main
roles:
- record
- path: rtsp://xxx//h264Preview_01_sub
roles:
- detect
detect:
width: 1280
height: 720
fps: 5
objects:
track:
- cat
- person
motion:
threshold: 52
contour_area: 29
improve_contrast: ‘true’
mask: 0.018,0.034,0.315,0.032,0.316,0.086,0.016,0.094
xxx:
ffmpeg:
inputs:
- path: rtsp://xxx/h264Preview_01_main
roles:
- record
- path: rtsp://xxx/h264Preview_01_sub
roles:
- detect
detect:
width: 1280
height: 720
fps: 5
objects:
track:
- person

motion:
  mask:
    - 0.005,0.015,0,0.74,0.561,0.73,0.612,0.584,0.691,0.566,0.837,0.561,0.893,0.615,0.968,0.648,1,0.658,1,0.483,1,0.289,0.979,0.009
    - 0,0.686,0,0.988,0.241,0.672
zones:
  Front:
    coordinates: 0.187,0.745,0.591,0.73,1,0.981,0.021,0.987
    loitering_time: 0
    objects: person
review:
  alerts:
    required_zones: Front
  detections:
    required_zones: Front

record:
enabled: true
sync_recordings: false
events:
pre_capture: 20
post_capture: 20

birdseye:
enabled: true
mode: continuous

#environment_vars:

LIBVA_DRIVER_NAME=radeonsi

#ffmpeg:

hwaccel_args: preset-vaapi

database:
path: /config/frigate.db
version: 0.14

TIA for your help.

You can try updating to Frigate 0.15 (currently in RC) which has more details about all tracked objects in the new explore page