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?

peth
  • 21
  • 1

1 Answers1

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
TomG
  • 1,181
  • 2
  • 10
  • 22