No notification after detection

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
jfqbsm
Posts: 11
Joined: Tue Dec 14, 2021 6:36 pm

No notification after detection

Post 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.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No notification after detection

Post by Magic919 »

Do you have

Code: Select all

write_image_to_zm=yes
-
jfqbsm
Posts: 11
Joined: Tue Dec 14, 2021 6:36 pm

Re: No notification after detection

Post by jfqbsm »

Yes
enclosed the objectconfig.ini
Attachments
objectconfig.ini
(18.94 KiB) Downloaded 73 times
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No notification after detection

Post 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?
-
jfqbsm
Posts: 11
Joined: Tue Dec 14, 2021 6:36 pm

Re: No notification after detection

Post 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.
Post Reply