Valid HTML 4.01 Transitional

Security Camera System

James F. Carter <jimc@jfcarter.net>, 2019-05-01

Requirements:

Issues:

Picking the software.

Jason Antman's Blog: Motion Activated Recording (2018-05-12)

He reviews four software packages: ZoneMinder, Kerberos.io, Shinobi, and Motion. His requirements have a lot in common with mine:

These features are bonuses for Jason:

  • Runs in Docker.
  • Written in a language he knows: Python or Ruby.
  • Only uses HTTP.
  • Nice multi-camera view.

    Jason had a lot of trouble with ZoneMinder, Kerberos.io, and Shinobi. With Motion Project he had some good experience in the past, and went with this package. But see his update…

    Jason Antman's Blog, Continued (2018-07-02)

    Motion Project didn't work out for him, but he was able to find a Docker image of ZoneMinder that he could get to work. He's running it on a HP Elite 8200 (desktop machine) with an Intel Core i7-2600, quad core @3.4GHz, 16Gb RAM, 2Tb rotating disc. This machine has plenty of resources for his task.

    ZoneMinder

    A full-featured, open source, state-of-the-art video surveillance software system. Product hype: It's FOSS. You control the data (i.e. provide your own server). Works with a huge list of cameras. Easy to install. APIs for 3rd party integration. zmNinja mobile app. Jimc says: what is their business model?

    Resources required: image height*width * color bits/px * history size * number of cameras. (Divide by 8 bits/byte.) You need history to see the image sequence leading up to a threat being detected. Wiki author suggests 50 frames (at what frame rate?) H.264 compression requires its own history. There are ZM admin processes, plus whatever else your server is doing. Author suggests 2x or 2.5x the basic history storage.

    Recommended to use a greyscale or RGB24 palette; others may take extra CPU. Greyscale takes 1/3 the CPU of color, duh.

    Sample disc space calculation: 4 cameras, 320x240px (what color space? probably 8bit), 1fps except during alarms, stores 60Gb/week.

    ZoneMinder can use its own password auth, or can be covered by web server auth.

    ZoneMinder originated around 2002 and is still actively maintained. It has bits and pieces in Perl, PHP, C++, JavaScript (at least).

    Jason Antman's comments: He started out inclined favorably to ZoneMinder, but it had a very bad interaction with Docker, and he never got it working enough to test the motion detection. (Later someone pointed him at a more successful Docker image, and he switched to that one, junking Motion Project.)

    Kerberos.io

    Jason Antman's comments: It meets his criteria and the product hype claims that it works in the areas he had trouble with, in ZoneMinder. It's one negative aspect is that the free version only handles one camera. Instructions are provided for running several instances for several cameras. Installation and setup were mostly a piece of cake. However, he had trouble setting up motion detection because the GUI was non-intuitive. Once he got over that, it was very sub-optimal about dealing with a disc that was close to filling up; in a production situation it would have deleted the file with the initial triggering event with the thief visible. So he gave up on Kerberos.io.

    Shinobi

    Jason Antman's comments: The website and docs seem well maintained. It's written in Node.js. There is a Community Edition (updated for major changes or bugfixes) and the Pro Edition. The latter is free (Creative Commons license) for non-commercial use. It satisfies most of his requirements. Installation in Docker went reasonably smoothly. It has its own user management. Setup was OK though it helps to read the documentation :-) If your web-enabled camera requires a query-string, Automatic URL Parsing will trash it; turn that feature off. The web UI is reported as mobile friendly (though he didn't test it). Streaming 2 cameras to the multi view page required 5% of his desktop's CPU and 100Mb RAM.

    As for motion detection: the docs are skimpy and have fallen behind the real program. He finally found the Advanced Settings toggle, Simple by default, low contrast, in the lower right corner of the Monitor Settings page. He got motion detection sort of working, but with docs apparently for a different version, and with bugs in the viewer. At this point he went on to the next software package.

    Motion Project

    Jason Antman's comments: He has used this one in the past, including on an original Raspberry Pi model B, and had good results. It has a lot of good features; the one that jimc specifically notices is, it can use any of MySQL, PostgreSQL, and SQLite3. The web interface is very basic, but there are add-on web UIs. Jason ended up picking Motion, and MotionEye as the web UI. See his next blog post for a report on setup and testing.

  • ZoneMinder Installation

    Web resources:

    ZoneMinder is not officially supported on OpenSuSE; however, there are community and experimental packages on the SuSE Build Service. URL of ZoneMinder package index. I'm going to choose stability over the latest bugfixes: in the community list, home:Monex:stable, version 1.30.4. (1.32.3 is the latest, and is called stable in the list for Leap 15.1.) I downloaded the RPM file directly, rather than adding the containing repo (home:Monex:stable).

    Oops, it wants perl-5.28.0 (we have 5.28.1). Version 1.32.3 is OK with perl-5.28.1. But it wants perl-Class-Std-Fast which is not in the standard distro. But it's in home:Monex:unstable.

    How to add a sub-repo: zypper addrepo https://download.opensuse.org/repositories/home:Monex:unstable/openSUSE_Tumbleweed/home:Monex:unstable.repo
    The addition worked, including downloading the proprietor's GPG key for metadata and package signing.

    Now it wants perl-Number-Bytes-Human . This one is in home:Monex:stable. Adding that repo.

    Now installing 40 new packages. Guess what, one of them is mariadb which I really would prefer to not have. A search on Google for ZoneMinder postgresql revealed that quite a number of people have asked for it to be supported, but ZM uses a MySQL-ism in an essential way (the responder doesn't say what the problem is), so it's not going to happen without a lot of work. So I'm going to have to put up with MariaDB. 31Mb to download, 203Mb installed.

    Product hype from the project website (mostly direct quotes):

    Google's Play Store has zmNinja-pro for $4.99,

    The installation guide has sections for Docker, Ubuntu, Debian, and Red Hat (but no prewritten guide for OpenSuSE). The Red Hat section tells (in reverse order) how to check out the Git repo, how to build a source RPM from the Git sources (most people download it from their repo), how to turn a source RPM into a binary RPM (most people download it from their repo), and in the earliest section, how to install the binary RPM (most people activate their repo and just do sudo yum install zoneminder). See the preceeding section, How To Avoid Known Installation Problems, and read the README file in the docs directory. This procedure should (and for me actually did) carry over directly to OpenSuSE: zypper install ZoneMinder (with the proper repo activated). See /usr/share/doc/packages/ZoneMinder/README.md and README.SuSE . The latter tells you to run their script to initialize the database and the zm_admin user (in MariaDB). You will need to pre-create that user's password; the script will ask for it.

    The User Guide tells you how to set up your ZoneMinder for the first time.

    After a hiatus I'm coming back to the ZoneMinder project. SuSE Tumbleweed has moved on to perl-5.30.1 (lurched is a better word) and the ZoneMinder instance that required perl-5.28 was forced out. So I need to reinstall. Issues:

    User Guide: Initial Setup

    Getting Started: what's the URL? See /etc/apache2/vhosts.d/zm.conf . It would appear that out of the box, ZM kind of hijacks the default virtual host on port 80. The master alias is /zm giving a URL of http://jacinth/zm . History of fixing this:

    Initial setup.

    Setting Up the Wyze Cam Pan

    Their procedure:

    A Quick 802.11 Signal Survey

    (* = outside)