Frigate - force recording based on external state change

This is what I’m trying to achieve.

When my WIFI controlled outside light comes on after detecting motion via its PIR. I would like that state change of the outside light to force my Frigate installation to start recording, for say 10 minutes straight across all the cameras. After the period I want the installation to return to the previous state.

My Frigate installation is already recording on motion and object detection however sometimes it doesn’t always catch the start of an event. The outside light coming on is largely reliable.

I can’t see the option to send a start recording function to Frigate through HA so I assume its not available? Any thoughts on this?

1 Like

this is available in frigate 0.13

Thanks for the reply. V13 is a beta? I read the release docs and it appears you can do a post request to create a specific event. Looks like that’ll work.

I can’t seem to find a method for updating to 13 so I’ll stay put for the time being.

So I managed to figure out how to update Frigate to the v0.13.0 Beta.

I put a shell command in the configuration.yaml

externallighton:  'curl -d "sub_label=lighton&duration=30&include_recording=true" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://xxx.xxx.x.xx:5000/api/events/frontcamera/test/create'

Then called that service from an automation every time the outside light comes on. Forcing Frigate to record regardless. It create an event ‘test’ in the camera recordings.

1 Like

Hi !

Trying your solution, but it take only a snapshot in frigate, not recording clip…

do you have something special in frigate configuration ?

EDIT :

ANSWERED/SOLVED myself :

do NOT enabled “mode: active_objects” in record mode :slight_smile:

Thank for the tips anyway !

1 Like

Ah yes… this was the one thing that I could not figure out.
The “record → retain → mode” and the “record → events → mode” had to be set to “all” for me.
Cheers on that.

However, I find the duration option is all over the place. Never get a consistent video duration to stick. Also, if starting a forced recording with no duration, it still stops after a random short period.
Any ideas?
EDIT: Nevermind, all good now