Page 1 of 1

No notification after detection

Posted: Tue Jan 04, 2022 3:27 pm
by jfqbsm
Hi,
I just start to implement zmeventnotification with hook. My goal is after detecting a person is to send an alert by email. I tried a lot of things but nothing works.
The person detection works fine but i don't get any notification. Then i try to debug what could be happen, and the first result seems strange for me.
the final result of the following command is:
sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.ini --debug --eventid 157 --eventpath=/tmp

INF [zmesdetect] [Prediction string:[s] detected:person:100% ]
DBG1 [zmesdetect] [Prediction string JSON:{"labels": ["person"], "boxes": [[472, 182, 586, 452]], "frame_id": "snapshot", "confidences": [0.9960215091705322], "image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}]
[s] detected:person:100% --SPLIT--{"labels": ["person"], "boxes": [[472, 182, 586, 452]], "frame_id": "snapshot", "confidences": [0.9960215091705322], "image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}
DBG1 [zmesdetect] [Writing detected image to /tmp/objdetect.jpg]
DBG1 [zmesdetect] [Writing JSON output to /tmp/objects.json]
DBG1 [zmesdetect] [Closing logs]

With the same command without specifying the --eventpath argument i don't get the objdetect.jpg and objects.json files

INF [zmesdetect] [Prediction string:[s] detected:person:100% ]
DBG1 [zmesdetect] [Prediction string JSON:{"labels": ["person"], "boxes": [[472, 182, 586, 452]], "frame_id": "snapshot", "confidences": [0.9960215091705322], "image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}]
[s] detected:person:100% --SPLIT--{"labels": ["person"], "boxes": [[472, 182, 586, 452]], "frame_id": "snapshot", "confidences": [0.9960215091705322], "image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}
DBG1 [zmesdetect] [Closing logs]

Does someone could tell me what could be wrong in configuration files which causes this behavior?
At worst i would like to get at least those 2 files in order to send notification by myself, or better to send notification with a specific script.

Re: No notification after detection

Posted: Tue Jan 04, 2022 3:41 pm
by Magic919
Do you have

Code: Select all

write_image_to_zm=yes

Re: No notification after detection

Posted: Tue Jan 04, 2022 5:14 pm
by jfqbsm
Yes
enclosed the objectconfig.ini

Re: No notification after detection

Posted: Tue Jan 04, 2022 5:42 pm
by Magic919
Ok. I don't believe this works like you may think it does. Mine won't write the images when I run that command, it just classifies the event.

You should be seeing events classified in ZM if it's working.

Then look at getting notified. How have you set that up?

Re: No notification after detection

Posted: Wed Jan 05, 2022 6:57 am
by jfqbsm
Hi,
You are right, it's normal behavior. It hadn't seen it before but it's written in the script zm_event_start.sh, the arguments are passed only when it's invoked by zmeventnotification.pl. I would have liked to test it in sandbox environment but it seems impossible to do it outside from zoneminder.