Kindly guide any way to schedule recording for a particular camera

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
aruneshdutta
Posts: 24
Joined: Tue Aug 15, 2017 3:33 am

Kindly guide any way to schedule recording for a particular camera

Post 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
fontiano
Posts: 68
Joined: Wed Dec 25, 2019 10:29 am

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

Post 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
Production: zm 1.34.26 - Debian 11 | Test: zm 1.36.33 - Debian 12
aruneshdutta
Posts: 24
Joined: Tue Aug 15, 2017 3:33 am

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

Post 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
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

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

Post 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.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
vrm42z
Posts: 14
Joined: Sat Apr 11, 2020 4:55 pm

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

Post 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
Post Reply