Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

First you install ffmpeg, configure emails from root.

Once you can email yourself from the CLI you are ready for ZoneMinder Configuration.

First!

 sudo nano /usr/bin/zmfilter.pl

Find and change:

 sub sendEmail			##Line 955 Look for this	

 }
            ### Send the Message
            #MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 );
            #$mail->send();
            $mail->send('sendmail','/usr/sbin/ssmtp',$Config{ZM_EMAIL_ADDRESS});
            }
Inside ZoneMinder, head to Options >> EMail
OPT_EMAIL>> Check
EMAIL_ADDRESS >> [gmail_username]             # NO @gmail.com
EMAIL_SUBJECT >> ZoneMinder: Alarm - %MN%
EMAIL_BODY        >>

ZoneMinder Alarm

Monitor : %MN%
Event Id : %EI%
Length : %EL%
MP4 : %EV%Attached to E-Mail

This alarm was matched by the %FN% filter 

Zoneminder Console:

%ZP%

ZoneMinder

OPT_MESSAGE >> UnChecked
MESSAGE_ADDRESS >> Blank
MESSAGE_SUBJECT >> Blank
MESSAGE_BODY >> Blank
NEW_MAIL_MODULES >> Check
EMAIL_HOST >> localhost
FROM_EMAIL >> Where E-Mails appear to originate
URL >> ZoneMinder URL
 

ZoneMinder-Email_Settings

 

%EV% = Attach the event as a video.

To do this you must tell ZoneMinder where FFMPEG is installed.

Head to >>Images

OPT_FFMPEG >> Checked
PATH_FFMPEG >>  /usr/bin/ffmpeg
FFMPEG_INPUT_OPTIONS >> blank
FFMPEG_OUTPUT_OPTIONS >> -r 25
FFMPEG_FORMATS >> mp4
FFMPEG_OPEN_TIMEOUT >> 10

Zoneminder-FFMEG_Settings

Now to test!

To do this, you need to create a filter. Lets first set the Camera in Modect Mode to detect Motion then head to filters.

ZoneMinder_Filters
ZoneMinder_Filter2

 

 

Execute to test. Watch Logs.

Once it is working to your liking, you can fine tune.

 

ZoneMinder Email Options Wiki

ZoneMinder SMTP Wiki

  • No labels

1 Comment