my Raspi uses the original raspicam and motion to stream security footage to my nas. This works great so far. I now want to additionally take a picture every 1 hour and save it somewhere. Obviously I can't just put a raspistill command into a cron job because motion would be still blocking the cam. And I don't want to get hacky and start/stop motion every time I take a picture. Is there a way to do it with motion, or can I somehow tap the motion stream, to get my still picture?

any input is welcomed!

1 Answer 1


Found out that motion has a Rest-API like interface which can create Snapshots. build the following crontab and it does what I needed it to do.

0 */1 * * * rm /var/lib/motion/* && curl -s -o /dev/null http://pigrow:8080/0/action/snapshot && ping 10.1 -c 3 > /dev/null && mv /var/lib/motion/image* /mnt/nas

without the ping it sometimes didn't work, it couldn't move the file, because it wasn't there.

  • Thanks for updating us with a solution - I’ve got to sort out a camera for the squirrels in the garden soon! One minor question - is the ping just to create a delay Before the move or ‘wake’ the system up?
    – user115418
    Apr 20, 2020 at 15:58
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Apr 22, 2020 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.