Why is ZMES skipping Events !Solved!

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Why is ZMES skipping Events !Solved!

Post by kaltertod »

Hello,

As the title says I am trying to figure out why ZMES is skipping some events for analysis, yet it is choosing to analyze others. I have attached a screenshot below. Any insight would be helpful.

Thanks,
Kalter
Attachments
Screenshot 2022-07-16 at 09-30-39 Green River ZM - Events.png
Screenshot 2022-07-16 at 09-30-39 Green River ZM - Events.png (303.68 KiB) Viewed 43715 times
Last edited by kaltertod on Thu Aug 04, 2022 1:26 am, edited 1 time in total.
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Why is ZMES skipping Events

Post by kaltertod »

A little more information I found while watching the zm logs this morning. It does not happen with every event but I am getting some errors that pop up in the logs about Frame Reading, and No Frame found for event.

I am still watching logs this morning so I can see if I can catch it "in the act" nothing as of yet.
Attachments
Screenshot 2022-07-17 at 08-32-38 Green River ZM - Events.png
Screenshot 2022-07-17 at 08-32-38 Green River ZM - Events.png (167.53 KiB) Viewed 43685 times
Screenshot 2022-07-17 at 08-35-24 Green River ZM - System Log.png
Screenshot 2022-07-17 at 08-35-24 Green River ZM - System Log.png (158.77 KiB) Viewed 43685 times
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: Why is ZMES skipping Events

Post by tsp84 »

Those errors just mean that zmes asked zm API for that frame I'd (231) and zm didn't reply with the requested frame.of I remember correctly.

Are the monitors in question using video pass through? In my testing MP4 events are much slower for to zm needing to decode the MP4 and then grab a jpeg image from.the mp4
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Why is ZMES skipping Events

Post by kaltertod »

tsp84 wrote: Wed Jul 20, 2022 3:38 pm Those errors just mean that zmes asked zm API for that frame I'd (231) and zm didn't reply with the requested frame.of I remember correctly.

Are the monitors in question using video pass through? In my testing MP4 events are much slower for to zm needing to decode the MP4 and then grab a jpeg image from.the mp4
Yes all of my monitors are using H264 passthrough, would I be better off saving jpegs while using ZMES?
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Why is ZMES skipping Events

Post by kaltertod »

Still working on this problem, I upgraded the gpu thinking that I might have been running out of vram and that might be why zmes was skipping events. I have since found this not to be true. However, I did end up with a faster gpu out of the deal and performance is up across the board...

I also tried saving jpegs along with using passthrough, did not make a difference in zmes missing events.

I also tried tightening the polling rate at which zmes looks for new events, I shortened the time from 5 seconds down to 2 seconds with no change in events being missed.

You can see in the logs in the screenshot that is attached that zmes is missing the events at random.....

I am still searching for answers as to why zmes is not processing all events created by zoneminder.
Attachments
Screenshot 2022-07-26 at 20-38-27 Green River ZM - System Log.png
Screenshot 2022-07-26 at 20-38-27 Green River ZM - System Log.png (414.48 KiB) Viewed 43583 times
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Why is ZMES skipping Events

Post by kaltertod »

Solved: I removed zoneminder and zmes and installed blue iris and deepstack.... Works first shot out of the box... Cpu usage is overall alot lower on the same hardware, no missed events, and the community already seems alot more helpful.... Hopefully one day I can come back to zoneminder and zmes.
fontiano
Posts: 68
Joined: Wed Dec 25, 2019 10:29 am

Re: Why is ZMES skipping Events !Solved!

Post by fontiano »

Same problem here: viewtopic.php?t=31794

Maybe the problem is the "Alarm Frame Count" parameter that is "1" by default and if an alarm is "flapping" (alarm on, alarm off, alarm on, alarm off etc.) eventserver is not triggered.

My fix was to uninstall EventServer, write a script that do a tail-f of file log, and launch another script that check all events (with at least 1 alarmed frame) trying to detect objects (with yolov5)
Production: zm 1.34.26 - Debian 11 | Test: zm 1.36.33 - Debian 12
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Why is ZMES skipping Events !Solved!

Post by iconnor »

Yes event server can miss very short events.

In 1.37 you can configure to run a script on event start/stop.

However I have to wonder... are these short events really of interest?
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Why is ZMES skipping Events !Solved!

Post by kaltertod »

iconnor wrote: Sun Aug 07, 2022 2:16 pm Yes event server can miss very short events.

In 1.37 you can configure to run a script on event start/stop.

However I have to wonder... are these short events really of interest?
I will fire up a vm and try out 1.37, yes the short events are of interest if they include people, and 75% of them do in fact include a person. That is the problem I am using facial recognition to cancel event notifications sent to my phone, and unknown faces or unknown person's in general to send an event... I do not manage only one but 3 different locations in this manner.

With the furthest being almost 300 miles away from me. So the notification and proper recognition of events/objects is very important.

As I have stated before the main location that I am monitoring is my primary residence and I am now using blue iris and deepstack at this location and there are no events that are missing being analyzed. I have 100% analysis and facial recognition is canceling events that are unimportant 100% of the time.

This has cut my notifications in half compared to zoneminder, cpu usage is down, and gpu is doing its job as it should.

