Wednesday, February 14, 2018

Zoneminder eval as Blue Iris replacement

Intro

After getting feed up with Windows 10 issues I'm checking out Zoneminder. First things first start with a clean CentOS 7 install since I ran into all kinds of conflicts trying to install on boxes with other things already running. xrdp for instance will keep you from installing vlc which Zoneminder needs.

Installing base CentOS 7

Installing CentOS 7 with Gnome desktop

These instructions are great other than instead of minimal configuration, select Gnome desktop and select all sub packages, otherwise follow the instructions in the link
After it reboots accept the EULA and take defaults for basic config. Check for and install any outstanding updates.


The rest of the set up can be done remotely as root logged in via ssh

Create user with sudo access

adduser username
passwd username
If system uses the simple wheel group membership you can use
usermod -aG wheel username

Otherwise edit /etc/sudoers to get granular.

To avoid conflicts DO NOT install anything else before Zoneminder!

Install Zoneminder

Follow the instructions from here.

wget http://zmrepo.zoneminder.com/el/7/x86_64/zmrepo-7-9.el7.centos.noarch.rpm
sudo yum install --nogpgcheck zmrepo-7-9.el7.centos.noarch.rpm
sudo yum install zoneminder
less /usr/share/doc/zoneminder-*/README.Redhat7

The last line above is more instructions. Follow them with these caveats:
sudo dnf install mariadb-server should be
sudo yum install mariadb-server
Note it is important to install mariadb-server and NOT mysqld or try and use a remote db since this seems to currently keep Zomeminder from starting.
Note when you see something like
mysql -uroot -p -e "grant all on zm.* to \
                        'zmuser'@localhost identified by 'zmpass';"
It is better to enter as
mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
since \ seems to get lost sometimes when copy pasting into ssh sessions.

At sudo systemctl start zoneminder is where you know if things worked.

Note if you want to be able to access Zoneminder other than from a browser on the box itself also run the commands
sudo firewall-cmd --permanent --zone=public --add-port=80/tcp
sudo firewall-cmd --permanent --zone=public --add-port=443/tcp
sudo firewall-cmd --reload

You can now go to the console via your browser. If you are on the box you can use the IP address of 127.0.0.1 otherwise substitute your server's IP address for 10.10.2.191 in this URL
https://10.10.2.191/zm/

Setting up cameras

For details check out the Getting Started section of the user guide. Note the set up section appears to be out of date as some of the tabs had different or more options when I setup a camera for this test.
Setup is not nearly as simple as Blue Iris which generally just figures it out from an IP address and a login. Since you will probably end up Googling what to use to make it work with your camera I won't go into steps here.

First impressions

I got Zoneminder to work by spinning up a new copy of CnetOS 7 on one of my test PCs.
The broke bit I saw on my first try seems to be with it not seeing the DB because it is looking for an instance of Maria DB local (remote it also supposed to work) and does not see MySQL local either as equivalent.  Note they are functionally equiv and the OS saw the MySQL DB I had installed as newer version of Maria. There were also other software conflicts on other servers I tried that had other things installed like remote desktop for example which needed to be remove just to get it to install.

The interface is no where near as finished or as easy to use as Blue Iris. Plan on looking up what to put into config boxes and playing with options to get them to work. For example to configure the video stream on ZomeMinder per their Wiki looks like this

Note the Probe and ONVIF links are supposed to yield a list of config suggestions similar to what Blue Iris' inspect does but it returned nothing detected for the Amcrest. The presets option lists about 40 low resolution cameras. Amcrest was not even listed in the presets despite being on their Wiki. By comparison Blue Iris has more than 40 brands of cameras listed, many with many models.

The equivalent window on Blue Iris looks like this
Generic above was setup automaticly by inspect though you could also select Amcrest. The configuration by selecting the brand and model looks quite different but seems to work equally well.


Load wise a single Amcrest 2K cam on Zoneminder appears to max out a Core 2.
Note that is streaming the one cam back to a browser but it was still nailed after stopping that stream.
You can see the spike where I logged back in via remote desktop to see the load and how it changed the load on the box very little.

For comparison that same camera plus 12 others are recording 24/7 with motion detection on the i7 server now with an average core load of 46%.

Granted the i7 is faster but not that much faster. About 3 times faster according to this.

Finally for me I'm looking for something that lets me have a monitor (3 actually) showing the cams so I can just glance up when I get an alert or hear the dogs barking that something is happening.

The Zoneminder interface seems to be oriented to record now and watch later. That is fine if that is all you need but if you want to be able actively monitor multiple cams it won't cut it.

Update

After trying:

  • moving the swap file to another hard drive
  • running hardware diagnostics 
  • Windows troubleshooters
  • trying fixes I found on line
  • reinstalling Blur Iris
  • and even swapping out the graphics card, since the symptoms were the Blue Iris console locking up and Windows programs not updating bits of the screen  

I ended up restoring from the restore disks which put the system back to Windows 7. After installing upgrades and all the software (Blue Iris, apcupsd, cygwin and ODrive) it is working great again. Kind of confirms it was a Windows 10 issue.



Thursday, February 1, 2018

Paranoia definitely pays when it comes to recording.

Been seeing a lot of posts lately about only recording on motion. Generally this is either to save disk space or make recording to the somewhat feasible. See Some things to keep in mind if you are thinking of cloud recording your cams. Problem is it comes down to one thing. Do you REALLY think you have all possible scenarios covered? In a conversation I just had, a guy was using several sensors, per camera, to try to catch motion while at the same time filter motion triggered by him. While this might make sense for an alarm to keep triggers to the minimum, there is no practical reason to limit recording this way. Recorded video is generally the thing you go to after the alarm failed to protect you. Or to find out the mess you are looking at in the yard happened that the alarm was not even looking for. Bottom line though the ONLY way you will know for sure everything works like you think is after the fact when you notice something has happened and you go look for video. Kind of like raccoon / mouse proofing that way. If you are only recording on triggers then there might be no video to find. Recording 24/7 there will be video even if everything but the cam and the recorder fails to work as planned.

This brings up a point though. How can you mark the video / trigger alerts based on other sensors? This article covers that question pretty well for Blue Iris. Basically it comes down to this.
Set your alerts to be retriggerable by  checking "Also re-triggers"

Then call the trigger via a URL get in the form of
http://IP_ADDRESS_OF_BI_SERVER:PORT/admin?camera=camera_short_name&trigger&user=XXXXX&pw=XXXXXX

For instance to try from a browser assuming:
Your Blue Iris server is on IP address 10.10.2.46 on port 8076 and you wanted to trigger IPcam62 Note that is that is the short name on your properties screen.


And your login is admin/P@$$w0rd
You would call http://10.10.2.46:8076/admin?camera=IPcam62&trigger&user=admin&pw=P@$$w0rd

You should see a response like
signal=green
profile=-1
lock=0
camera=IPcam62-Garage N
If you see camera=NULL you have mistyped the camera name.

To trigger from Homeseer you would create an event like
Other home automation systems are similar.

It is just that simple to get every motion event marked on your video to make finding the right footage easy. If you find the motion sensor is working well enough, you can even turn off Blue Iris' motion detection the save a good bit on CPU load though I prefer to leave it on just tuned to the insensitive side.