Filter not working?

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
tortho
Posts: 11
Joined: Tue May 25, 2021 8:56 pm
Location: Sandefjord, Norway

Filter not working?

Post by tortho »

Seems like my filter is not working as intended.
A filter with the below seems to trigger the sh script very frequent - way more frequent than I have logged events on that monitor
How can I research this further to find out what is triggering?

Alarm - equals to - "Name of monitor"
and
Alarm Frames - greater than or equal to - 20

Tick off
Execute command on all matches - "My sh script"
Run filter in Background
Run filter concurrently
Attachments
Example Filter.png
Example Filter.png (87.01 KiB) Viewed 1987 times
User avatar
iconnor
Posts: 2862
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Filter not working?

Post by iconnor »

Turn off concurrently.
tortho
Posts: 11
Joined: Tue May 25, 2021 8:56 pm
Location: Sandefjord, Norway

Re: Filter not working?

Post by tortho »

Thanks, works better but not optimal, seems to take quite some time after the monitor goes into alarm before the filter triggers.
The intention was to trigger the outside lights on motion.

What link is there between the filter going off constantly when the run concurrently is checked?

From the instruction:
"
Run filter concurrently: Allows this filter to run in its own thread thereby letting other filters run in parallel.
"
haus
Posts: 213
Joined: Thu Oct 11, 2007 5:10 am

Re: Filter not working?

Post by haus »

You can test by listing the matches in the filter window (the first blue button on the bottom). If it matches more than one event, it's going to execute your script for every event it finds. So the first time you run it, if you have 57 events in the database, your script is going to run 57 times since you set the limit to 100. If you have 157 events, it's going to run it 100 times (your limit of 100), wait for the filter-execute-interval, and then run it 57 more times to catch the remaining events.

Try changing your filter to catch only events in the last five minutes (for example) - something like "Start Date/Time greater than 5 minutes ago", and set the limit to the first 1 result only instead of 100.

Lower filter-execute-interval if you want them to run more frequently, or if you want to get advanced, you can use the API to poll for events and react in near realtime.
tortho
Posts: 11
Joined: Tue May 25, 2021 8:56 pm
Location: Sandefjord, Norway

Re: Filter not working?

Post by tortho »

Then concurrent makes sense.

Can see the filters are probably set to 60 seconds if the option is: FILTER_EXECUTE_INTERVAL

There is further a warning about setting it too low.

Is there other options to trigger something if one of the monitors goes into alert or alarm state?
Post Reply