Page 1 of 1

having issues getting hooks going

Posted: Mon Jun 29, 2020 8:58 pm
by lorenjz
I've been trying to read and exhaust all of the resources I could to track this down. I was successful in getting the notifications for zmninja setup. I'd like to get hooks going and some integration working with my home automation.

I do have encryption setup and working both for browsers and the zmninja. In the setup of that camera, storage tab, the jpeg writer is set to "Frames + Analysis (if available)". I've been trying all of this with one camera to minimize any configuration differences.

When I try this command:

Code: Select all

sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh -e 2026
This is the response displayed on command line:
usage: zm_detect.py [-h] [-c CONFIG] [-e EVENTID] [-p EVENTPATH]
[-m MONITORID] [-v] [-o OUTPUT_PATH] [-f FILE] [-r REASON]
zm_detect.py: error: argument -e/--eventid: expected one argument
Did I misunderstand how the command was supposed to be executed?

Any input or suggestions would be greatly appreciated!

Edit:

I'm running Zoneminder 1.34.15
Zmninja v1.4.007

Re: having issues getting hooks going

Posted: Mon Jun 29, 2020 11:52 pm
by asker

Code: Select all

sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh <eid> <mid> 
There is no -e

Re: having issues getting hooks going

Posted: Wed Jul 01, 2020 1:55 pm
by lorenjz
Thanks @asker!

It appears as though I have an error somewhere in my objectconfig. When I run zm_event_start.sh manually and then execute: tail -F /var/log/zm/zmesdetect_m*.log the log shows this:
07/01/20 08:49:14 zmesdetect_m17[7706] ERR utils.py:347 [Error parsing config:/etc/zm/objectconfig.ini]
07/01/20 08:49:14 zmesdetect_m17[7706] ERR utils.py:348 [Error was:Python type HTTPError cannot be converted]
Is there a log that would be more descriptive as to where the objectconfig.ini is causing the error?

Thanks again!

Loren

Re: having issues getting hooks going

Posted: Wed Jul 01, 2020 2:26 pm
by lorenjz
Nevermind... I found that this: https://github.com/pliablepixels/zmeven ... issues/156 was the issue

Re: having issues getting hooks going

Posted: Thu Jul 09, 2020 7:08 pm
by lorenjz
My vm running zoneminder died the other day. I'm tryiing to get everything back up and running. When I execute:
sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh
I receive an error:
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 15, in <module>
import imutils
ModuleNotFoundError: No module named 'imutils'
A I did do a couple of searches for that error and came up empty...

Any help would be greatly appreciated!

Re: having issues getting hooks going

Posted: Thu Jul 09, 2020 9:09 pm
by asker
That means you are missing "imutils" as a dependent package for detection to work. Not sure how you installed it, but I'd suggest reinstalling using the official install instructions of using install.sh to make sure all dependencies are pulled. make sure you monitor the output of the installation.

Re: having issues getting hooks going

Posted: Thu Jul 09, 2020 10:28 pm
by lorenjz
asker wrote:
Thu Jul 09, 2020 9:09 pm
That means you are missing "imutils" as a dependent package for detection to work. Not sure how you installed it, but I'd suggest reinstalling using the official install instructions of using install.sh to make sure all dependencies are pulled. make sure you monitor the output of the installation.
Yup, I did rerun sudo -H ./install.sh. I watched and noticed that during the script was running that one of the console lines printed:
Requirement already satisfied: imutils in /root/.local/lib/python3.8/site-packages (from zmes-hooks==5.15.6) (0.5.3)
I uninstalled imutils and then redownloaded the install folder from github. Then reran the script, restarted, and then tried again with the same result.

Thoughts?

Re: having issues getting hooks going

Posted: Fri Jul 10, 2020 1:48 am
by asker

Code: Select all

/root/.local/lib/python3.8/site-packages (from zmes-hooks==5.15.6) (0.5.3)
Is this path accessible by www-data? If not then when you run as www-data it won’t find libs.

Re: having issues getting hooks going

Posted: Fri Jul 10, 2020 5:00 pm
by lorenjz
@asker thanks for your help with all of this! I was able to get the imutils permissions thing sorted I think. Then I had this pop up
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 402, in <module>
b, l, c = m.detect(image)
File "/usr/local/lib/python3.8/dist-packages/zmes_hook_helpers/yolo.py", line 64, in detect
self.net = cv2.dnn.readNet(weights_file_abs_path,
cv2.error: OpenCV(4.3.0) /io/opencv/modules/dnn/src/darknet/darknet_io.cpp:821: error: (-212:Parsing error) Unsupported activation: mish in function 'ReadDarknetFromCfgStream'
I couldn’t find anything in this forum or through google which leads me to believe that I have a bigger permissions error than the inutile. Would you agree, or is there something else going on that I need to track down?

Re: having issues getting hooks going

Posted: Fri Jul 10, 2020 11:38 pm
by asker