Difference between revisions of "Modifying ZoneMinder to remember run state names"

From ZoneMinder Wiki
Jump to navigationJump to search
Line 17: Line 17:
So wouldn't it be cool if we could modify ZM to remember run state names and display them like this?
So wouldn't it be cool if we could modify ZM to remember run state names and display them like this?


[http://www.pbase.com/arjunrc/image/159429902/original.jpg]
[[File:Example.jpg]]

Revision as of 15:39, 22 March 2015

Why do we need it?

Zone minder already supports run states. You can configure your monitors in specific modes, save then as "run states" and use cron to switch to them. For example, let's take this situation:

  • You have two cameras
  • You want to have them set in "modect" and "disabled" when you are in the house (say 6PM - 8AM)
  • You want to have them set in "modect" and "enabled" when you are out of the house (say 8:01AM - 5:59PM)

So let's say, you create two states, "in" and "out" and set up your cron to switch between them based on time of day. All great!

But now let's say you want to create a state called 'vacation' which is basically the same as "out" but you want to differentiate it from out because if you are in "vacation" mode, you don't want cron to change state back to "in" - you want to record all the time.

How do you do it? Well you can't because Zoneminder only remembers "monitor states". It does not remember the name of the state. And given that "out" is the same as "vacation" in terms of monitor states, there is nothing that differentiates them as far as zone minder goes.

You can of course work around this limitation by having some sort of check where you change cron files but that is not a clean solution. Plus, lets say you leave for vacation and then need to set your mode to vacation remotely - you likely have access to your ZM console but don't have access to ssh to your box - you'd like to set it to vacation via the ZM console and have cron respect it.

So wouldn't it be cool if we could modify ZM to remember run state names and display them like this?

Example.jpg