having issues getting hooks going

Discussion topics related to mobile applications for ZoneMinder
Post Reply
lorenjz
Posts: 13
Joined: Fri Feb 28, 2020 12:25 am

having issues getting hooks going

Post by lorenjz » Mon Jun 29, 2020 8:58 pm

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

User avatar
asker
Posts: 1309
Joined: Sun Mar 01, 2015 12:12 pm

Re: having issues getting hooks going

Post by asker » Mon Jun 29, 2020 11:52 pm

Code: Select all

sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh <eid> <mid> 
There is no -e
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

lorenjz
Posts: 13
Joined: Fri Feb 28, 2020 12:25 am

Re: having issues getting hooks going

Post by lorenjz » Wed Jul 01, 2020 1:55 pm

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

lorenjz
Posts: 13
Joined: Fri Feb 28, 2020 12:25 am

Re: having issues getting hooks going

Post by lorenjz » Wed Jul 01, 2020 2:26 pm

Nevermind... I found that this: https://github.com/pliablepixels/zmeven ... issues/156 was the issue

lorenjz
Posts: 13
Joined: Fri Feb 28, 2020 12:25 am

Re: having issues getting hooks going

Post by lorenjz » Thu Jul 09, 2020 7:08 pm

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!

User avatar
asker
Posts: 1309
Joined: Sun Mar 01, 2015 12:12 pm

Re: having issues getting hooks going

Post by asker » 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.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

lorenjz
Posts: 13
Joined: Fri Feb 28, 2020 12:25 am

Re: having issues getting hooks going

Post by lorenjz » Thu Jul 09, 2020 10:28 pm

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?

User avatar
asker
Posts: 1309
Joined: Sun Mar 01, 2015 12:12 pm

Re: having issues getting hooks going

Post by asker » Fri Jul 10, 2020 1:48 am

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.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

lorenjz
Posts: 13
Joined: Fri Feb 28, 2020 12:25 am

Re: having issues getting hooks going

Post by lorenjz » Fri Jul 10, 2020 5:00 pm

@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?

User avatar
asker
Posts: 1309
Joined: Sun Mar 01, 2015 12:12 pm

Re: having issues getting hooks going

Post by asker » Fri Jul 10, 2020 11:38 pm

--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest