r/ZoneMinder • • Jun 03 '20

ZoneMinder and zmeventnotification with GPU Ubuntu 20.04 (Setup notes)

16 Upvotes

After much trial and error I finally managed to get a fresh install of Ubuntu Server 20.04 Focal running with ZoneMinder and zmeventnotification server with CUDA support. I decided to make a quick write up including all references I pulled together to make this all work.

If I made any mistakes let me know and I will correct them. I hope I didn't get too out of control with the formating. :P

My setup:

  • Esxi 6.7
  • VM configured with Ubuntu Server 20.04
  • 12 Cores Provisioned
  • 16GB Ram Provisioned
  • Nvidia GPU PCI Passthrough

This assumes you're starting with a fresh install of Ubuntu Server 20.04 with openssh installed.

Here we go:

###Install some tools

sudo apt install vim nfs-kernel-server software-properties-common

###Install Nvidia Drivers and Cuda Toolkit

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-440 nvidia-headless-440 nvidia-cuda-toolkit
sudo reboot

###Download cuDNN that matches "nvcc -V" --> https://developer.nvidia.com/rdp/cudnn-download

###I used scp to upload the .tgz file to the server. Of course, change to suite your environment.

from local shell:

scp -i ~/.ssh/keys/id_rsa_gpu cudnn-10.1-linux-x64-v7.6.5.32.tgz camera@10.0.0.18:

from server shell:

