Time Based Recording Functions?

Forum for questions and support relating to the 1.24.x releases only.
Post Reply
quietas
Posts: 102
Joined: Wed May 23, 2007 5:30 pm

Time Based Recording Functions?

Post by quietas » Tue Jun 23, 2009 9:52 pm

Is there any way to have a camera record during one set time and motion detect another?

My thoughts are during the daytime hours in which people are expected to be at work, motion detecting would be a waste of time as there would always be people in view. Then after hours change to modect since no one would be there normally.

User avatar
kingofkya
Posts: 1112
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya » Sun Jun 28, 2009 5:03 am

How can I get ZM to do different things at different times of day or week?

If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder 'run states'. A run state is a particular configuration of monitor functions that you want to use at any time.

To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say 'Running' or 'Stopped'. You will then be able to save the current state and give it a name, 'Daytime' for example. Now configure your monitors how you would want them during other times of day and save that, for instance as 'Nighttime'.

Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command zmpkg.pl <run state>, for example zmpkg.pl Daytime.

The final step you need to take, is scheduling the time the changes take effect. For this you can use cron. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,

0 8 * * * /usr/local/bin/zmpkg.pl Daytime
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime

On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.

Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.

For an alternative method of time controlling ZoneMinder, forum user 'voronwe' has created a more interactive calendar style integration. Details of this can be found in this forum thread. If you would like to find out more about this contribution please post on this thread.
from FAQ http://www.zoneminder.com/wiki/index.php/FAQ

quietas
Posts: 102
Joined: Wed May 23, 2007 5:30 pm

Post by quietas » Mon Jun 29, 2009 6:33 pm

Thanks, I missed that one.

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests