Page 1 of 1

Webcam Not Connecting to ZoneMinder

Posted: Thu Jul 06, 2017 12:27 am
by frustrated
I'm slowly adding my wireless webcams to ZoneMinder. When I added my 4th webcam, which is setup just like my other identical cams - vice IP, etc..., ZoneMinder doesn't display the video. As well, the IP address in the console's Source column remains the color red. I'm not quite sure why this is occurring. The webcam is connected to the wireless network as I'm able to log into it and see the video feed; I'm able to ping it as well. I've deleted the webcam from ZoneMinder two times now and added it back again with no luck. I keep troubleshooting and nothing seems to be glaringly incorrect in the monitor setup. Any ideas?

Re: Webcam Not Connecting to ZoneMinder

Posted: Thu Jul 06, 2017 4:18 am
by Pedulla
I'd suggest getting it to work wired first, then going wireless.
What's the model of cam?
What version of ZM
What OS
...

Re: Webcam Not Connecting to ZoneMinder

Posted: Thu Jul 06, 2017 12:03 pm
by rockedge
if the webcam is "local" there may be a permission issue. you may try in a terminal:

Code: Select all

chown www-data /dev/video*
then open the camera's settings window and re-save the settings...you should see green and a working camera.

Re: Webcam Not Connecting to ZoneMinder

Posted: Sat Jul 08, 2017 3:42 am
by frustrated
Pedulla...When I first setup my webcams, I do it wired, so no issues there. The model is a Sharx SCNC2900 series webcam. The ZoneMinder version is 1.30.4. The OS I use to access the Ubuntu Server that ZoneMinder is installed on is typically macOS Sierra but I can, and sometimes do, use Linux.

rockedge...All of my webcams are setup for a Source Type of Remote.

I did notice that when I click on the IP address in the Source column and open the webcam's settings and then click Save, the webcam's IP address turns green. I can then click on the webcam's Name and I'm able to see the video stream.

I'm not sure how to phrase this question, but, from the ZoneMinder console, does ZoneMinder "check" to see if the webcams are on/attached/working/streaming video?

Does the ZoneMinder console refresh itself? How often? Can this setting be changed?

Re: Webcam Not Connecting to ZoneMinder

Posted: Sat Jul 08, 2017 11:43 am
by bbunge
Usually when an added camera does not work when others added before work your server is out of memory. Check for free space in /dev/shm. Switch to ffmpeg source type and lower the resolution of all the cameras. Or add memory to the server.

Re: Webcam Not Connecting to ZoneMinder

Posted: Sat Jul 08, 2017 2:57 pm
by frustrated
bbunge...I presently have 32 Gig of memory in my server. On the ZoneMinder console display in the upper right, I have never seen the /dev/shm even reach 20% with all of my webcams entered; with just three webcams, the webcams not even powered on, the /dev/shm is at 10%.

Re: Webcam Not Connecting to ZoneMinder

Posted: Sat Jul 08, 2017 5:24 pm
by rockedge
the web console does refresh every few minutes. That value I do not remember at the moment and would have to track down where it is set. I understood "webcam" as being a local camera connected directly to the computer. It seems that your using network cameras and you used the "remote" method.
So does the "Source" links (to the monitor settings) first turn green after saving, then turn red. Meaning the camera starts then stops?
Or are you describing a problem with the web console NOT refreshing?
After the initial camera setup does it go red then you re-save and then the camera turns green?

Re: Webcam Not Connecting to ZoneMinder

Posted: Sat Jul 08, 2017 5:44 pm
by frustrated
Yes, all my webcams are connected using Remote.
Yes, the Source first turns green after saving; when it's green, I can use ZoneMinder to view the video feed. If i click Refresh, the webcam's Source goes to red. However, when I log in directly to the webcam, even though the ZoneMinder Source is red, I can see a live video feed; the webcam is working.
I was hoping that the console, when it refreshes, would somehow reconnect to the webcams when the Source is red thereby turning it green.

