Help Needed Editing Email filter to pickup on ZMES object Detection

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Help Needed Editing Email filter to pickup on ZMES object Detection

Post by kaltertod »

I am looking for a little help on changing the traditional event email filter so that it will pick up on the objects that ZMES detects.... Basically I want it to send an email out with the associated objdetect.jpg attached to the email. If ZMES does not detect anything then I do not want an email. What I am trying to do is cut down on the amount of e-mails that I am recieving.

The reason that I am configuring it using the email as a notification is because of zmninja's lack of being able to receive notifications from multiple servers.

Any help is greatly appreciated.

<flame suit on> :idea:
Attachments
zm.jpg
zm.jpg (425.42 KiB) Viewed 2987 times
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Help Needed Editing Email filter to pickup on ZMES object Detection

Post by asker »

One option for you to consider:
- Use the "notes" filter matching criteria to search for "detected:" text. If that text is found, that means the ES found an object for that event
- If it matches use %EIMOD% to include the detected image.

I also saw your other post in the mobile forum:
- If you are looking to offload GPU detection to one server and run ES in another with ZM, then mlapi is the way to go
- If you haven't already, feel free to read up on the Key Principles document for the ES. You'll find several places where you can insert your custom script to send out emails or pretty much do anything else, including, say, using a service like pushover which in turn can send notifications to as many devices as you want. If you use pushover, you could also have multiple servers send a notification to the same device (but pushover delivers the image to a pushover app, not zmNinja). the attributes of interest are api_push_script, event_start_hook_notify_userscript, event_end_hook_notify_userscript

TBH its pretty simple to add an ability for multiple ESs "reporting" to one master ES which would then notify zmNinja. I never got around to doing it.
All that being said, I no longer maintain the ES or the ML code and won't be adding/changing it. There are some other variants/extensions of the code I've seen being posted, but have never used/looked into them, so I can't speak for what they do/don't. If you are upto making changes to the ES/ML part, feel free to do PRs for the ZM authors to consider merging.
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
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Help Needed Editing Email filter to pickup on ZMES object Detection

Post by kaltertod »

Thank You Asker!

That is all I was looking for... The main reason for wanting to use an Email filter versus push notification is because Push uses data. If you are on a restricted data plan as I am then it counts as data on the account... If I use email then it is considered as sms and does not count against the data cap on the mobile account.

Another positive to adding a gpu to the second server is using cuda to decode images for ZM in place of the cpu hence dropping cpu usage as a whole on the server.

I will do some more reading on the Key Principles. I am learning albeit slow. I am not a programmer and alot of the concepts seem foreign to me. I will continue to learn and grow the it is just a matter of putting the time in.

Thanks again for taking the time to reply.
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Help Needed Editing Email filter to pickup on ZMES object Detection

Post by kaltertod »

Editing the filter in this manner worked exactly like I wanted. Thank you again asker... I do have one more quick question and if I need to repost and make another thread in the apps section I will but is there a way to configure the size of the output image that zmes creates? Like say if I wanted to create an image that was the same size as the stock footage?
Post Reply