Closed ihaddy closed 3 years ago
I found the culprit,
the URL used by the python cascade that kept erroring out isn't pulled from zm ZMES_PICTURE_URL in the secret file, it's pulled from ZM_API_PORTAL= which i had set to 192.168.1.191 without the /zm at the end, so changing it to 192.168.1.191/zm fixed it!!!!!
Before you create an issue, please make sure you have read the README. If you are asking about the object detection part, I don't provide support for it unless you've tried hard enough.
Event Server version
You can get the version by doing:
Hooks version (if you are using Object Detection)
You can get the version by doing:
app:6.1.19, pyzm:0.3.45
Are you using MLAPI? (Y/N)
If you are using MLAPI, please mention the version You can get the version by doing: (change path to wherever you install mlapi)
I don't think so, command returns no suchfile or directory
The version of ZoneMinder you are using:
(example only, please edit this line) 1.34.22
What is the nature of your issue
Bug (one of Bug, Enhancement, Question)
Details Hey! So this is a last resort for me because i absolutely hate the thought of bugging developers of free software for support, but i've been at this for hours so any help would be appreciated!
To give you a brief synopsis first ( i will include all full logs at the bottom!): Essentially my issue is the python script zm_detect.py throws an error that the link is invalid when trying to fetch the frame to run the analysis, and therefore the entire object detection doesn't work.
How i got to this conclusion is from a snippet from what i think to be the relevant logs:
So the link it's trying to fetch, " http://192.168.1.191/index.php?view=image&eid=32596&fid=alarm&token=Iredactedthispart" doesn't work after trying it in the browser and with wget from being ssh'd into the zoneminder VM.
After scouring the API docs and not getting anymore insight, i used the chrome dev tools to capture network requests and try and determine what the working link should be, and i came up with
http://192.168.1.191/zm/index.php?view=frame&eid=EVENTID&fid=objdetect&width=600
as the valid link, replacing EVENTID with the eventid. The differences being the /zm/ after the ip address. and the word "image" being changed to "frame". After making those changes, voila, i get the link to pull up the alarm frame in the browser. So, no big deal, after reading all your documentation i thought i'd just change the picture url in the secrets.ini to reflect that and reload the whole thing and then it'd work, but here's the issue, it doesn't lol!
from my config print out when i run the following command sudo -u www-data /usr/bin/zmeventnotification.pl --debug
Picture URL .......................... http://192.168.1.191/zm/index.php?view=frame&eid=EVENTID&fid=objdetect&width=600
however the python script still calls the old invalid link to get the frame (the one with no /zm/ and the word 'image' instead of 'frame'). So this is where i'm stuck, i think that if i can update that link to the one that actually points to the frame through the api, i'd get it working, but updating the picture-url in the secrets.ini file isn't actually changing what the cascade of python scripts use for the picture url even though my config has it listed correctly, so i'm stumped. I'm currently in the process of trying to set up a python debugger to walk through the code line by line to figure out why it's not just using the value i specified in the secrets.ini for the picture url, but i've got to figure out the logistics of setting up that IDE.
This is the log after updating the secrets.ini with the new url, it still calls api.py on the old one.
Honestly, i'm a little confused as to how my PICTURE path is different from the default in the first place, because i don't remember doing any customization on this ZM install, but it'd been running for a while now so my memory is foggy. If you've made it thus far, the logs are in the bottom. Thank you SO much for any time and effort, and i would love to know how to contribute to this project in the future!
Debug Logs (full logs)
**please let me know if you want more, less, logs of something different, anything!***
*zmdesdetect_m logs
note monitor4 is the one that i'm currently using to wave my hand in front of for more rapid testing
syslog tail -F /var/log/syslog | grep m4
(unsure how much of this one you'd want to see since it's just a lot of this)
syslog no grep
note: the other two cams it can't connect to are just currently unplugged as i moved around my office to troubleshoot
zmevennotification i had to manually stop this one just to prevent it from getting excessively long
/etc/zm/objectconfig.ini
***/etc/zm/zmeveneventnotification.ini
Thanks!