Struggling with Event Notification

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
Chimaera
Posts: 21
Joined: Mon Apr 15, 2019 8:13 pm

Struggling with Event Notification

Post by Chimaera »

I'm fairly sure I have everything set up right, but when an event is triggered I get this in the debug log :

Code: Select all

[Invoking hook:'/usr/bin/detect_wrapper.sh' 925 2 "Side Driveway Low" "Motion All"]
Jul 28 17:21:50 localhost detect:[3988][monitor_m2]: INFO [---------| app version: 3.3.6 |------------]
Jul 28 17:21:50 localhost detect:[3988][monitor_m2]: INFO [Log level set to:debug]
Jul 28 17:21:50 localhost detect:[3988][monitor_m2]: DEBUG [allowing self-signed certs to work...]
Jul 28 17:21:50 localhost detect:[3988][monitor_m2]: DEBUG [Trying to download https://myurl.com/zm/index.php?view=image&eid=925&fid=alarm&username=myuser&password=*****]
Jul 28 17:21:51 localhost web_php[975]: INF [Login successful for user "myuser"]
Jul 28 17:21:51 localhost web_php[975]: FAT [Can't create frame capture images from video because there is no video file for this event at /Security/2/2019-07-28/925/]
Jul 28 17:21:51 localhost detect:[3988][monitor_m2]: ERROR [HTTP Error 404: Not Found]
However when I go to to that URL manually (using the same username and password) I get an image. Any ideas what could be stopping this from working?
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Struggling with Event Notification

Post by asker »

You are likely using a slightly older version of ZM (not 1.33.x) ?

There was a problem that was fixed around 2 months ago in master, where frames were not created the moment the event occurred. So it would exist later, but not at the time the ES tried to access it.

Try adding a wait=5 to the objectconfig to see if it resolves. If it does, then you need to update ZM
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Chimaera
Posts: 21
Joined: Mon Apr 15, 2019 8:13 pm

Re: Struggling with Event Notification

Post by Chimaera »

Yes, 1.33.x isn't available for Debian that I can find on any repo. wait=5 didn't help, had to go to wait=10. I now get alerts from zmninja on my phone, but only if an object is detected - is that normal?

edit: I changed the ini to analyze my HD streams vs the 640x480 streams and now it's notifying as I'd expect, even though no objects are being detected. Weird.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Struggling with Event Notification

Post by asker »

Glad it worked out, but just to be on the same page:

1. The ES kicks in anytime ZM detects an alarmed situation and the monitor is in Modect, Mocord or Nodect.

2. Whether the ES sends out a notification or not is dependent on the following factors: The event will be pushed if all of the conditions below are met:
2.a: The monitor is _not_ excluded from your monitor filter list (this is something you can change via zmNinja) [filter list is empty by default]
2.b: The time it reported the last event for this monitor is >= whatever time you set in zmNinja for that notification [0 if not set]
2.c: If the above two are met, then the ES checks the 'hook' attribute in zmeventnotification.ini. If there is a hook present, it passes the event details
to the hook and will send out the push only if the hook returns an exit code of 0. If the hook is not present, it will send out the event anyway

In your situation:
1. If you are only receiving notifications for objects and not for others, you likely have hooks enabled, in which case that is the expected behavior
2. Increasing your image resolution may improve object detection resulting in a return code of success (0) but that applies only if you are using hooks.

In general, you'd know why the ES sent/did not send a push from the ES debug logs. All decisions made are logged there.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Post Reply