I'm not sure if this helps or not...the webcams are in my home so I can't keep the webcams on all the time or they will be recording all the time. I have to turn the webcams off when I'm home. When I leave, I turn the webcams on hoping that ZoneMinder will refresh and "find" the webcams thereby turning their Source to green.

Re: Webcam Not Connecting to ZoneMinder

Posted: Sat Jul 08, 2017 6:07 pm
by rockedge
I'm not sure if this helps or not...the webcams are in my home so I can't keep the webcams on all the time or they will be recording all the time. I have to turn the webcams off when I'm home. When I leave, I turn the webcams on hoping that ZoneMinder will refresh and "find" the webcams thereby turning their Source to green.
ahhh I understand. I do not think this approach will work as planned. There are several methods discussed on how to best do exactly what you describe. I would recommend to you to start looking into "Run States" and configuring ZM for this.
Set ZM up for when you are at home not to record anything and save that as a Run State. Then setup ZM to record and save that as a different Run State. So when no one is home switch to Run State "no on home" and then when people are at home switch to that Run State.
I know somewhat awful explanation but it is Saturday and my brain in in Run State "Saturday".

ZoneMinder can not restart the cameras after you turn them off and on manually. But will as a result of a Run State change.

Re: Webcam Not Connecting to ZoneMinder

Posted: Sun Jul 09, 2017 5:59 pm
by frustrated
Oh no...that's too bad. Turning the cams on and off are the best solution for me right now. Until I can get to a place where I can actually use Run States, I'm not sure how to proceed.

Is there a way to make a ZoneMinder development request by chance? Maybe ZoneMinder can be developed that when it "refreshes", sooner than every couple of minutes, it is the same as when you "Save" a monitor? In this way, all of the associated webcam's Source is in the green? This may be just wishful thinking though.

Re: Webcam Not Connecting to ZoneMinder

Posted: Mon Jul 10, 2017 2:23 am
by rockedge
I think it is a decent suggestion. Perhaps an option in the monitor setup to attempt a camera restart at a page refresh, but then as was discussed in another thread on this forum, how to best detect if a camera is "down" or streaming? So a restart request for a camera only happens if it is showing up Red on the web console.

Changing Run State is simple from the web console. click on "Running" and give the new State a name and save. Then change all the cameras functions to "None" and again set a State name and save. Then just click once on a the Run State that suits the moment, either cameras all on or all off. I am assuming it is easier to reach the cameras themselves than the zoneminder console in your case.

Re: Webcam Not Connecting to ZoneMinder

Posted: Mon Jul 10, 2017 10:41 pm
by frustrated
Interestingly, I was able to log into the webcam itself and see the video feed. It's when I tried to use ZoneMinder to view the video feed that I wasn't able to see it. I figured it was something in ZoneMinder that dropped the video feed from the webcam somehow. I think we are referencing the same thing here. I was just looking for something that could be developed in ZoneMinder to "fix" itself somehow to begin displaying the video feed again. I hope that's understandable...it's Monday!

Re: Webcam Not Connecting to ZoneMinder

Posted: Tue Jul 11, 2017 1:58 am
by rockedge
yes I do understand. Your looking for ZM to restart the camera after signal loss or camera shutoff. My ip net cam will be restarted by ZoneMinder after a signal loss automatically I think. Are you watching the logs? So the trouble here is you can see a camera stream when using the camera's webgui.....but not when using ZM?

Re: Webcam Not Connecting to ZoneMinder

Posted: Tue Jul 11, 2017 8:19 pm
by frustrated
That's correct...I see the webcam video stream using the cam's webgui with no issues. The webcam never stops transmitting the video stream. The problem is ZoneMinder somehow stops displaying the stream for some reason. I'm not looking for ZoneMinder to restart the camera, I'm looking for ZoneMinder to make sure it is displaying the stream the webcam is providing, and if it's not, refresh itself to be able to display the stream. I haven't been watching the logs and I know I should...ugh.

Re: Webcam Not Connecting to ZoneMinder

Posted: Tue Jul 11, 2017 9:08 pm
by rockedge
we need to see what is occurring in the logs as to why the camera stream in ZM is crashing, I think it will be easier to find a fix.