Page 1 of 1

Kindly guide any way to schedule recording for a particular camera

Posted: Thu Apr 21, 2022 3:55 pm
by aruneshdutta
Hello all

Have been using Zoneminder for quite sometime and it's great, wanted to know is there a way to schedule recording for a particular camera present in Zoneminder based on timings of the day like only recording from 6PM - 6AM ..kindly guide..The camera currently uses MOCORD

Re: Kindly guide any way to schedule recording for a particular camera

Posted: Thu Apr 21, 2022 5:06 pm
by fontiano
You can work with states:

first you have to set all the cameras to the "normal" mode (MONITOR? MODETECT? NONE?) and save the state (for example "NORMAL")
then you have to set the desired camera to MOCORD mode and save the state (for example "CAMERAX-MOCORD")


Now you can play with crontab and the CLI command to change state: /usr/bin/zmpkg.pl 'desired_state_name'

# /etc/crontab
1 6 * * * root /usr/bin/zmpkg.pl NORMAL
1 18 * * * root /usr/bin/zmpkg.pl CAMERAX-MOCORD

Re: Kindly guide any way to schedule recording for a particular camera

Posted: Fri Apr 22, 2022 11:11 am
by aruneshdutta
Thanks for the message , as you guided to change the mode of other cameras but I want to use other cameras as well in mocord mode but only schedule a particular camera..do guide

Re: Kindly guide any way to schedule recording for a particular camera

Posted: Fri Apr 22, 2022 12:11 pm
by knight-of-ni
That's exactly what the state change logic allows you to do. If you only want to change the mode of one camera, you can do that.

Re: Kindly guide any way to schedule recording for a particular camera

Posted: Fri Apr 22, 2022 1:36 pm
by vrm42z
when using many cameras there can be a better way to control cameras individually instead of creating many states.

curl -XPOST http://localhost/zm/api/monitors/22.json -d "Monitor[Function]=Mocord&Monitor[Enabled]=1"
where 22 is the camera id

put this command to cron as it was descibed above and change Mocord to Record for the other starting time