Starting different motion threads at different times
Question
I have multiple ip cameras running through motion. The problem is that I need them to start detecting motion at different times of the night. As the config help files note, it is not recommended that I run multiple instances of motion (and I can see why, since I've had nothing but trouble attempting to do so).
Question: Is there a way that I can start motion at different times for different cameras?
What I have tried so far is multiple instances of motion. Say, one instance kicks off at 4pm and has 3 thread files associated with it. Another attempts to kick off at 5pm with a couple threads (starting through cron). This second one will start some of the time. A third instance at 7pm, though, won't start.
I've thought of installing motion to separate directories, but obviously if there is a cleaner approach (like a config option), that would be much nicer.
Thanks in advance. I've searched through all the help files and haven't found an answer yet. I appreciate your time.
Environment
Motion version: |
3.2.8 |
ffmpeg version: |
|
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
Fedora Core 5, kernel 2.6.20-1.2312 |
--
KonstantinLevin - 11 Oct 2007
Answer
The way to do this is to start Motion with all the threads running.
And then via a cron job start and stop the motion detection via a cron job that simply calls the motion control port.
Example to stop detection on camera 2
http://192.168.1.3:8080/2/detection/pause
See
MotionHttpAPI for more details on the API and
RemoteControlHttp for how to use it including examples of cron job entries. The easiest way to get the syntax is to actually do it with a normal browser and then copy the URL into the cron.
--
KennethLavrsen - 11 Oct 2007