Page 1 of 1

ZoneMinder on Raspberry Pi

Posted: Fri Jan 11, 2013 5:51 pm
by shields
Anyone have any luck getting ZoneMinder on the latest Raspberry Pi?

I have the Rev B. board and am having some difficulties getting it functioning.

I installed ZoneMinder via apt-get
Tried to follow the additional steps located at:
http://www.zoneminder.com/wiki/index.ph ... rom_a_.deb

Got to the part where I need to install ant...had a couple of hiccups that I think i resolved correctly.
One major thing is I had forgotten to restart and resize the partition of my SDcard so it was running out of space (doh')

Installed JavaSDk via apt-get in order to build cambozola.jar
Ended up with currently installed:
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6.1.11.5) (6b24-1.11.5-1+rpi1)
OpenJDK Zero VM (build 20.0-b12, mixed mode)

First attempt at building yielded nothing.

Ran apt-get update
Rebooted

Attempted building and success!
Moved the newly built Cambola.jar files to the /usr/share/zoneminder directory

Tried logging in to the admin control panel via NetSurf. Input my username and password (default admin still)
Says the Page is Done loading, but all I get is a message across the top ZoneMinder Login" "Logging In"

Curiously, before I installed Java and Cambola I was able to login to ZoneMinder and poke around and look at all the settings, menus, etc...

Thoughts from any experts? (one of which I am not)

Re: ZoneMinder on Raspberry Pi

Posted: Sun Jan 13, 2013 5:28 pm
by aperry
I tried this one my 256mb raspi board. I installed with apt-get on top of raspbian and it worked pretty much out of the box (after linking the html content to the right location). However, it was unbearably slow. I messed around with shared memory/etc, but I just couldn't get it to work acceptably. I went back to my dockstar configuration on 1.24.2 and it seems faster. I believe the dockstar has a faster CPU, but no HDMI or audio.

Aaron

Re: ZoneMinder on Raspberry Pi

Posted: Mon Jan 14, 2013 12:18 pm
by shields
any hints on getting it to work correctly? perhaps something related to the "html linking"?

Re: ZoneMinder on Raspberry Pi

Posted: Mon Jan 14, 2013 6:52 pm
by aperry
You mentioned that you got to the login page, so I doubt HTML linking is your problem. But, FWIW, this is what I had to do manually after installing ZM using apt-get:

From the ZM wiki page:
No Link to Webserver directories
If you get a 404 error when browsing to http://localhost/zm, Zoneminder has failed to setup a correct link to the Apache2 web directories. This can be fixed via (must be root):
$ln -s /usr/share/zoneminder /var/www/zm


I think that corrected the issue on my system and everything worked. If you're still having trouble then take a close look in the log files for clues. When I had this up and running on raspi, I noticed one really nice feature that I guess is new in ZM version 25, being that the log messages are easily accessible from the console (no digging around in file system). But if you don't have access to the console then you need to bring up the logs from the file system (/var/log/messages and /tmp/ by default I think). Look for errors and warnings.

Hope this helps,
Aaron

Re: ZoneMinder on Raspberry Pi

Posted: Mon Jan 14, 2013 9:36 pm
by shields
OK, so I started over. Here's where I am so far.

Wiped out the disc image and re-imaged it with Wheezy (2012-12-16)
Resized the partition
Set X to start on boot
Set TimeZone

Rebooted.

Launched LXTerminal

Ran sudo -s
Ran sudo apt-get install zoneminder

Then I proceeded to follow the instructions in the Wiki

Link Apache
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf

Restart Apache
sudo apache2ctl restart

suid zmfix
sudo chmod 4755 /usr/bin/zmfix

Run zmfix
zmfix -a

Fix export problem
sudo chown www-data.www-data /usr/share/zoneminder/temp

edit /etc/sysctl.conf and add the following lines (for 128meg shared mem) <<== DID NOT DO THIS
kernel.shmall = 134217728
kernel.shmmax = 134217728


Stopped right after the "Fix export problem"

Testing at this point and Lo and behold I am able to launch Zoneminder at localhost using NetSurf. A couple of things...it doesn't ask for a username or password. I am able to get into the options window, but a lot of the buttons say Warning: button cannot be activated. I get the same results using the Midori browser.

Moving forward I go to the Zoneminder Downloads page and download Cambozola.jar directly rather than trying to build it myself and put it in /usr/share/zoneminder
Enabled in options->Images.

Rebooted.

Still able to launch ZoneMinder. Logs in with no password or username.

Save buttons seem to save the settings in options, Cancel buttons do nothing.

Refresh, Add New Monitor, Filters, Edit and Delete Buttons on the Landing Page give the Warning: button cannot be activated.

Sorry for the lengthy description of the steps I followed, but I've found when describing the actions I've taken when attempting to work with new software/hardware...it's often easier for those in the know to point out anything I've overlooked or something stupid I may have done.

One additional note: Midori let's me click on the Refresh, Add New Monitor, etc...buttons with no issues. However, the Cancel buttons still do nothing.

Re: ZoneMinder on Raspberry Pi

Posted: Mon Jan 14, 2013 10:07 pm
by aperry
Looks like progress to me. I've never used Midori or Netsurf, but Chrome seems to work well for me. I just tested on my 1.24.2 installation and, for example, when I open the options link and then hit "cancel", the window closes (i.e. it works as it should). Can you try with a more mainstream browser like Firefox or Chrome?

