Giter Site home page Giter Site logo

Comments (6)

NickM-27 avatar NickM-27 commented on June 23, 2024

This can be done automatically with a system like home assistant, NodeRED, or even a simple bash script + cron job.

It is also worth mentioning that in the next version of frigate the UI supports scrubbing recordings quickly automatically which replaces the need of time-lapses for many users.

from frigate.

gorfreed avatar gorfreed commented on June 23, 2024

@NickM-27 Could you please point me to a working example where a bash script + cron job combination is being used? I cannot find any and was unable to reproduce this setup so far.

from frigate.

NickM-27 avatar NickM-27 commented on June 23, 2024

https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/ would be a good starting point. There's not much special about calling Frigate's api. Just need to get the start and end timestamp then make the api request in the script

from frigate.

gorfreed avatar gorfreed commented on June 23, 2024

@NickM-27 I think you misunderstood my issue completely. I have no troubles using cron or writing http requests. My problem is that the specific endpoint of frigate I am aiming at expects/requires date parameter in unix that I don't know how to produce if said export is supposed to run daily for the last 24 hours (hence the unix parameter would always be different).

POST /api/export/<camera>/start/<start-timestamp>/end/<end-timestamp>

from frigate.

NickM-27 avatar NickM-27 commented on June 23, 2024

You just need to get the epoch time https://stackoverflow.com/questions/1092631/get-current-time-in-seconds-since-the-epoch-on-linux-bash and add 24 hours (in seconds) to it

from frigate.

gorfreed avatar gorfreed commented on June 23, 2024

I see. I guess that means I don't get around coming up with some kind of script/backend that does that calculation for each call then? I cannot simply have it triggered by other tools that are only capable of sending out requests as configured.

from frigate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.