New IT forum
13 August 2022, 11:26:51 am *
Welcome, %1$s. Please login or register.

: CubieBoard 2 and Cubietruck both now in stock.
 
Pages: [1] 2

Author Topic: HOWTO- Setup Zoneminder in your guruplug  (Read 31751 times)

PacoLM

  • Full Member
  • ***
  • Posts: 108
HOWTO- Setup Zoneminder in your guruplug
« on: 28 January 2011, 01:06:03 pm »

Hi,

 Follow the instructions -> http://plugcomputer.org/plugwiki/index.php/ZoneMinder

Hope it helps!

PacoLM
Logged

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #1 on: 12 October 2011, 06:47:38 pm »

Paco,

I am having problems with Zoneminder. I need your assistance if possible. I assume you still have a working zoneminder.

I have never been able to get remote IP cameras to work with ZM so to simplify things i have put an old webcam into the sheevaplug USB port. I found that I had a problem with USB cam drivers and settings which I finally sorted and I now get an image using Camorama in a VNC window.

I have had a look at your wiki page as above but there seem to be issues with Zoneminder itself. I installed zm from the debian repositories and I get the zm index page displayed and I can add monitors. The version installed is v1.24.4 according to the screen. However zm seems to have issues in some of the modules. I was getting the repeated error 'zmwatch [Shared data size conflict in shared_data for monitor USB-Cam, expected 328, got 316]' in the syslog and also in /tmp/zmwatch.log. I have found what might be a fix for this problem from a Red Hat problems page viz:-

Quote

Fix an error at I386:
zmwatch[2429].ERR [Shared data size conflict in shared_data for monitor
Monitor-1, expected 328, got 316]

The patch for i386 ($arch should be 32 here but perl uses 64 bit integer):
-----
-our $arch = int(3.2*length(~0));
+our $arch = 32;
-----

I'm not sure how to properly fix this. I'm all ears.


OK I know that was i386 as opposed to ARM9 but the file '/usr/share/perl5/ZoneMinder/Memory.pm' has the same line. Changing it as above allows things to move on and the 'Shared data size...' error has gone. However I now get errors reported in my syslog viz:-

Code: [Select]
Oct 12 19:32:33 localhost zmdc[6993]: INF [Starting pending process, zmc -d /dev/video0]
Oct 12 19:32:33 localhost zmdc[6993]: INF ['zmc -d /dev/video0' starting at 11/10/12 19:32:33, pid = 12856]
Oct 12 19:32:33 localhost zmdc[12856]: INF ['zmc -d /dev/video0' started at 11/10/12 19:32:33]
Oct 12 19:32:33 localhost zmc_dvideo0[12856]: INF [Debug Level = 0, Debug Log = <none>]
Oct 12 19:32:33 localhost zmc_dvideo0[12856]: INF [Starting Capture]
Oct 12 19:32:33 localhost zmc_dvideo0[12856]: WAR [Hue control is not supported]
Oct 12 19:32:33 localhost zmc_dvideo0[12856]: WAR [Saturation control is not supported]
Oct 12 19:32:35 localhost zmc_dvideo0[12856]: INF [Got signal 11 (Segmentation fault), crashing]
Oct 12 19:32:35 localhost zmdc[6993]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
Oct 12 19:32:42 localhost zmdc[6993]: INF [Starting pending process, zmaudit.pl -c]
Oct 12 19:32:42 localhost zmdc[6993]: INF ['zmaudit.pl -c' starting at 11/10/12 19:32:42, pid = 12857]
Oct 12 19:32:42 localhost zmdc[12857]: INF ['zmaudit.pl -c' started at 11/10/12 19:32:42]
Oct 12 19:32:43 localhost zmdc[6993]: ERR ['zmaudit.pl -c' exited abnormally, exit status 9]

OK it is a simple webcam but I can't find any reference to these problems through googling and I am wondering what made your zoneminder work and did not suffer from these errors? Any thoughts?

TIA, Tony
Logged
Tony Pemberton

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #2 on: 12 October 2011, 08:22:39 pm »

Hi,

 I have exactly the same fix for the error of shared data size conflict. It's a 'bug' in the version 1.24.4.

About setting up ZM in a sheeva or guruplug, I do not have the experience, because all the cams I have are IP cams. I have tried once, but to make it work I believe you have to recompile your own kernel adding the modudes and drivers needed.

 If you were able to get an image using Camorama, it's good news, then seems more a question of settings in ZM. Are you setting the good values in resolution, palette, etc?

Hope it helps,

PacoLM
Logged

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #3 on: 15 October 2011, 10:27:42 am »

I have not had time to progress the still remaining problems but thanks for your reply above.

I guess the change to the code above is to determine the integer size to be used by ZM. Using a fixed number of 32 probably is a crude fix and a better perl method of calculating integer length would be more appropriate. Have to try it out sometime.

I have begun to investigate the other errors by looking at the ZM debug logs and will post a message if and when I get an answer.

