Re: Why is ZMES skipping Events !Solved!
Posted: Thu Oct 06, 2022 9:01 am
I'm not sure if it's a good idea to reopen this thread. I've noticed short events are sometimes missed on my zmes set up. This (https://zmeventnotification.readthedocs ... ered-in-zm) section suggests extending the post event buffer. Mine is set to 100 @4fps, that's 25 seconds, so should easily be caught. BUT (after adding some additional logging to zmeventnotification.log, I've noticed these short events go to state 4 ( = STATE_TAPE ??? ).
Having a play around, it seems that if I put the monitor into Record or Mocord, then the monitor is in state 5.
The plot thickens, it seems the state constants in perl don't match zoneminder:
https://github.com/ZoneMinder/zoneminde ... mory.pm.in
It seems there is a bug with the constants in perl - does that means this is a zoneminder bug rather than zmes? For now I've changed line 1406 of zmeventnotification.pl to:
Having a play around, it seems that if I put the monitor into Record or Mocord, then the monitor is in state 5.
The plot thickens, it seems the state constants in perl don't match zoneminder:
https://github.com/ZoneMinder/zoneminde ... mory.pm.in
Code: Select all
use constant STATE_UNKNOWN => 0;
use constant STATE_IDLE => 1;
use constant STATE_PREALARM => 2;
use constant STATE_ALARM => 3;
use constant STATE_ALERT => 4;
use constant STATE_TAPE => 5;
Code: Select all
cat test.pl
#!/usr/bin/perl -T
use ZoneMinder;
print "STATE_UNKNOWN " . STATE_UNKNOWN . "\n";
print "STATE_IDLE " . STATE_IDLE . "\n";
print "STATE_PREALARM " . STATE_PREALARM . "\n";
print "STATE_ALARM " . STATE_ALARM . "\n";
print "STATE_ALERT " . STATE_ALERT . "\n";
print "STATE_TAPE " . STATE_TAPE . "\n";
Code: Select all
./test.pl
STATE_UNKNOWN STATE_UNKNOWN
STATE_IDLE 0
STATE_PREALARM 1
STATE_ALARM 2
STATE_ALERT 3
STATE_TAPE 4
Code: Select all
if ($state == STATE_ALARM || $state == STATE_ALERT || $state == 4) {