Scheduling Modect?

Forum for questions and support relating to the 1.28.x releases only.
Locked
ubun2Junky
Posts: 4
Joined: Fri Jan 09, 2015 2:17 pm

Scheduling Modect?

Post by ubun2Junky »

I have a camera that oversees a very busy area. During the day I don't really care to have it record any activity, but during the evening I'd like to enable the motion detection and have it record. So during the day I'd like to have the camera on Monitor function and at night switch it to Modect. Is there a way to schedule this on ZM?

Are there command line statement that you can send to ZM to have it switch functions for a specific camera? If so perhaps I can setup a cron job that would the script at the times that I need to make the change. Love to hear input from other and how they've tackled this. Thx.
User avatar
iconnor
Posts: 3335
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Scheduling Modect?

Post by iconnor »

I'll add an issue to github about it, but I suspect it will be a while before it is supported unnless someone throws money at it.

For now, what I would do is use cron to run a script that updates the Function column of the Monitors table and then restarts zmc for that monitor.
ubun2Junky
Posts: 4
Joined: Fri Jan 09, 2015 2:17 pm

Re: Scheduling Modect?

Post by ubun2Junky »

iconnor wrote:I'll add an issue to github about it, but I suspect it will be a while before it is supported unnless someone throws money at it.

For now, what I would do is use cron to run a script that updates the Function column of the Monitors table and then restarts zmc for that monitor.
iconnor;

I appreciate you helping me out with my request. I did manage to get my script to update the database, however I'm not sure how to restart zmc for the monitor.
User avatar
iconnor
Posts: 3335
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Scheduling Modect?

Post by iconnor »

zmdc.pl restart zmc -m 1

to restart monitor 1
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Scheduling Modect?

Post by knight-of-ni »

This feature is already supported and is documented in the FAQ:
http://www.zoneminder.com/wiki/index.ph ... or_week.3F

Once you have your states defined then call them from cron.
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/
DVB Hardware
Posts: 204
Joined: Thu Jan 01, 2015 5:12 pm
Location: Rhode Island

Re: Scheduling Modect?

Post by DVB Hardware »

Is't it easier to set it up with Scheduling as described in the FAQ's rather than messing with writes to the db and restarts.
FAQ How can I get ZM to do different things at different times of day or week?

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

Jimmy
Linux Mint 23 Cinnamon Mariadb 10.x using Master 1.37.x latest always

DVB stands for Digital VIdeo Broadcasting , retired satellite downlink supplier
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Scheduling Modect?

Post by knight-of-ni »

There is an echo in here.
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/
DVB Hardware
Posts: 204
Joined: Thu Jan 01, 2015 5:12 pm
Location: Rhode Island

Re: Scheduling Modect?

Post by DVB Hardware »

What a difference an 13 min coffee break makes
Linux Mint 23 Cinnamon Mariadb 10.x using Master 1.37.x latest always

DVB stands for Digital VIdeo Broadcasting , retired satellite downlink supplier
Locked