Create event to record Frigate

Hi everyone,
I installed Frigate with Frigate’s detection, but my CPU is overload.
I don’t want to buy a coral.
My camera has motion detection.
I want to start the recording when my camera is detected a motion (i have already this information from Onvif), and stop the recording after 30s. The best is to record 5s before the detection, until 30s after the detection.

I tried this, but it doesn’t work :

  • delete all detection part in frigate configuration
  • added “rest_command” function in my configl.yml
  • call the “rest_command” from an automation (when my camera detects movement).

The automation starts good, but i can’t find any recording in frigate.

Anyone has an idea ?

Thank you

No need to use a manual rest command, just use the Frigate integration and use the create manual event service

Thank you for your answer.
I know how to create an event. But how can I use this event to enable recording ? And how can I set recording duration ?

All of those are fields included in the service I am referring to

Indeed, i found the duration time.
But it still not working.
I don’t know how to do in my frigate configuration to enable recording only when the event is created.

I already read the frigate configuration.
But there is nothing about the created events. It only talks about motion, or alert, but nothing about the events created by automation.
I am a beginner in home assistant.

This is my code. I set the detection to false because i want to start recording only from by automation.
I set 0.1 days for retain record to don’t save too many videos.
And i set 7 days alerts record (i guess it’s the status for my event created in my automation)

cameras:
  Camera_IMOU:
    ffmpeg:
      inputs:
        - path: 
            rtsp://admin:password@ipadress/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=onvif
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: 
            rtsp://admin:password@ipadress/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=onvif
          input_args: preset-rtsp-restream
          roles:
            - detect

    detect:
      enabled: false

    record:
      enabled: true
      retain:
        days: 0.1 
      alerts:
        retain:
          days: 7 
        pre_capture: 5
        post_capture: 30

version: 0.16-0

It’s working now, i just rebooted HA…