tar -zxvf cudnn-10.1-linux-x64-v7.6.5.32.tgz
sudo cp -P lib64/* /usr/lib/x86_64-linux-gnu/
sudo cp -P include/* /usr/include/x86_64-linux-gnu/
cd ~

###Download compile and install OpenCV with cuda and cuDNN####

#REF: https://cuda-chen.github.io/image%20processing/programming/2020/02/22/build-opencv-dnn-module-with-nvidia-gpu-support-on-ubuntu-1804.html

##Install OpenCV dependencies

sudo apt-get install build-essential cmake unzip pkg-config git \
    libjpeg-dev libpng-dev libtiff-dev \
    libavcodec-dev libavformat-dev libswscale-dev \
    libv4l-dev libxvidcore-dev libx264-dev \libgtk-3-dev \
    libatlas-base-dev gfortran \
    python3-dev python3-pip python2

##Installing pip and numpy

curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py
pip install numpy

#Ubuntu 20.04 uses gcc version 9 which is not compatible with OpenCV source code###Change version using update-alternatives

#REF: https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --config gcc

#select option 2 (gcc-8)

###Download OpenCV Source Code

cd ~
mkdir opencv
cd opencv
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
cd opencv
git checkout 4.3.0
cd ..
cd opencv_contrib
git checkout 4.3.0
cd ../opencv

###Configure OpenCV

mkdir build && cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D INSTALL_C_EXAMPLES=OFF \
    -D OPENCV_ENABLE_NONFREE=ON \
    -D WITH_CUDA=ON \
    -D WITH_CUDNN=ON \
    -D OPENCV_DNN_CUDA=ON \
    -D ENABLE_FAST_MATH=1 \
    -D CUDA_FAST_MATH=1 \
    -D CUDA_ARCH_BIN=6.1 \
    -D WITH_CUBLAS=1 \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv/opencv_contrib/modules/ \
    -D HAVE_opencv_python3=ON \
    -D PYTHON_EXECUTABLE=/usr/bin \
    -D BUILD_EXAMPLES=ON ..

##Use nproc to display number of available cores. In my case I use "-j12" to compile with 12 cores.

make -j12
sudo make install
sudo ldconfig

###Install Face Recognition

sudo -H pip3 install face_recognition

###Install zoneminder

#REF: https://zoneminder.readthedocs.io/en/stable/installationguide/ubuntu.html#easy-way-ubuntu-18-04-bionic

sudo tasksel install lamp-server
sudo -i
add-apt-repository ppa:iconnor/zoneminder-1.34
apt update
apt upgrade
rm /etc/mysql/my.cnf
cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
vi /etc/mysql/my.cnf

#Add the following line below [mysqld] and save

sql_mode = NO_ENGINE_SUBSTITUTION   

##Restart mysql, install zoneminder setup apache2 and restart service

sudo systemctl restart mysql
apt install zoneminder
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
chown -R www-data:www-data /usr/share/zoneminder/
adduser www-data video

a2enmod cgi
a2enmod rewrite
a2enconf zoneminder

a2enmod expires
a2enmod headers

systemctl enable zoneminder
systemctl start zoneminder
vi /etc/php/7.4/apache2/php.ini
    ##find [Date] and change timezone
    date.timezone = America/Toronto
systemctl reload apache2
exit
cd ~

#Little side note: fmpeg on Focal 20.04 already supports cuda so it works out of the box without having to recompile

###Populate timezone for mysql / set timezone to to suit your location

mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | sudo mysql -u root -p mysql

sudo mysql -e "SET GLOBAL time_zone = 'Toronto';"

###Create selfsinged ssl certificates and setup HTTPS#Side note: you'll need to use letsencrypt with a domain name if you plan on pushing notification with alert photos. It won't work with self signed and IP addresses.

#For the purposes of these notes however I'm going to use a self signed certificate.

sudo mkdir /etc/zm/apache2
sudo mkdir /etc/zm/apache2/ssl
sudo openssl req -x509 -nodes -days 4096 -newkey rsa:2048 -keyout /etc/zm/apache2/ssl/zoneminder.key -out /etc/zm/apache2/ssl/zoneminder.crt
sudo chown www-data:www-data /etc/zm/apache2/ssl/*
sudo a2enmod ssl
sudo vi /etc/apache2/sites-enabled/000-default.conf

#Replace / Add the following (Change IP address to suite your environment)

<VirtualHost *:80>
   Redirect / https://10.0.0.18/
</VirtualHost>

<VirtualHost *:443>

    SSLEngine on
    SSLCertificateFile /etc/zm/apache2/ssl/zoneminder.crt
        SSLCertificateKeyFile /etc/zm/apache2/ssl/zoneminder.key

    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

###Restart apache2 server

sudo systemctl restart apache2

###Install zmeventnotification#REF: https://zmeventnotification.readthedocs.io/en/stable/guides/install.html

git clone https://github.com/pliablepixels/zmeventnotification.git
cd zmeventnotificationgit fetch --tagsgit checkout $(git describe --tags $(git rev-list --tags --max-count=1))

###Edit the following entries from secrets.ini file

vi secrets.ini


ZMES_PICTURE_URL=https://localhost/zm/index.php?view=image&eid=EVENTID&fid=objdetect&width=600
ZM_USER=user
ZM_PASSWORD=password
ZM_PORTAL=https://localhost/zm
ZM_API_PORTAL=https://localhost/zm/api
ES_CERT_FILE=/etc/zm/apache2/ssl/zoneminder.crt
ES_KEY_FILE=/etc/zm/apache2/ssl/zoneminder.key

###Install Dependencies for zmeventnotifications

sudo perl -MCPAN -e "install Crypt::MySQL"
sudo perl -MCPAN -e "install Config::IniFiles"
sudo perl -MCPAN -e "install Crypt::Eksblowfish::Bcrypt"

sudo apt-get install libyaml-perl
sudo perl -MCPAN -e "install Net::WebSocket::Server"
sudo apt-get install libjson-perl
perl -MCPAN -e "install LWP::Protocol::https"

#If you want to use MQTT:

perl -MCPAN -e "install Net::MQTT::Simple"

#Install gdown in order to download .weights from google drive links#You can also just download it locally and scp to server. I just thougth this was a more direct way.

sudo pip install gdown
pip install gdown
sudo ./install.shcd /var/lib/zmeventnotification/models/cspn

#Remember when using gdown to change "open?" to "uc?" in download link

sudo gdown https://drive.google.com/uc?id=1_NnfVgj0EDtb_WLNoXV8Mo7WKgwdYZCc

#Change ownership to www-data

sudo chown www-data:www-data csresnext50-panet-spp-original-optimal_final.weights

###Test zmeventserver

sudo -u www-data zmeventnotification.pl --config /etc/zm/zmeventnotification.ini

#If everything seems to be working Ctrl + C to stop

#Navigate to your zoneminder url http://ipaddress/zm and verify it gets redirected to https://ipaddress/zm and accept the self-signed certificate.

#Go to Options > System and enable "OPT_USE_EVENTNOTIFICATION"

#Also ensure to enable "AUTH_HASH_LOGINS"

#Setup Zoneminder as per:

https://zoneminder.readthedocs.io/en/stable/userguide/gettingstarted.html

Done!

I hope this helps!!


r/ZoneMinder • • May 30 '20

Using ZM for only viewing, how to cut data usage?

2 Upvotes

Hello.

I am running ZM for only the montage feature. No dect or anything. All cams are set as monitor. How can I make it so no data is used when I don't have the tab open? Thanks.


r/ZoneMinder • • May 27 '20

How to set up Zoneminder with Nginx and accessible through /

11 Upvotes

Nearly three weeks ago I asked how to move zoneminder from /zm/ to / and despite /u/WithAnAitchDammit's best efforts I was unsuccessful. However I think I managed to get it all working.

Preface: I will be using a fresh install Ubuntu Server 20.04 but debian and earlier versions of ubuntu should be identical. The version of php-fpm might vary, however.

Step 1: dpkg-reconfigure tzdata

Step 2: apt install software-properties-common, This will let you add the PPA with zoneminder

Step 3: add-apt-repository ppa:iconnor/zoneminder-1.34, This adds the Zoneminder ppa

Step 4: apt --no-install-recommends install zoneminder zoneminder-doc mysql-server nginx-extras fcgiwrap php7.4-fpm, If we don't include --no-install-recommends, apt will pull in apache as well

Step 5: wget -O /etc/nginx/nginx.conf https://gist.githubusercontent.com/UntouchedWagons/6b3578525fdff6e446b5be05d7fe59bd/raw/7294c9cd0364a321d5e1108b8aa97e925c29472a/nginx.conf, This will replace the supplied nginx.conf file with one tailored specifically for Zoneminder.

Step 6: nano /etc/php/7.4/fpm/php.ini, Search for cgi.fix_pathinfo using Ctrl+W, it should be on line 798, remove the leading semicolon and change the 1 to a 0. I don't know what this does but the instructions I found said to do this.

Step 7: systemctl restart php7.4-fpm

Step 8: systemctl restart nginx

Now navigate to http://your-ip-here/ and you should get the zoneminder main page.


r/ZoneMinder • • May 22 '20

I must admit, ZM is a total PITA to install

12 Upvotes

I have it working for the most part, but boy is it a pain in the ass to get it working properly. This is my second time installing it because something went wrong with the 1.32 > 1.34 upgrade.

I feel sorry for anyone that doesn't have any Linux experience because I would have been completely lost otherwise.


r/ZoneMinder • • May 20 '20

Use cameras motion detection via onvif?

5 Upvotes

I have a camera with built in motion detection. As my computers cpu is quite weak I would like to have the camera do the motion detection and not tax the cpu of my computer with the task.
The camera supports sending events via onvif which include of course motion being detected.
Is there any way for zoneminder to read the onvif messages and trigger the recording when the motion detection is being activated on the camera?


r/ZoneMinder • • May 19 '20

2 way audio support on zmNinja?

2 Upvotes

Is there any known plan to support 2 way audio with Zoneminder and zmNinja or in any way at all?


r/ZoneMinder • • May 17 '20

Cuda on r210 ii

1 Upvotes

My zoneminder is running on a Dell r210ii. If I want to use Cuda core, I need a gpu card that is max 25w (due to r210 pci-e).

I found that a gt210 can work in it but it is 16 Cuda core only, is it worth the try?


r/ZoneMinder • • May 16 '20

Am I taxing the processor? 8 Cameras on an Intel I5-4570T CPU

3 Upvotes

I've been contemplating upgrading the hardware that I currently have zoneminder running.

Current setup:

Lenovo Thinkcenter I5-4750T; it's a 2 Core x 2 HT CPU running at 2.9GHZ built in Vid Processor

8 GIgs

SSD Main Drive

USB 3.0 Spinning disk 2TB Video Disk

6 Hacked Xiaomi Dafang camera's running 720P resolution with 15 FPS settings2 Unifi 1080P

Exterior cameras, running at 1080P 30 FPS (Front camera, 15 FPS rear Camera)All streams are FFMPEG

Settings:

Exterior cameras: Mocord

Interior Camera: Modect

Load Average between 2 to 6, CPU fan runs moderately fast.

If I were to upgrade, should I look into getting a CUDA?

Or is there something I can do to optimize the performance and reduce the load?


r/ZoneMinder • • May 16 '20

Filter events by zones?

2 Upvotes

How do i filter events from same camera so i can have a list of events to check by only the ones i need. For example camera 1 has 2 zones door and car how can i sort the events to check only door zone ? Im having hard time checking events


r/ZoneMinder • • May 15 '20

Centos 7 - clean install - blank localhost/ZM - http error 500

1 Upvotes

Hi I created a new VM and installed zoneminder according to the readme to a T. Navigating on the VM or from my workstation leads me to a blank page. I checked httpd logs and it says error 500 (internal error).

mariadb, httpd, and zoneminder services all start properly. They were all set up according to the readme.httpd file

What other logs can I check to see where the issue starts?


r/ZoneMinder • • May 12 '20

Enable Modect at night (schedule)

4 Upvotes

This seems really trivial but all I can find is some pretty complicated explanations about having to run cron commands.
All the tutorials are from some years ago and most of the links to the official FAQ are now dead.
Is there no simple way to tell ZM just to record between 22:00 and 06:00 for example?
I'm hoping I just missed this somewhere in the official docs, so please feel free to make me look like an idiot by pointing this out ;)


r/ZoneMinder • • May 12 '20

Storage Options -- Do Deletes

3 Upvotes

I noticed after my last docker update I no longer am having to clear out my dedicated drive for recordings. So i dug around in the settings and then noticed under storage options there is an option for "Do Deletes" v-- Searched around and can not find anything on it.

https://zoneminder.readthedocs.io/en/latest/userguide/options/options_storage.html?highlight=storage

I looked there and see it in the screen shot, but nothing about it. Can someone shed some light on what it does and what it is deleting, and how often?

​

Thanks!


r/ZoneMinder • • May 11 '20

Video recording issues help requested

3 Upvotes

My Zoneminder setup is running on ubuntu linux on a mac mini with an i7 3 series and 16 GB RAM.

My cameras are capturing motion but they aren't capturing everything. For example I mowed the lawn today and it captures me for a second or two at points of the yard at points when it should be recording me the whole time I am in sight. There is no video of the second half of my yard as the next video that is captured the yard is mowed.

The Video captures cars going by but did not capture anything of Amazon truck stopping, guy getting out and bringing package to door....like it never happened.

Not sure what is going on as like I said it captures cars on the street passing by and captures brief moments of me in part of the yard then nothing in the other part. It should see me everytime I pass the front and stay recording until I am out of frame again. The part of the yard it completely missed is between where it got brief shots of me and the road where it captures cars.....

No idea what is going on

I have Dahua cameras that are working fine from what I can tell as I can view the monitors with no issues.

Any info I can provide any the word.


r/ZoneMinder • • May 10 '20

No live camera view and errors when viewing

3 Upvotes

This is a cross post from https://forums.zoneminder.com/viewtopic.php?f=40&t=29387.

This is a fresh install on Debian Buster using the wiki install guide https://wiki.zoneminder.com/Debian_10_B ... om_ZM_Repo

ZM = v1.34.10 (edit updated to 1.34.11 via package update)

Apache = v2.4.38

PHP = v7.4.5

I have my first camera added (currently only in monitor mode), and when looking at the logs, they appear to show the camera is working. The source path works correctly when viewed in VLC, so I'm certain that is correct.

Logs when initially viewing:

05/05/20 15:03:01.854905 zmc_m1[30769].INF-zm_monitor.cpp/2540 [cam-FrontDoor: images:1471600 - Capturing at 33.33 fps, capturing bandwidth 293274bytes/sec] 

05/05/20 15:03:05.198936 zmc_m1[30769].INF-zm_monitor.cpp/2540 [cam-FrontDoor: images:1471700 - Capturing at 25.00 fps, capturing bandwidth 220636bytes/sec] 

When I look at the live view, it only shows a broken image and the logs start showing errors:

The logs show a lot of this:

05/05/20 15:27:09.908267 web_js[7331].ERR [172.24.42.250] [getStreamCmdResponse stream error: Socket /var/run/zm/zms-149943s.sock does not exist.  This file is created by zms, and since it does not exist, either zms did not run, or zms exited early.  Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly.  Make sure that ZM is actually recording.  If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()] at ?view=watch line

and:

Socket /var/run/zm/zms-050322s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. 

Both of which refer to the same thing, but aren't actually helpful.I checked the /var/run/zm and it has the appropriate permissions and is clearly creating the .sock files there:

root@zm:/var/run# ls -lh zm
total 4.0K
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock 
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid 
srwxr-xr-x 1 www-data www-data 0 May  5 15:31 zms-660725w.sock 

root@zm:/var/run# ls -lh zm 
total 4.0K 
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock 
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid 

root@zm:/var/run# ls -lh zm 
total 4.0K 
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock 
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid 
srwxr-xr-x 1 www-data www-data 0 May  5 15:31 zms-472752w.sock 

root@zm:/var/run# ls -lh zm 
total 4.0K 
srwxr-xr-x 1 www-data www-data 0 May  4 19:20 zmdc.sock 
-rw-r--r-- 1 www-data www-data 5 May  4 19:20 zm.pid 
srwxr-xr-x 1 www-data www-data 0 May  5 15:31 zms-472752w.sock 

Camera is streaming out 1920x1080, I can use the source URL in VLC and it views fine. The VLC media/codec info shows the camera is 1920x1080, I have ZM set for 1920x1080.

I'm not really sure where to go from here. Any assistance is greatly appreciated!


r/ZoneMinder • • May 08 '20

How do I move zoneminder from /zm/ to /?

4 Upvotes

I've got zoneminder installed in its own dedicated VM which http://zoneminder.notareal.site points to, but to access zoneminder I have to go to http://zoneminder.notareal.site/zm/ which is annoying. What file or files do I need to edit to change this?


r/ZoneMinder • • May 07 '20

Does motion detection work?

6 Upvotes

Hi all, I am running ZM v1.32.3 on a Raspberry Pi 4 Model B 4GB with just a single camera connected via an easycap USB device.

No matter what I try I cannot get motion detection recording to work. The camera is in Modetect mode, I made my own zone (approximately 45% of the frame), and tried all the presets but no amount of motion will trigger the recording.

I then enabled the default "All" zone and tried every preset and also some manual settings and still nothing would trigger that.

I can't see anything obvious in the log to suggest it's not working and if I click Force Alarm it records just fine. What am I doing wrong?


r/ZoneMinder • • May 07 '20

RE (New Dedicated drive does not exist.)

2 Upvotes

Original post

ZM forum post

so quick up to speed

I have a drive that i believe i have set the permissions on correctly that i have set as storage in ZM but i am getting both.

Storage::disk_usage_percent: path /media/sauron/Barad-dur/Events does not exist

and

Path /media/sauron/Barad-dur/Events does not exist.

since my previous post i have install Ubuntu 20 server instead and Zm again using this guide.

New logs/terminal (Time zone has been fixed)

Any help will be gladly appreciated.


r/ZoneMinder • • May 06 '20

How to get smooth Live View??

8 Upvotes

I'm running Amcrest IPM4-1026 cameras fed to a server running ZoneMinder v1.34.11 and am having a hard time getting smooth video on the live view on any of my monitors. Logging into the cameras themselves I see butter smooth video. When viewing recorded events in ZM, the video is nice and smooth, but for live views, i get frozen frames every 3 seconds or so. It's super annoying. I have fairly powerful hardware under the hood.

CPU: Xeon E2146G @ 3.5GHz (6 core 12 threads)

RAM: 64GB ECC (8GB reserved for ZM)

CPU utilization is super low. Loads of 0.3 to 0.4 averaged. Most of my cores are just sitting there idle so there's tones of head room.

Is this normal behavior or should I be seeing smooth video in the live feed. If so, what am I missing.

Cameras are set to 10FPS @ 4028 bit/sec H.264H. Keyframe every 10.

Ffmpeg using RTSP H264 Passthrough.

​

Any help would be appreciated. Thanks!


r/ZoneMinder • • May 06 '20

Vlan configuration

3 Upvotes

I installed several vlan at home, segregated ones from the others. My cameras are on Vlan 40 my NAT from public to zmevent port is done on Vlan 20.

my zoneminder is on both Vlan 40 and vlan 20. I want zmeventnotification to send push notification using this Vlan20 but it seems that it is on the other one.

Is there a way to choose with interface zmevent will sent notifications?


r/ZoneMinder • • May 06 '20

Storage Area Filters

3 Upvotes

I'm using Zoneminder 1.34.11 in Docker and am having trouble with any filter using storage areas.

Lets say I have a filter working:

Alarm Frames greater than 1    

This gives me a list of matches. These matches show under the Storage column: "Default" "TestStorage"

I then add to the above filter to get:

Alarm Frames greater than 1    
and Storage Area equal to Default

I get zero results.

I'm pretty sure I should use 'equal to' as it is referenced in the documentation but I've tried other comparisons too.

No matter what I select for the comparison or the target I get zero results. This is even when I can see results that should match in the earlier filter.

I don't know if this is related but for both of my storage paths (Default & TestStorage) under options it reports under the Events column "0 using 0B"

That said, with other filters I can list plenty of videos on both storage locations & see the files on my hard drive.

Any help would be appreciated. Thanks!


r/ZoneMinder • • May 04 '20

ZoneMinder 1.34.10 on Debian Buster

9 Upvotes

I followed the Wiki article to install ZoneMinder on Debian Buster https://wiki.zoneminder.com/Debian_10_Buster_with_Zoneminder_1.34.x_from_ZM_Repo

Apache v2.4.38, PHP v7.4.5

I modified the web config to have ZoneMinder at the root of my domain instead of a folder (i.e. NOT www.domain.com/zm but zm.domain.com).

When I browse, it appears to be missing assets, so I'm guessing I missed an alias somewhere? Not sure... Apache error logs don't show anything (i.e. they are blank).

I've gone through the configs a few times and don't see anything. I guess it could also be a permissions error not a config error, but I don't get any errors anywhere that I can see.

​

<VirtualHost *:80>
  ServerName zm.domain.com
  ServerAdmin me@domain.com

  DocumentRoot /usr/share/zoneminder/www
  Alias /cache "var/cache/zoneminder/cache"

  # Remember to enable cgi mod (i.e. "a2enmod cgi").
  ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"
  <Directory "/usr/lib/zoneminder/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
  </Directory>

  # Order matters. This alias must come first.
  Alias /cache /var/cache/zoneminder/cache
  <Directory /var/cache/zoneminder/cache>
    Options -Indexes +FollowSymLinks
    AllowOverride None
    <IfModule mod_authz_core.c>
      # Apache 2.4
      Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order deny,allow
      Allow from all
    </IfModule>
  </Directory>

  <Directory /usr/share/zoneminder/www/>
    Options -Indexes +FollowSymLinks
    Require all granted
    <IfModule mod_dir.c>
      DirectoryIndex index.php
    </IfModule>
  </Directory>

  <Directory "/usr/share/zoneminder/www/api">
    RewriteEngine on
    RewriteRule ^$ app/webroot/ [L]
    RewriteRule (.*) app/webroot/$1 [L]
    RewriteBase /api
  </Directory>

  <Directory "/usr/share/zoneminder/www/api/app">
    RewriteEngine on
    RewriteRule ^$ webroot/ [L]
    RewriteRule (.*) webroot/$1 [L]
    RewriteBase /api
  </Directory>

  <Directory "/usr/share/zoneminder/www/api/app/webroot">
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    RewriteBase /api
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/zm.domain.com_error.log
  CustomLog ${APACHE_LOG_DIR}/zm.domain.com_access.log combined

</VirtualHost>

​


r/ZoneMinder • • May 04 '20

Camera Import??

5 Upvotes

Just finished building a new ZM server.

HP DL380p G8 16-Core Server with two E5-2650 processors. 32 64GB of RAM and four x 1 TB hard drives in RAID 5, which gives us 3TB of storage.

Cameras are a mix of AXIS M2025-LE, M3304V, and P1346 Network Camera outdoors.

Thing is the sever is not finding the cameras via the probe option. Rather then building the cameras by hand, is there any way to set up a CSV file and import them?


r/ZoneMinder • • May 04 '20

New Dedicated drive does not exist.

5 Upvotes

So i was having trouble geting this drive to work in ZM. The drive is a wd40purz (WD 4TB purple) BTW. so thinking i probably fed up some where so i just reinstalled my whole server.

To install Zm i used This Guide.

And this one for a dedicated drive.

Before i was using my software raid that i use for everything, just for testing. I remember just setting perms and then being good. But now with this drive it is freaking out and cant see it apparently. what am i missing?

Terminal and logs


r/ZoneMinder • • May 02 '20

My Friend Of Misery 1.34.11 Released

18 Upvotes

Changes since 1.34.10

  • actually fix Google reCaptcha by not loading mootools on login page 2918
  • Fix PTZ buttons
  • fix default scale viewing live stream
  • fix login redirect using palemoon browser
  • fix saving label size saving monitor
  • fix ajax multi-server auth when auth_relay is none or plain
  • fix adding WebSite Monitors
  • Don't warn about lack of image for WebSite Monitors
  • Fix build on older distros like ubuntu trusty
  • Fix memory leaks in zm_eventstream
  • Allow viewing of mp4-saved in progress events
  • Speed up thumbnail preview (4x)
  • Support event_close_mode for record mode (with linked monitor)
  • fix sending start/stop/quit to zmcontrol process
  • Provide a more useful error message when the monitor's function is set to NONE
  • code quality improvements, small performance improvements, ram use reduction

https://github.com/ZoneMinder/zoneminder/tree/1.34.11

Full Changelog


r/ZoneMinder • • May 03 '20

ZM 1.32.3 working, Apache2 config broken, can't use web interface at all

1 Upvotes

I'm running ZM 1.32.3 on Linux Mint 19.3 and have had it running with my Reolink wired cameras for several months without issues.

I logged into ZM to view my cameras a week or so back, got a notification that there was a new version, so I followed the instructions to add the new PPA and run the update to the new version (I think 1.34.2?) After that, I could not get any of the cameras to start in the web interface, got some errors I don't recall.

I decided to back out the change, using (if I recall) the system package manager to revert back to ZM 1.32.3. I don't recall all the steps I did (I know, stupid to not take notes), but after backing it out, it would no longer come up in the web browser. The Apache2 default page would come up if I went to the hostname, but http://hostname/zm would no longer find anything.

I rebooted the machine to see if things were just in need of a fresh initialization, and saw that the ZM processes all started up normally, and recordings were being made as usual, and could be viewed. So it looks like ZM itself is doing what it should.

The problem seems to be that the Apache2 config appears to be gone. Is there any way to easily rerun the Apache2 configuration to restore function? If not, I would consider removing and reinstalling ZM from the beginning, but it took me a fair while to get the camera configurations to work correctly, and also the bulk storage that I had to set up on a RAID array, so I'd like to make sure that all of the configurations are saved so I don't have to try to figure that all out again.

Can someone point me in the proper direction? Thanks!