blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.02k stars 1.74k forks source link

[Support]: Camera Recording Schedule #2132

Closed tjcampanella closed 2 years ago

tjcampanella commented 3 years ago

I am wondering if frigate supports setting a schedule for your cameras. For instance, I am looking to record from say 7am-7pm inside my office. All other time then that I just want motion/object detected recordings saved as clips. Is there any way to do this? I haven't been able to find anything about this. Thank you for any help and this great project.

tjcampanella commented 3 years ago

Another thing to note is I plan to run frigate in a docker container alongside home assistant on a linux machine.

blakeblackshear commented 3 years ago

I can't think of a way to do this in the current version.

tjcampanella commented 3 years ago

Would I just be able to say run the docker container with a certain configuration for recording during the hours of 7am-7pm and then at 7pm stop that configuration and run the config with the motion/object detection for those cameras? Also how exactly does the recording options work does frigate handle recording 24/7 if I have that option on?

blakeblackshear commented 3 years ago

You can't switch the configuration like that. The retention settings aren't meant to be changed regularly. For example, if you set retain_days to 1 and then later set it to 0, it will cleanup all recordings without an overlapping event on startup. It doesn't remember what the retention settings were for that segment at the time it was first stored.

tjcampanella commented 3 years ago

What if I run those few cameras without using frigate from 7am - 7pm and then at 7pm I restart the docker container with the only change being I added those cameras in. I guess now the video feeds wouldn't be all in the same place in home assistant. Hmm I guess I can just have those select cameras always recording 24/7 instead that will just take up more storage space.

blakeblackshear commented 3 years ago

You could also consider running two separate frigate containers. The integration supports multiple instances. Note that a Coral can't be shared, so you would need multiple.

tjcampanella commented 3 years ago

Ok thanks I think I am just gonna have those cameras record 24/7 and get enough storage to handle it all. I can't think of a succinct way to handle the scheduling. And a side note does frigate support face recognition? Say if I wanna give it some images of peoples faces I want it to detect.

badscr commented 3 years ago

Wonder if MQTT can toggle it? Or could setup a Cron job to exit one docker and start the other?

As for, face recognition; maybe this could point you the right direction (he talks about face reconition in it and automation from that) as i to would like to play with that too at some point. it does have a wow factor to it. https://www.youtube.com/watch?v=B635wcdr6-w?t=567
https://github.com/jakowenko/double-take double-take paired with CompreFace ?

tjcampanella commented 3 years ago

Thank you for the links and if I toggle the docker containers like that wouldn't that mess with the configuration like you were saying earlier or am i misunderstanding?

joeShuff commented 3 years ago

I have achieved this by using the Scheduler integration in home assistant to turn on/off the 24/7 recording via mqtt (the frigate integration).

image This scheduler changes an input_select helper which then has automations to change frigate options based on the input_select.

tjcampanella commented 3 years ago

@joeShuff Thank you for this would you mind sharing a little bit more information about how you set this up? How are you running frigate? How exactly are you changing the config from mqtt?

joeShuff commented 3 years ago

I am running frigate in a docker container alongside homeassistant supervised install (I didn't install frigate via HA). Just to clarify this doesn't automate changing what cameras are in frigate or the retain settings, it simply controls turning on/off the 3 options already in frigate UI (detect, recordings and snapshots).

Toggling these 3 options is just done using the switches that the frigate integration exposes image

This means that I can stop recording my indoor cameras during the day (if someone is home), but turn on recordings over night and recordings/detect/snapshots when no one is in the house.

tjcampanella commented 3 years ago

@joeShuff Oh ok I think that would be perfect for what I need. Thank you that is also how I intend to install HA and frigate.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.