I've followed the wiki here: http://www.zoneminder.com/wiki/index.ph ... nDetection and I'm not able to generate any triggered events. Can anyone lend a hand? This is driving me nuts.. From all the forum posts, it should just work... Per the following, I'm getting the cam to send the tcp message and zmtrigger is doing something with.. not sure what, but I'm not getting any events.
- OPT_TRIGGERS is checked and monitor is set as enabled and in NODECT mode.
Here are the mods to zmtrigger.pl:
Code: Select all
sub handleMessage
{
my $connection = shift;
my $message = shift;
# CUA - Axis camera send the message quoted with"
# CUA - Also Axis camera cannot save the plus sign which
# CUA - possibly exists in the 1|on+20|score|cause|text|showtext formatted msg
$message=~ s/^\"//g;
$message=~ s/\"$//g;
$message=~ s/on /on\+/;
# CUA - end of modifications
my ( $id, $action, $score, $cause, $text, $showtext ) = split( /\|/, $message );
$score = 0 if ( !defined($score) );
$cause = "" if ( !defined($cause) );
$text = "" if ( !defined($text) );
Code: Select all
# Include from system perl paths only
use ZoneMinder;
use ZoneMinder::Trigger::Channel::Inet;
#cuause ZoneMinder::Trigger::Channel::Unix;
#cuause ZoneMinder::Trigger::Channel::Serial;
use ZoneMinder::Trigger::Connection;
my @connections;
push( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan1", channel=>ZoneMinder::Trigger::Channel::Inet->new( port=>6802 ), mode=>"rw" ) );
#cuapush( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan2", channel=>ZoneMinder::Trigger::Channel::Unix->new( path=>ZM_PATH_SOCKS.'/zmtrigg$
#cuapush( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan3", channel=>ZoneMinder::Trigger::Channel::File->new( path=>'/tmp/zmtrigger.out' ),$
#cuapush( @connections, ZoneMinder::Trigger::Connection->new( name=>"Chan4", channel=>ZoneMinder::Trigger::Channel::Serial->new( path=>'/dev/ttyS0' ), mode=$
Code: Select all
# ps aux | grep zmtrigger
apache 18233 0.1 0.2 192208 10988 pts/0 S 12:01 0:03 /usr/bin/perl -wT /usr/local/bin/zmtrigger.pl
Code: Select all
ngrep port 6802
T 192.168.1.105:1093 -> 192.168.1.2:6802 [AP]
"59|on 5|5|Motion|Motion|Motion".
Code: Select all
==> zmtrigger.log <==
08/19/2011 12:33:49.060153 zmtrigger[18233].INF [Trigger 'on' 'Motion']
08/19/2011 12:33:53.925921 zmtrigger[18233].INF [Trigger 'on' 'Motion']
08/19/2011 12:33:55.180129 zmtrigger[18233].INF [Found actions expiring at 1313771634]
08/19/2011 12:33:55.180341 zmtrigger[18233].INF [Found action '59|cancel']
08/19/2011 12:33:55.180587 zmtrigger[18233].INF [Cancelled event]
08/19/2011 12:33:59.190240 zmtrigger[18233].INF [Found actions expiring at 1313771638]
08/19/2011 12:33:59.190429 zmtrigger[18233].INF [Found action '59|cancel']
08/19/2011 12:33:59.190611 zmtrigger[18233].INF [Cancelled event]
What throws me in the zmtrigger.log is that it's picking up an "'on' Motion" but it's not saying it's for Monitor 59. It's not till the action "'59|cancel'" is displayed do I see that it was tied to Monitor 59... Is this normal?? Does log above look normal for this config??
Another thing that throws me is that zma is running for that monitor even though it's in NODECT mode... is this normal??
Code: Select all
08/19/2011 12:35:13.265444 zmdc[18153].INF ['zma -m 59' starting at 11/08/19 12:35:13, pid = 26257]
Thanks for any advice!!
jbmia