Page 1 of 1

Filter not working?

Posted: Thu Oct 14, 2021 8:14 am
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

Re: Filter not working?

Posted: Thu Oct 14, 2021 12:12 pm
by iconnor
Turn off concurrently.

Re: Filter not working?

Posted: Mon Oct 18, 2021 7:23 am
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.
"

Re: Filter not working?

Posted: Wed Oct 20, 2021 11:20 pm
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.

Re: Filter not working?

Posted: Sun Oct 24, 2021 3:45 pm
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?