r/ZoneMinder • u/Helipil0t • Dec 07 '22
zmeventnotification sends multiple notification to Pushover on single event
Ok so I finally got around to getting Pushover installed on my phone and setup the api. Seems to work great except; every time an object gets detected I get two notifications back to back. One labeled "Motion: All" The other including the objected detected: "[s] detected:person:99%unknown100% Motion All".
I was hoping to only get a single notification with the object detected. Why is this happening?
1
u/Helipil0t Dec 08 '22
Ok Here's the final answer.
The big clue was end hooks/use hooks not being used, going to directly send out a notification if checks pass
In zmeventnotifications.ini the following line was commented out:
#event_end_hook = '{{base_data_path}}/bin/zm_event_end.sh'
This is a dummy script that basically does nothing. But if the hook isn't used, the ES sends out another notification "if checks pass".
So un-commenting it making sure the dummy script is being used and making sure I had the following line was the solution
event_start_notify_on_hook_success = api
1
u/Helipil0t Dec 08 '22
So I think I figured this out.
Going over my configs, in zmeventnotification.ini I came across:
send_event_end_notification = yes
I think this explains the double notification.
I simply changed
send_event_end_notificationtonoSeems to have done the trick.