Auto change Run State problem

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
jackychen
Posts: 2
Joined: Fri Jan 28, 2022 3:16 am

Auto change Run State problem

Post by jackychen »

Hi everyone, I'm a newer for zoneminder. I have one requirement is that let zoneminder change Run State automatically according to time.
Then I find docs on web: https://zoneminder.readthedocs.io/en/la ... on-example

In my case, I create Daytime and Nighttime for switch the Run State as example above.
Daytime will using Mocord, Nighttime will using Modect.
When I use cron or typing "/usr/bin/zmpkg.pl Daytime" or "/usr/bin/zmpkg.pl Nighttime" in console, there have problem.
Below is cron list:
0 8 * * * /usr/bin/zmpkg.pl Daytime
0 20 * * * /usr/bin/zmpkg.pl Nighttime

Details of problem
Using cron:
1. From the system notification mail said, it was exec correctly, but there have error message:
--"Job for zoneminder.service failed because the control process exited with error code.See "systemctl status zoneminder.service" and "journalctl -xe" for details."--
2. Check video event records, the real capturing mode seem not switch to Nighttime on 20:00 pm immediately until next day 00:00.
The "Cause" always show "Continuous" instead of "Motion" until next day 00:00.
event.png
event.png (32.5 KiB) Viewed 2189 times
When I change it in Web UI by manually, it seem same, it show mode is changed in "Console" page, but real capturing mode not in "Events" list page.

Using console:
1. I can see the Run State has been changed immediately and with correctly capturing mode in "Console" page.
2. But running "systemctl status zoneminder.service" to check status, sometime said service ok sometime said failed.
status.png
status.png (170.01 KiB) Viewed 2189 times
And the real capturing mode not change immediately also.

My question:
If switch the Run State, Is it have another addational action need to do? Because the real capturing mode not switch immediately.
jackychen
Posts: 2
Joined: Fri Jan 28, 2022 3:16 am

Re: Auto change Run State problem

Post by jackychen »

Well, I'm aware that it's not enough just change the Run State on Web UI or "/usr/bin/zmpkg.pl Daytime" and "/usr/bin/zmpkg.pl Nighttime", it need disable and enable camera after change the Run State also, then the "Cause" will change from Motion -> Continuous immediately.
Both working on Web UI and command line.
After will check with crontab.
User avatar
iconnor
Posts: 1906
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Auto change Run State problem

Post by iconnor »

Check your logs.

Also, 1.34 is no longer supported.
Post Reply