Page 3 of 5

Re: I am lost in the configuration of zmeventnotification

Posted: Wed Mar 17, 2021 6:47 pm
by tsp84
This is a list of what you should need to install it. I havnt tried installing perl modules using the -e flag, I usually go into the cpan shell and install/update so this might not work completly. This is a list of everything you need minus OpenCV. Are you using a GPU for object detection? if so........... this might be a challenge.

Do these 1 line at a time, dont copy and paste right into terminal. Remove the -y flag if you want to be prompted of dependency installs.

Code: Select all

sudo apt install pip3 -y
sudo apt install make cmake -y 
sudo perl -MCPAN -e "install Crypt::MySQL"
sudo perl -MCPAN -e "install Config::IniFiles"
sudo perl -MCPAN -e "install Crypt::Eksblowfish::Bcrypt"
sudo perl -MCPAN -e "install Time::Piece"
sudo apt-get install libyaml-perl
sudo perl -MCPAN -e "install Net::WebSocket::Server"
sudo apt install libjson-perl -y
sudo apt install libssl-dev -y
perl -MCPAN -e "install LWP::Protocol::https"
perl -MCPAN -e "install Net::MQTT::Simple"
sudo apt install libopenblas-dev liblapack-dev libblas-dev  -y
sudo -H pip3 install face_recognition
sudo -H pip3 install numpy

Re: I am lost in the configuration of zmeventnotification

Posted: Wed Mar 17, 2021 8:14 pm
by titof2375
tsp84 wrote: Wed Mar 17, 2021 6:47 pm This is a list of what you should need to install it. I havnt tried installing perl modules using the -e flag, I usually go into the cpan shell and install/update so this might not work completly. This is a list of everything you need minus OpenCV. Are you using a GPU for object detection? if so........... this might be a challenge.

Do these 1 line at a time, dont copy and paste right into terminal. Remove the -y flag if you want to be prompted of dependency installs.

Code: Select all

sudo apt install pip3 -y
sudo apt install make cmake -y 
sudo perl -MCPAN -e "install Crypt::MySQL"
sudo perl -MCPAN -e "install Config::IniFiles"
sudo perl -MCPAN -e "install Crypt::Eksblowfish::Bcrypt"
sudo perl -MCPAN -e "install Time::Piece"
sudo apt-get install libyaml-perl
sudo perl -MCPAN -e "install Net::WebSocket::Server"
sudo apt install libjson-perl -y
sudo apt install libssl-dev -y
perl -MCPAN -e "install LWP::Protocol::https"
perl -MCPAN -e "install Net::MQTT::Simple"
sudo apt install libopenblas-dev liblapack-dev libblas-dev  -y
sudo -H pip3 install face_recognition
sudo -H pip3 install numpy
that I had done, my I redo them

Re: I am lost in the configuration of zmeventnotification

