Filter to trigger external script

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
rups22
Posts: 2
Joined: Fri Jun 05, 2020 5:10 am

Filter to trigger external script

Post by rups22 »

Hi all

I have a problem that's been sending me crazy the last couple of days. I'm totally convinced this is a normal feature to expect with any NVR software so I am sure it's a straight forward fix

I am trying to set up a filter that triggers an external python script when it detects motion immediately

The problem is that the filter is triggering every 10 minutes (seemingly once the event is finished) rather than immediately.
I've attached a screenshot of my setup so far

Thanks in advance
Attachments
Screenshot 2020-06-05 at 15.12.18.png
Screenshot 2020-06-05 at 15.12.18.png (86.21 KiB) Viewed 950 times
User avatar
iconnor
Posts: 3363
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Filter to trigger external script

Post by iconnor »

Set Options->System->FILTER_EXECUTE_INTERVAL to something smaller.

However filters currently only run on completed events. To change this you need to edit /usr/share/perl5/ZoneMinder/Filter.pm

replace line 324 with line 321 so it looks like
$sql .= ' WHERE ( '.$self->{Sql}.' )';

Please note that you will have to add an EndTime clause to any filters that you want to only act on completed events.
rups22
Posts: 2
Joined: Fri Jun 05, 2020 5:10 am

Re: Filter to trigger external script

Post by rups22 »

Awesome thanks will try it out!
Post Reply