AxisMotionDetection

I had this performance problem while monitoring and event recording for 8-10 IP cameras using the ZM.
ZM is too good a software to abandon just for performance issues. So I decided I should pay more attention to the motion detection feature of the cameras I have and relieve the ZM server from the task of detecting motion.
I've finally managed to use the on-camera motion detection feature of Axis Cams and here are my notes:

Cameras

I've set my Axis camera as follows:

The text "1|on 5|5|cause|text|showtext" means that
alarm will be triggered for the monitor which has ID=1,
alarm will set recording on
alarm will be cleared after 5 seconds.
The score of the alarm is 5 ( any score >0 is OK)
"text" and "showtext" are just explanatory notes.

The ZM specs tells us that the format of the message can include a "duration" as long as the message is sent as:
"1|on+5|5|cause|text|showtext" but the problem is the Axis camera cannot or will not save the "+" sign which appears in the message. A CGI parameter conversion problem I presume...

[Update] The Axis M3203 with firmware 5.40.9.2 will save the "+" sign. My guess is that the new firmware has fixed this issue. Try updating your firmware before modifying the zmtrigger.pl file.

I've taken care of this "+" problem with a small modification in zmtrigger.pl source (see below).

Next, I specified the host IP address of the zm computer and its default zmtrigger port of 6802.

The second important setup is the "motion detection" setup on the Axis. I created a window which covers the area of interest; kept the object size as small as possible, pulled the history slider all the way back to zero and left the sensitivity slide somewhere past the %50 value.

ZM settings

There is no special setting for the ZM except that I've assigned the "Nodect" function to my camera monitor.

These three regular expressions remove the quotes sent by Axis which envelope the message string and insert a plus sign if the "on" command is followed by a space). These 3 statements convert an incoming message of the form

Code:

"1|on 25|5|cause|text|showtext"

to

Code:

1|on+25|5|cause|text|showtext

and of course, you shouln"t forget to restart zmtrigger.pl; or better still modify the zm startup script so that it starts zmtrigger.pl everytime zm is [re]started.

Note: If you plan to use the zmxap interface (to connect ZoneMinder to MisterHouse using xAP), your cause must be "Motion" (without quotes), and your text must be a single word (no spaces); eg: LAWN. In Misterhouse, the camera name will be the MONITOR name (eg: FRONT_DOOR), and the zone name will be the text (eg: LAWN). If you don't follow this convention then MisterHouse will not respond to the xAP event messages Intensive Driving Courses London properly.

I added the line '/usr/bin/zmtrigger.pl &" in the start section of
/etc/init.d/zoneminder and also added the line "pkill zmtrigger.pl" in the stop section.