Posted: Wed Mar 17, 2021 8:40 pm
by titof2375
/var/log/zm/zmesdetect_m1.log:03/17/21 20:38:34 zmesdetect_m1[6608] FAT zm_detect.py:534 [Unrecoverable error:'str' object has no attribute 'lineno' Traceback:Traceback (most recent call last):
/var/log/zm/zmesdetect_m1.log: _log('ERR',message,caller)
I always have an error

Re: I am lost in the configuration of zmeventnotification

Posted: Wed Mar 17, 2021 8:49 pm
by tsp84
Do you have SSL certificates? And are the certificates in the /etc/apache2/ssl/ directory?

Did you fix the typing errors in secrets.ini?

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 3:37 am
by titof2375
tsp84 wrote: Wed Mar 17, 2021 8:49 pm Do you have SSL certificates? And are the certificates in the /etc/apache2/ssl/ directory?

Did you fix the typing errors in secrets.ini?
yes, I corrected the typing time in secret.ini
secre.PNG
secre.PNG (42.96 KiB) Viewed 11912 times
and for the certificate
dert.PNG
dert.PNG (6.34 KiB) Viewed 11912 times

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 3:48 am
by tsp84
Ok for the certificates if you get any certificate errors, which you shouldn't as they are globally readable, you would need to change ownership to www-data:www-data

Code: Select all

sudo chown www-data:www-data /etc/apache2/ssl/zoneminder*
Now you need to add those certificates to ES as well in the secretes.ini

Code: Select all

ES_CERT_FILE=/etc/apache2/ssl/zoneminder.crt
ES_KEY_FILE=/etc/apache2/ssl/zoneminder.key
Are those self signed certificates for your zoneminder Internal LAN IP (192.168.1.5)? or certificates with a domain name?

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 3:54 am
by tsp84
Also go into the python3 interpreter and try and import cv2

Code: Select all

python3
once inside the interpreter it will say something like this ->

Code: Select all

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
then try importing cv2 and getting its version.

Code: Select all

import cv2

cv2.__version__
Hit Ctrl+D to exit the python interpreter.

This is the output of when I import cv2 in the python3 interpreter ->

Code: Select all

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.4.0'
>>> 

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 3:56 am
by tsp84
Once you have ssl enabled you need to change your portal and api to https:// instead of http:// as well.

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 5:10 am
by titof2375
tsp84 wrote: Thu Mar 18, 2021 3:48 am Ok for the certificates if you get any certificate errors, which you shouldn't as they are globally readable, you would need to change ownership to www-data:www-data

Code: Select all

sudo chown www-data:www-data /etc/apache2/ssl/zoneminder*
Now you need to add those certificates to ES as well in the secretes.ini

Code: Select all

ES_CERT_FILE=/etc/apache2/ssl/zoneminder.crt
ES_KEY_FILE=/etc/apache2/ssl/zoneminder.key
Are those self signed certificates for your zoneminder Internal LAN IP (192.168.1.5)? or certificates with a domain name?
tiuti.PNG
tiuti.PNG (8.02 KiB) Viewed 11900 times
for me apache 2 and in the directory
etc / zm / apache2 and not as you say etc / apache2

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 6:10 am
by tsp84
you forgot the * at the end of that command

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 7:45 am
by titof2375
tsp84 wrote: Thu Mar 18, 2021 3:48 am Ok for the certificates if you get any certificate errors, which you shouldn't as they are globally readable, you would need to change ownership to www-data:www-data

Code: Select all

sudo chown www-data:www-data /etc/apache2/ssl/zoneminder*
Now you need to add those certificates to ES as well in the secretes.ini

Code: Select all

ES_CERT_FILE=/etc/apache2/ssl/zoneminder.crt
ES_KEY_FILE=/etc/apache2/ssl/zoneminder.key
Are those self signed certificates for your zoneminder Internal LAN IP (192.168.1.5)? or certificates with a domain name?
instead of what I have surrounded?
certei.PNG
certei.PNG (26.18 KiB) Viewed 11896 times
Are those self signed certificates for your zoneminder Internal LAN IP (192.168.1.5)? or certificates with a domain name?
I never put a domain name in the installation so I would say the ip

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 7:50 am
by titof2375
tsp84 wrote: Thu Mar 18, 2021 3:54 am Also go into the python3 interpreter and try and import cv2

Code: Select all

python3
once inside the interpreter it will say something like this ->

Code: Select all

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
then try importing cv2 and getting its version.

Code: Select all

import cv2

cv2.__version__
Hit Ctrl+D to exit the python interpreter.

This is the output of when I import cv2 in the python3 interpreter ->

Code: Select all

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.4.0'
>>> 
tyty.PNG
tyty.PNG (9.43 KiB) Viewed 11894 times
This is what I have on python

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 9:24 am
by tsp84
Yes change the surrounded / circled items to -->

Code: Select all

ES_CERT_FILE=/etc/apache2/ssl/zoneminder.crt
ES_KEY_FILE=/etc/apache2/ssl/zoneminder.key
Next try and start the event server in debug mode

Code: Select all

sudo -u www-data /usr/bin/zmeventnotification.pl --debug 
and force an alarm to see what errors you get. You might have to turn off hooks for now to see if you can just get regular notifications for every alarm, then work your way up to object detection.

Here is the circled button to click in order to force an alarm. Make sure event server is running in debug mode and force an alarm then see what the debug outputs.

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 11:56 am
by titof2375
zonezone.PNG
zonezone.PNG (98.23 KiB) Viewed 11882 times
this is what I have

Re: I am lost in the configuration of zmeventnotification

Posted: Thu Mar 18, 2021 5:24 pm
by tsp84
What command did you put in? I see every 2nd line bash is throwing an error for a ")".
At least it's finding and attempting to process events, so your on the right track.