Hello
I am in the process of setting up some new ZM servers, and copying filters from my older exisitng setup.
I have a raft of filters that work perfectly converting video after an event has completed.
However on the new instances, the filter kicks in while the event is still happening - which it never did before.
Is this a new behaviour? Do I need to change my filters to look for an "end date"? Am I misundertanding/not set something up correctly?
Thanks
Phil.
ZMfilter - select events that have completed
Re: ZMfilter - select events that have completed
Yup. It was never possible before to filter match on incomplete events. So now you have to specify.
Add an EndDateTime IS NOT NULL rule
Add an EndDateTime IS NOT NULL rule
Re: ZMfilter - select events that have completed
I thought I had this working because the "List Matches" was happily showing me all the events I expected.
HOWEVER, I noticed that none actually get processed.
The zmfilter log shows :
01/09/24 19:06:01.935925 zmfilter_3[2344208].ERR [ZoneMinder::Filter:465] [Unable to parse date string 'null']
01/09/24 19:06:01.937875 zmfilter_3[2344208].ERR [ZoneMinder::Filter:262] [Error parsing date/time 'null', skipping filter 'Export Events']
01/09/24 19:06:01.939464 zmfilter_3[2344208].ERR [main:269] [Error parsing Sql. skipping filter 'Export Events']
So it looks like it is expecting a datestring where I have 'null'.
There does not look like any way I can add a "is not null clause" to the filter.
I have dozens of events that are now on the system that have not been processed, can you let me know the currectly syntax - and why the "list matches" works but not the "execute".
Thanks
Phil
HOWEVER, I noticed that none actually get processed.
The zmfilter log shows :
01/09/24 19:06:01.935925 zmfilter_3[2344208].ERR [ZoneMinder::Filter:465] [Unable to parse date string 'null']
01/09/24 19:06:01.937875 zmfilter_3[2344208].ERR [ZoneMinder::Filter:262] [Error parsing date/time 'null', skipping filter 'Export Events']
01/09/24 19:06:01.939464 zmfilter_3[2344208].ERR [main:269] [Error parsing Sql. skipping filter 'Export Events']
So it looks like it is expecting a datestring where I have 'null'.
There does not look like any way I can add a "is not null clause" to the filter.
I have dozens of events that are now on the system that have not been processed, can you let me know the currectly syntax - and why the "list matches" works but not the "execute".
Thanks
Phil
Re: ZMfilter - select events that have completed
Use IS or IS NOT for the operator. Not =
Re: ZMfilter - select events that have completed
Thank you - I worked it out from the code.
I was using "IS NOT" but I had 'null' in lowercase. The code in zmfilter.pl explicitly looks for 'NULL' in upercase to decide if it should parse the date field, I changed my filter to be NULL and the events have been processing happily all night.
} elsif ( $term->{attr} eq 'DateTime' or $term->{attr} eq 'StartDateTime' or $term->{attr} eq 'EndDateTime' ) {
if ( $temp_value eq 'NULL' ) {
$value = $temp_value;
} else {
$value = DateTimeToSQL($temp_value);
if ( !$value ) {
Error("Error parsing date/time '$temp_value', skipping filter '$self->{Name}'");
return;
}
$value = "'$value'";
}
Phil.
I was using "IS NOT" but I had 'null' in lowercase. The code in zmfilter.pl explicitly looks for 'NULL' in upercase to decide if it should parse the date field, I changed my filter to be NULL and the events have been processing happily all night.
} elsif ( $term->{attr} eq 'DateTime' or $term->{attr} eq 'StartDateTime' or $term->{attr} eq 'EndDateTime' ) {
if ( $temp_value eq 'NULL' ) {
$value = $temp_value;
} else {
$value = DateTimeToSQL($temp_value);
if ( !$value ) {
Error("Error parsing date/time '$temp_value', skipping filter '$self->{Name}'");
return;
}
$value = "'$value'";
}
Phil.
Re: ZMfilter - select events that have completed
Hmm, I see no reason for it to not be case sensitive. I'll fix that.
Re: ZMfilter - select events that have completed
Perhaps if IS/ISNOT is chosen, the value field should be limited to valid values.. I'll have to lookup what all the valid values are...
Re: ZMfilter - select events that have completed
Of if possible add a "Null" option to the data/time picker that pops up.