I don't know about the user/password behavior that you're seeing. I can't remember if I needed anything on my new raspi install, but something tells me that I didn't. You can configure these in the console after installation.

Aaron

Re: ZoneMinder on Raspberry Pi

Posted: Tue Jan 15, 2013 12:47 pm
by shields
Update: took your advice and installed chromium.

Ran: sudo apt-get install chromium-browser

Everything downloaded and installed without a hitch. Shortcut showed up in the Internet menu. Fired up Chromium...works great.
All of the buttons behave with no warnings. The options link actually opens in a new window now. (which I assume is it's default behavior)

Now on to setting up ZoneMinder and getting it to work with some cameras.

Apologies for being so verbose...but I write in this fashion on forums in the hopes that anyone who stumbles across this post looking for the same answers to the same questions I had, will find it useful as a step by step. (which IMO, is far more useful for us novices)

Re: ZoneMinder on Raspberry Pi

Posted: Tue Jan 15, 2013 5:48 pm
by shields
So I'm moving right along here...using Chromium, but it's asking for the Java Plugin to be installed. Anyone got any hints on installing the proper Java plugin? All the directions I've been able to find are regarding the Java SDK for ARm, etc..etc. Nothing specifically related to the Java plugin installation.

UPDATE: Finally, finally found some decent directions concerning my exact question. The plugin installation.

Here's what I did

sudo apt-get update
sudo apt-get install icedtea-plugin

worked like a charm

Will report back on ce I actually get a camera up and functioning.

Re: ZoneMinder on Raspberry Pi

Posted: Tue Jan 15, 2013 6:34 pm
by aperry
Glad you got the browser stuff straightened out. I'm not sure, but I'd imagine the Java plugin is required only for Cambozola, and perhaps you don't need that if you're running Chromium. I'm not running with Cambozola and Chrome streams my video relatively well. It's never asked for a Java plugin. Can you try disabling that in options (uncheck the question aking whether it's installed), restart the server, and see if it still asks for a Java plugin?

Thanks,
Aaron

Re: ZoneMinder on Raspberry Pi

Posted: Tue Jan 15, 2013 7:58 pm
by shields
So in the interest of full disclosure...remember how i mentioned in my previous posts that I did not do the shared memory step? Well, it came back to bite me and it turns out that it's rather important as my log was full of the "Shared data not initialised by capture daemon" error. Went back in and edited the /etc/sysctl.conf and added the following two lines:

kernel.shmall = 134217728
kernel.shmmax = 134217728

as per the directions on the wiki.

Rebooted

Fired up ZM and the error log is empty.

Also as per your suggestion I did indeed disable Cambozola and Chromium did not ask me for the plugin.

That being said, I still have a black screen. No joy yet.

On the flip side of that...I'm also not starting with the easiest setup I would imagine. I'm starting off trying to connect to some Avigilon 5.0MP cameras using MultiCast. So we'll see how that shakes out. Thanks for all the help thus far. I'm sure I'll be reporting back one way or the other.

Re: ZoneMinder on Raspberry Pi

Posted: Tue Jan 15, 2013 8:19 pm
by aperry
So, it looks like your installation issues are sorted and now it's all about camera configuration. It's an IP cam, correct? I remember following some separate steps to install packages required for a USB cam, but I think an IP cam should be easier if you have the URL for the stream. Can you view the stream in a browser?

Re: ZoneMinder on Raspberry Pi

Posted: Tue Jan 15, 2013 10:07 pm
by shields
Well I have an Avigilon 5.0MP camera with Multicast that I'm using to test. I have some other cameras on the network (Pelcos, VideoIQ, etc) but I thought I'd start with The Avigilon. Just spoke with a rep from Avigilon who told me they do indeed use RTSP. I was also emailed this info from tech support in regards to the Remote Host Path:

In terms of the camera URI for RTSP streaming:

The forum won't let me post the URI I was sent

or JPEG:

Same Here...guess I'm "too spammy"

That being said...I thought I'd try to look for the rest of the cameras on the network, but whenever I click Probe I get this error. [Unable to probe network cameras, status is '127']
I see a lot about that in the forums, so I'll have to do some research...looks like that alone will take some time.

I can't view anything in the browser at the moment however.

Re: ZoneMinder on Raspberry Pi

Posted: Tue Jan 15, 2013 10:29 pm
by aperry
Thanks for the info. I think you're a little out of my league here. I don't know a whole lot about camera configuration, but maybe someone else around here can help. Just keep in mind that the raspi is very limited in horsepower. If you plan to setup motion detection then you may find that it's quite constrained in the number or cameras and the resolution that it can handle. Good luck!

Aaron

Re: ZoneMinder on Raspberry Pi

Posted: Wed Jan 16, 2013 1:35 pm
by shields
Back at it again this morning.

In regards to the Unable to probe network cameras, status is '127' error when attempting to probe the network, I found the following fix in the forums.

In file /skins/classic/views/monitorprobe.php you have to find a line $command = "arp -a";
and replace it into the form $command = "/usr/sbin/arp -a";

Made the change and my Status is 127 error went away. Unfortunately the Probe was unable to find any of the cameras on my network...so it wasn't really much help. But I thought I'd post this in case anyone else has problems with that error.