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

From ZoneMinder Wiki
Jump to navigationJump to search
(Replaced content with "<Home =Deprecated = As of ZoneMinder 1.28.107, this hack is no longer needed. Zon...")
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Why do we need it? ==
[[Various Learnings from getting Zomeminder 1.28.1 working well on Ubuntu Server 14.04|<Home]]


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:
=Deprecated =
* You have two cameras
As of ZoneMinder 1.28.107, this hack is no longer needed.
* You want to have them set in "modect" and "disabled" when you are in the house (say 6PM - 8AM)
ZoneMinder now supports the ability to support remembering and restoring run states
* You want to have them set in "modect" and "enabled" when you are out of the house (say 8:01AM - 5:59PM)
See https://zoneminder.readthedocs.io/en/latest/userguide/gettingstarted.html and search for "run state" in that page
 
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?
 
[[http://www.pbase.com/arjunrc/image/159429902/original.jpg]]

Latest revision as of 16:19, 27 February 2020

<Home

Deprecated

As of ZoneMinder 1.28.107, this hack is no longer needed. ZoneMinder now supports the ability to support remembering and restoring run states See https://zoneminder.readthedocs.io/en/latest/userguide/gettingstarted.html and search for "run state" in that page