Zone configuration based on time

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
User avatar
BrownBottle
Posts: 18
Joined: Mon Apr 16, 2007 8:02 pm
Location: Florida, USA

Zone configuration based on time

Post by BrownBottle »

I am currently setting up a server just for ZoneMinder on a fresh install of FC6. I am very pleased with the configurability of the motion detection engine and zone definition. I am using exterior cameras, and as such, I am at the mercy of the sun. It would be extremely useful to be able to set my motion detection based on time of day, (i.e. one set for night and another set for day).
Larry



Work is a great thing to see -- in your rearview mirror ;-)
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

search for 'run states cron'
this has been discussed many times mate
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
BrownBottle
Posts: 18
Joined: Mon Apr 16, 2007 8:02 pm
Location: Florida, USA

Post by BrownBottle »

cron will let me change the run state but not allow me to keep running with different settings for my motion capture. Daylight and night time capture can be radically different in terms of threshold and lighting changes.

edit: Perhaps I could define multiple monitors using the same camera and shift the function from modect to monitor and back using cron. I have not come across a way to let me access the function a monitor.
Larry



Work is a great thing to see -- in your rearview mirror ;-)
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

never having used it myself, (if you have a look the threads are about) you setup multiple monitors with different zone setting, so lets say you have

1. Cam1_Day
2. Cam1_Night

Use cron to change cam1day to NONE and cam1night to modect at the required time. Repeat for your cams
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
BrownBottle
Posts: 18
Joined: Mon Apr 16, 2007 8:02 pm
Location: Florida, USA

Post by BrownBottle »

That was my intent, however, all I can find is a reference to zmpkg.pl and start, stop, restart, and status. I have not found any reference to a script that will let me modify the monitors directly.

edit: After going over all of the content for 'cron run states', I have finally found the one message that describes the process of saving run states and using them from zmpkg.pl. I found no mention of this in the readme or anywhere else. I'm sure that, knowing the answer ahead of time, this all seems a bit silly, but when you don't know the answer, you don't know what to look for! Thanks again for your patience.
Larry



Work is a great thing to see -- in your rearview mirror ;-)
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

I understand mate, dont worry. I have never done it myself but have seen it crop up a few times
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Dirky
Posts: 22
Joined: Sat Oct 16, 2004 6:10 pm

Post by Dirky »

BrownBottle wrote:That was my intent, however, all I can find is a reference to zmpkg.pl and start, stop, restart, and status. I have not found any reference to a script that will let me modify the monitors directly.

edit: After going over all of the content for 'cron run states', I have finally found the one message that describes the process of saving run states and using them from zmpkg.pl. I found no mention of this in the readme or anywhere else. I'm sure that, knowing the answer ahead of time, this all seems a bit silly, but when you don't know the answer, you don't know what to look for! Thanks again for your patience.
Hehhe, care to post that *one* link please?

I'm trying to use zmpkg.pl to change runstates but failing for some reason.
thanks
Mike
User avatar
BrownBottle
Posts: 18
Joined: Mon Apr 16, 2007 8:02 pm
Location: Florida, USA

Post by BrownBottle »

Sorry for not referencing the thread before, and it has been quite a while since I searched it. I really can't recall the exact message, however I can give you a synopsis:
Set up the state that you would like to invoke, (i.e. camera 1 off and camera 2 on or a specific set of zones enabled.) then within the web interface, go to the link at the top of the page to change the state of Zoneminder (running or stopped). A dialog box will appear where you can enter a name for a new state and save it. Once you have saved one or more states. you can invoke these just as you would with Start, Stop or Restart. In your crontab entry, just use the name of the state you just saved, (0 7 * * * /usr/local/bin/zmpkg.pl cam_1_off) assuming that the saved state was cam_1_off. Using this method, any number of states can be established and invoked from Cron.
I hope my ramblings are at least somewhat understandable :-)

Larry
Larry



Work is a great thing to see -- in your rearview mirror ;-)
Dirky
Posts: 22
Joined: Sat Oct 16, 2004 6:10 pm

Post by Dirky »

Larry, many thanks for that. All is clear now :)

Mike
Post Reply