[APP][Pro] Frigate CCTV

I renabled it and I am still getting a lot of events. I added the event id and each email is different, but they appear to be the same event when it starts, in the middle and when it ends. Are you filtering for an end event? That is what I had to do in Home Assistant

v1.0.5, i changed the trigger to the “end” event type from frigate so homey trigger starts only when frigate says the event ended. I also fix some issues with the image fetched from frigate.

@JMDPC look at the motion threshold value to manage motion detection

I will share my frigate config here:

mqtt:
  enabled: true
  host: 192.168.0.254
  user: frigate
  password: __redacted__
  topic_prefix: frigate
  client_id: frigate
  stats_interval: 60
  qos: 0

detectors:
  onnx:
     type: onnx

record:
  enabled: true
  continuous:
     days: 3
  motion:
     days: 7
  alerts:
     retain:
        days: 7
        mode: all
  detections:
     retain:
        days: 7
        mode: all

snapshots:
  enabled: true
  bounding_box: true

model:
  path: /config/model_cache/yolov9-t-320.onnx
  model_type: yolo-generic
  width: 320
  height: 320
  input_tensor: nchw
  input_pixel_format: rgb
  input_dtype: float

motion:
  threshold: 50

cameras:
  c6n:
     ffmpeg:
        inputs:
           - path: rtsp://admin:__redacted__@192.168.99.33:554/H264
              roles:
                 - record
                 - detect
     detect:
        enabled: true
        width: 1280
        height: 720
        fps: 5
     objects:
        track:
           - person

  c1mini:
     ffmpeg:
        inputs:
           - path: rtsp://admin:__redacted__@192.168.99.31:554/ch1/main
        roles:
           - record
           - detect
     detect:
        enabled: true
           width: 1280
           height: 720
           fps: 5
        objects:
           track:
              - person
version: 0.17-0

OK I will try that today and let you know.

I sent you a message with what is going on along with screenshots

I will have a deeper look at the message you sent but my first impression is that frigate reports multiple events.
The text between - person and - frigate is the eventID isn’t it.

The role of the homey app is to subscribe and relay the mqtt events frigate sends.if frigate generates 4 unique events / alerts then the app will find the mqtt message and report it.

Did you play with the motion threshold value.
Could it be that frigate loose detection in the shade of the tree?

@JMDPC Camera setup | Frigate

I did change the threshold. I don’t think so since home assistant appears to be working properly. I noticed in home assistant my automation is filtering for end events

Hi,

@JMDPC As i said before the trigger “Object Detected” is only looking at end events from frigate:

if (msg.type !== ‘end’) return;

Any other type of message from frigate is dropped for the object detection. It applies to alert and simple detection.

I created a new trigger named “Alert - Object Detected” that should fits your need better, it will be triggered when frigate already sent a detection and then trigger an alert within 30 seconds. Let’s see if it works better.

v1.0.7: implements the new trigger and support go2RTC from frigate. Be aware that the frigate configuration needs to be correct and go2RTC port (default: 1984) can be changed and needs to be accessible.

mqtt:
  enabled: true
  host: 192.168.0.254
  user: frigate
  password: __redacted__
  topic_prefix: frigate
  client_id: frigate
  stats_interval: 60
  qos: 0

detectors:
  onnx:
     type: onnx

record:
  enabled: true
  continuous:
     days: 3
  motion:
     days: 7
  alerts:
     retain:
        days: 7
        mode: all
  detections:
     retain:
        days: 7
        mode: all

snapshots:
  enabled: true
  bounding_box: true

model:
  path: /config/model_cache/yolov9-t-320.onnx
  model_type: yolo-generic
  width: 320
  height: 320
  input_tensor: nchw
  input_pixel_format: rgb
  input_dtype: float

motion:
  threshold: 50

go2rtc:
  streams:
     c1mini:
        - ffmpeg:rtsp://admin:__redacted__@192.168.99.31:554/ch1/main
        - ffmpeg:c1mini#audio=aac
     C230:
        - ffmpeg:rtsp://__redacted__:__redacted__@192.168.99.34:554/stream1
        - ffmpeg:C230#audio=aac
        - tapo://admin:__redacted__@192.168.99.34

cameras:
  C230:
     ffmpeg:
        hwaccel_args: preset-nvidia-h264
        output_args:
           record: preset-record-generic
        inputs:
           - path: rtsp://127.0.0.1:8554/C230
           input_args: preset-rtsp-generic
           roles:
              - record
              - detect
     detect:
        enabled: true
        width: 2880
        height: 1620
        fps: 15
     objects:
        track:
           - person

  c1mini:
     ffmpeg:
        hwaccel_args: preset-nvidia-h264
        output_args:
           record: preset-record-generic
        inputs:
           - path: rtsp://127.0.0.1:8554/c1mini
           input_args: preset-rtsp-generic
           roles:
              - record
              - detect
     detect:
        enabled: true
           width: 1280
           height: 720
           fps: 5
        objects:
           track:
              - person
version: 0.17-0

OK checking now I will let you know how it works in a bit. Can you make the alert trigger for all devices so I dont have to have a flow for each camera.

I am not getting messages from the Alert Object Detected I am if Any Camera Detected an Object

Arf… I will need more time to debug this.
Is the live stream working as expected in homey BTW?

This is what I see

Try the url in a browser, seems to be a network issue. The url seems okay.

Frigate needs to expose webrtc port and be able to talk to it. And the frigate go2rtc needs to match the camera name, you can refer to the last config I shared if needed

@JMDPC v1.0.8 to be tested, “alert - object detected” now takes the review mqtt msg of type ‘end’.

Hello,

Merci pour l’application. Can you do what is necessary to put the settings directly in the application and not in the Setting of the device, it would avoid repeating the operation every time, I made almost the same version as you, I integrated the settings like this, and I do the automatic discovery of the cameras.

Thank you
Olivier from France :slight_smile: