Modect stays active

Forum for questions and support relating to the 1.30.x releases only.
Locked
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Modect stays active

Post by Mozart »

I upgrade to version 1.30.0 and came from 1.29.0.
On 1.29.0 I had no problems with changing my cams from monitor to modect and back.

With version 1.30.0 the cams stay on modect although the website shows monitor.
Capture.PNG
Capture.PNG (13.67 KiB) Viewed 6503 times
The logs show no clues for why this is happening. I tried to change the state of the cams multiple times between monitor and modect but it does not help. What can I do to get it working again?
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Re: Modect stays active

Post by Mozart »

I deleted the cams and created them again. I still have this problem. Even if the cams show as function ' Monitor' it does motion detection...
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Re: Modect stays active

Post by Mozart »

I changed the cams from source type remote to source type ffmpeg. Now they do stop detecting motion when they are on Monitor. Seems like a bug to me.
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Re: Modect stays active

Post by Mozart »

I thought that the workaround was to switch to ffmpeg as source but that does not solve the problem.
So I created a new Ubuntu 16.04 server and reinstalled Zoneminder with the easy setup steps on the wiki.
I still have the same problem on this mint system. The system detects motion even if the cams are on 'Monitor'.
Am I the only one with this problem?
How should I debug this?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Modect stays active

Post by knight-of-ni »

Works fine here.
You need to present some real data if you want anyone to have any idea what is going on. I know you said the logs show no clues, but leave that up to us. Your interpretation of the data is not near as valuable as the data itself.

Start by showing screenshots of your camera configuration, screenshots of your motion zone configuration, and show the zoneminder log from the moment zoneminder is started until just after events are logged while the camera is in monitor mode.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
jalworth
Posts: 6
Joined: Mon Sep 12, 2016 6:14 pm

Re: Modect stays active

Post by jalworth »

I have a similar problem:
Switching from modect to monitor using ZM-console works as expected.
Using zmNinja to switch to monitor mode gets the console to think it is in monitor mode but the log shows the capture daemon getting restarted and going into alarm state.
Not sure where to go from here. (I can't post my log snippet)
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Modect stays active

Post by asker »

jalworth wrote:I have a similar problem:
Switching from modect to monitor using ZM-console works as expected.
Using zmNinja to switch to monitor mode gets the console to think it is in monitor mode but the log shows the capture daemon getting restarted and going into alarm state.
Not sure where to go from here. (I can't post my log snippet)
Are you the same person who emailed me as well ? (I am pliablepixels).
Did you try replacing your MonitorController.php with the latest version ?

ZM does not use APIs while ZMNinja does. So this difference in behavior is likely being caused by the API. I'd like to know if the behavior continues with the updated version of MonitorController.php
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
jalworth
Posts: 6
Joined: Mon Sep 12, 2016 6:14 pm

Re: Modect stays active

Post by jalworth »

Yes I did email you about zmNinja.

Can you tell be where my MonitorController.php is and where to find a new one?
what I'm seeing in the log is:

INF Got signal 15 (Terminated), exiting zm_signal.cpp
ERR Select error: Interrupted system call zm_remote_camera_http.cpp
ERR Unable to read subheader zm_remote_camera_http.cpp
ERR Unable to get response, disconnecting zm_remote_camera_http.cpp
INF 'zmc -m 3' exited normally zmdc.pl
INF Restarting capture daemon for Monitor-3, shared data not valid zmwatch.pl
INF 'zmc -m 3' started at 16/09/13 12:00:12 zmdc.pl
INF 'zmc -m 3' starting at 16/09/13 12:00:12, pid = 30863 zmdc.pl
jalworth
Posts: 6
Joined: Mon Sep 12, 2016 6:14 pm

Re: Modect stays active

Post by jalworth »

I found them. Working on it.
jalworth
Posts: 6
Joined: Mon Sep 12, 2016 6:14 pm

Re: Modect stays active

Post by jalworth »

No change. Still alarming after switching to monitor mode with API.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Modect stays active

Post by asker »

So when you edit state with the API, this code is called.
Looking at daemonControl, when you are switching from Modect to Monitor, given the monitors are saved before daemonControl is called, it will only restart zmc not zma. I wonder if zma needs to be restarted too?

Can you try this as a quick hack:
replace https://github.com/ZoneMinder/ZoneMinde ... r.php#L339 with

Code: Select all

array_push($daemons, 'zmc', 'zma');
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
jalworth
Posts: 6
Joined: Mon Sep 12, 2016 6:14 pm

Re: Modect stays active

Post by jalworth »

That fixed it. Thx.
(is Mozart reading this?)
no1knows
Posts: 8
Joined: Sun Nov 20, 2016 2:04 pm

Re: Modect stays active

Post by no1knows »

I'm also having this issue after using this method to change Run State via the API (thereby changing some cameras from "Modect" to "Monitor"). Cameras in "Monitor" mode are still alarming and recording events.

The change to MonitorsController.php hasn't fixed it.
manlio
Posts: 2
Joined: Thu Nov 24, 2016 8:35 am

Re: Modect stays active

Post by manlio »

I've got the same issue when changing the function via API. I just modified the php script, I'll let you know if it is working.
I am running Zoneminder 1.30.0 on Ubuntu 16.04 server.
manlio
Posts: 2
Joined: Thu Nov 24, 2016 8:35 am

Re: Modect stays active

Post by manlio »

I reverted the php script to the original configuration. Just using /usr/bin/zmpkg.pl 'state' (http://manpages.ubuntu.com/manpages/xen ... .pl.1.html) seems to work. I'll properly test this in the next few days.
Locked