如何安排运动检测

Jor*_*ril 4 security scheduled-tasks motion-detection

我刚刚发现了Motion,它的作用就像一个魅力。我唯一的问题是我希望它只在夜间处于活动状态,但没有调度参数..

我想我可以编写一个程序,通过它的“HTTP API”来控制 Motion ,但我想知道是否有人已经这样做了,或者是否有替代解决方案。

提前致谢 :)

Jor*_*ril 6

对于这个简单的任务,Motion 的 HTTP API 可以直接与 wget 或类似工具一起使用。
直接来自常见问题解答

0 9 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/start > /dev/null 
0 18 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/pause > /dev/null 
Run Code Online (Sandbox Code Playgroud)