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
Kindly guide any way to schedule recording for a particular camera
-
- Posts: 24
- Joined: Tue Aug 15, 2017 3:33 am
Re: Kindly guide any way to schedule recording for a particular camera
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
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
-
- Posts: 24
- Joined: Tue Aug 15, 2017 3:33 am
Re: Kindly guide any way to schedule recording for a particular camera
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
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Kindly guide any way to schedule recording for a particular camera
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/
All of these can be found at https://zoneminder.blogspot.com/
Re: Kindly guide any way to schedule recording for a particular camera
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
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