As I stated before I will load up a vm and check out 1.37, but as far as 1.36x and zmes are concerned they are not meeting expectations and they are on the back burner.... If 1.37 can be integrated with deepstack or senseai and give the same result as blueiris and deepstack I will be back.

The biggest differentiating factor between the 2 platforms is the community here just looks and walks right on by with the exception of a few people. Sorry to say it but I believe it is true... Not everyone out there is a coder/programmer and I believe for zoneminder to move forward it will take a community that is willing to help as a whole.

P.S. Thanks for the reply
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Why is ZMES skipping Events !Solved!

Post by iconnor »

Perhaps if ZoneMinder cost the same amount as Blue Iris we could do a better job.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Why is ZMES skipping Events !Solved!

Post by Magic919 »

Perhaps if my Grandma had wheels she’d have been a trolley.
-
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Why is ZMES skipping Events !Solved!

Post by kaltertod »

iconnor wrote: Tue Aug 09, 2022 2:46 pm Perhaps if ZoneMinder cost the same amount as Blue Iris we could do a better job.
Just wow, This being from a dev of the project leaves a sour taste in my mouth, especially from someone that has donated more than the cost of blue iris over the years....

Sorry if I struck a nerve there, but damn man....... I may have not been on the forums long but I have been using zoneminder since 1.26 and zmes just recently.
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Why is ZMES skipping Events !Solved!

Post by iconnor »

It's not about 1 person donating. Blue Iris is a commercial product with a lot more resources. I was lamenting that this is the situation, and I cannot afford to fix it.

I don't even use ZMES and I didn't write it.

ZM donations are around $200/month. That's not even enough to pay for our amazon costs.

You are complaining about the level of support here. I wish we had more people here able to help.

In the meantime, there are people working on improving all of this, but that work is in 1.37.*, and in people's personal forks. If you this fixed, the thing to do is jump to 1.37, join slack and get involved.
kaltertod
Posts: 38
Joined: Fri Jun 03, 2022 9:42 pm

Re: Why is ZMES skipping Events !Solved!

Post by kaltertod »

iconnor wrote: Tue Aug 09, 2022 10:06 pm It's not about 1 person donating. Blue Iris is a commercial product with a lot more resources. I was lamenting that this is the situation, and I cannot afford to fix it.

I don't even use ZMES and I didn't write it.

ZM donations are around $200/month. That's not even enough to pay for our amazon costs.

You are complaining about the level of support here. I wish we had more people here able to help.

In the meantime, there are people working on improving all of this, but that work is in 1.37.*, and in people's personal forks. If you this fixed, the thing to do is jump to 1.37, join slack and get involved.
Isaac,

I am not looking for you to fix it. I was simply looking for help from the community. I understand that asker developed/used to maintain zmes. I never asked you to fix the problem with zmes skipping events. I simply came here asking for help trying to fix the problem. I am not a guru and sometimes need help. You are the one that threw the monetary and time issue out there... I was simply asking for the community's help in trying to figure out the problem.

As of this post there are 5 of my own posts, 2 relevant posts from fontiano, and tsp84, and a total of 360 views of this thread without any reasonable analysis or direction to head to try and solve the problem.

If zmes is old and outdated and unsupported I think that it is time to quit advertising it on the main zoneminder page.I am not the only one here with this issue. Look here viewtopic.php?t=31794

1. My #1 complaint is the amount of people in this sub forum that looked at my issue and walked right past it, look at the views and look at the replies.

2. Yes Blue Iris is a commercial product that sells for money. There are 20 or less that work on it for a monetary sum. This is based on information available from Linkedin. In the linux world there are hundreds, if not more that work on zoneminder.

3. If my donations have meant nothing and continue to mean nothing fine.

4. I am sorry about your financial situation.

5. Is the forum not part of the community? If it is not then why is it here? If you want people to join the slack channel for support from the community just say so. If the forum is not the best place to get support from the linux community why not advertise it as such and get rid of the forum. It might help save you some traffic and reduce operating costs.

I am sorry about all of this, zoneminder is a great product. I have used it for many years. I am happy to state that I am still using 1 instance of zoneminder/zmes as a comparison against blue iris/deepstack.

I will continue to do so until I make a determination as to which is better and as of now zoneminder is lagging. I will fire up a vm and put 1.37 on it as stated and work on some scripts to look at other methods of AI detection.

At the end of the day it is about what platform works better and to a greater extent which has a better community. I am not about toxicity, I am quite the opposite in fact. I wish this project the best of luck.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Why is ZMES skipping Events !Solved!

Post by asker »

Notes:

1. When you post logs, please consider following the instructions, which involve debug logs. Link here. While you still may not get a definitive answer from the community, it will give both you and the viewers more places to look for problems. You've posted INF logs. Once you'll enable Debug logs, you'll see what the ES is trying to do for the failed events

2. If events such as 47242/47241 are examples of missed events, it looks like the detection logic is trying to access those frames but they are not available yet. You have multiple options, that you'll find in the documentation of the ML component:
a) Add a wait clause before the detection tries to grab frames (say wait=5 for that monitor)
b) Get more granular and play with the resiliency aspects for stream_sequence
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