Keeps the ole grey matter alert i guess :)
Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #4 on: 16 October 2011, 08:15:51 am »

I did do a test on the Perl integer calculation as above.

It seems the variable $arch is a reserved word in Perl.

I made the file:-

Code: [Select]
#!/usr/bin/perl

use strict;

$a = int(3.2*length(~0));

print "$a \n";


Executing this returns the value 64, so I guess the ARM architecture generates 64 bit integers. I thought 64 bits tended to be a long integer. Perhaps thats my 8 bit archtecture legacy showing through!

Anyway fixing the value of $arch in '/usr/share/perl5/ZoneMinder/Memory.pm' to 32 cures the previous problems but now I am getting crashes from zm_signal.cpp with a segmentation fault. I really don't want to have to compile from source but it seems that if i really want Zoneminder, I will have to!

Logged
Tony Pemberton

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #5 on: 17 October 2011, 08:40:07 pm »

After some problems, I have setup the latest version of Zoneminder  (1.25.0) in one of my two guruplugs. It works fine!!!

PacoLM
Logged

kai

  • Newbie
  • *
  • Posts: 8
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #6 on: 26 October 2011, 07:39:00 am »

HI

I''m a newby in zoneminder .

I had a sheevaplug loaded with zoneminder and work with D-link DCS-900.

The zoneminder is working except that it captures the picture every 15 seconds.

Is there anything wrong with my configuration which I can't figure out why ??

Thank you for help with this problem.  :"D

Kai
Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #7 on: 26 October 2011, 10:00:04 am »

Hi kai,

 Could you post the configuration you haev for the monitor?.

PacoLM
Logged

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #8 on: 26 October 2011, 01:12:48 pm »

Thanks for the zoneminder set up info. I could not follow your brief exactly since the host is also being used for MRTG and thus multiple Apache 'sites' are needed. Although compiled and installed, including the most useful setup for Mysql, I have not yet had the time to diagnose the USB camera which still does not want to play properly. I'm sure that it will get solved but only when I get a bit more time. I'm still puzzled by the integer size calculation in 'Memory.pm' in that the natural calculation gives 64 bits rather than 32, it is not a show stopper but I'd like to know.

Anyway thanks again Paco
Logged
Tony Pemberton

kai

  • Newbie
  • *
  • Posts: 8
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #9 on: 27 October 2011, 01:19:28 am »

HI PacoLM

General: http://ppt.cc/q(Co


Source: http://ppt.cc/l41N


Timestamp: http://ppt.cc/VQVF


Buffers: http://ppt.cc/f0SP


Misc: http://ppt.cc/RliE


THX : )

Kai
« Last Edit: 27 October 2011, 01:42:50 am by kai »
Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #10 on: 27 October 2011, 04:26:11 am »

Hi,

 In General: set Maximum FPS to 2, Alarm Maximum FPS to 5, just to check if ZM is able to get 2 frames per second. Also check the logs (/var/log/syslog). Post a fragment of them if you continue with the problem.

PacoLM
 
Logged

kai

  • Newbie
  • *
  • Posts: 8
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #11 on: 27 October 2011, 05:19:24 am »

HI

I set Maximum FPS to 2, Alarm Maximum FPS to 5

--> State: Idle - 2.15 fps

and cat /var/log/syslog

Oct 27 13:15:10 debian zmdc[1180]: INF [Starting pending process, zmc -m 6]
Oct 27 13:15:10 debian zmdc[1180]: INF ['zmc -m 6' starting at 11/10/27 13:15:10, pid = 3456]
Oct 27 13:15:10 debian zmdc[3456]: INF ['zmc -m 6' started at 11/10/27 13:15:10]
Oct 27 13:15:10 debian zmc_m6[3456]: INF [Debug Level = 0, Debug Log = <none>]
Oct 27 13:15:10 debian zmc_m6[3456]: INF [Starting Capture]
Oct 27 13:15:17 debian zms[3458]: INF [Debug Level = 0, Debug Log = <none>]
Oct 27 13:15:32 debian zms[3470]: INF [Debug Level = 0, Debug Log = <none>]
Oct 27 13:15:47 debian zms[3477]: INF [Debug Level = 0, Debug Log = <none>]


Kai
Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #12 on: 27 October 2011, 07:26:47 am »

So, is it working fine?
Logged

kai

  • Newbie
  • *
  • Posts: 8
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #13 on: 27 October 2011, 07:59:24 am »

HI

no..

The zoneminder is still working except that it captures the picture every 15 seconds.

http://ppt.cc/7BGp


http://ppt.cc/rK1D


Kai
Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Re: HOWTO- Setup Zoneminder in your guruplug
« Reply #14 on: 27 October 2011, 08:22:10 am »

Well, could be a problem in your camera configuration or your network configuration. It's weird, could you stop and restart your ZM and then zip the /var/log/syslog file and post it here?
Logged
Pages: [1] 2
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!