2

I use my RPi to periodically take pictures, both snapshots and of detected motion events. Is there any way to stop motion from taking pictures during the night? For example I imagine this could be done through crontab, but I haven't been able to find any way to control motion through the command line. Any suggestions on how I could control it through crontab, or alternatively other solutions?

2
  • possible duplicate of control motion via cron Commented Oct 6, 2014 at 6:23
  • I think you should give more information like the software you use to take snapshots (maybe motion but I'm not sure), if you run it at startup (and if so, how), what you have tried, etc. Commented Oct 7, 2014 at 13:29

1 Answer 1

2

Motion supports remote commands via http, documented at RemoteControlHttp. You can use wget, curl, or lwp-request in crontab to stop motion at a predetermined time. Assuming default options in motion.conf, this example will stop motion at 8pm each day:

0 20 * * * curl -s -o /dev/null http://localhost:8080/0/action/quit

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.