I believe the Zone information is linked to each particular Monitor.
When I wanted to have two different zones settings, I had to create two monitors for the same camera to adjust the zone settings, and then have two different States (Daytime, and Night) setup to apply those settings. You can probably use "default" as the daytime settings.
I had a "Front" monitor for that camera, with zones setup for daytime.
Then I created a "Front-Night" monitor for the same camera with different zone settings to so that I could exclude some problematic light sources that were causing alarms all the time.
After creating the different monitors, you'll have to setup the exact settings you want for save in a particular State.
Eg. To save the Daytime (or default) state:
- Disable the "Front-Night" monitor by setting the "Function" to "None" and have the regular "Front" monitor enabled (eg set function to Modect) and setup how you'd like it.
- Then go to the run states and select "default" from the dropdown and hit "Save".
If you want to make a change, come back re-select "default" and hit 'Save' again to update that state.
Note: Hitting "Apply" will simply retrieve the that saved state's information and apply it to your monitors. (it won't save anything)
Then repeat for your "Night" state:
- Disable the "Front" monitor by setting the "Function" to "None" and have the "Front-Night" monitor enabled (eg set function to Modect) and setup how you'd like it.
- Then go to the run states and enter "Night" into the box and hit "Save".
If you want to make a change for that Night state change things then come back re-select "Night" from the dropdown and hit 'Save' again to update that state.
If you want this to work automatically to switch between day and night, you'll have to setup a cron job to apply the states to Zoneminder.
I setup this under /etc/crontab a few years ago.
The following switches the state to Daytime at 7am, then at 7:02am it restarts zoneminder to have it correctly apply the state.
(I'm not sure if the restart is still required, but it works)
Then at 17 (5pm) it switches to "Night" state and then at 5:02pm it restarts zoneminder to apply that state correctly as well.
Eg. Add the following after any other system stuff in /etc/crontab
Note: if using the 'default' state name instead of "Daytime" replace any instances of "Daytime" below with "default".
Code: Select all
# Zoneminder - Switch between different states
# m h dom mon dow user command
0 7 * * * root /usr/bin/zmpkg.pl Daytime
2 7 * * * root /usr/bin/zmpkg.pl restart
0 17 * * * root /usr/bin/zmpkg.pl Night
2 17 * * * root /usr/bin/zmpkg.pl restart
#
Edit: added note about setting function to None to properly disable a Monitor.