Event on motion picture saved
- I've configured "on_picture_save" to send me email with picture attached when motion detects movement => it works great !
- I've configured "snapshot_interval" to store snapshot in order to display them in real-time => it works super great !
My problem is :
- the event "on_picture_save" send me an email for each snapshot.
How could I configured motion in order to send me email only
on non-snapshot picture save ?
Paste in your error messages, config settings, terminal window output etc in this text field.
| Motion version:
| ffmpeg version:
|| ffmpeg, mysql, postgresql
| Server OS:
- 03 Mar 2015
You probably already knew this but you can make the filenames of motion jpegs and snapshot jpegs different by specifying the config file parameters "snapshot_filename" and "picture_filename" differently. So for example you can always have the word "snapshot" in the snapshot jpegs but not in the motion jpegs.
Then, could you make your system detect when an image file has the word "snapshot" in it and have it not send an email?
So for example you could use
on_picture_save mail_jpeg.sh %f
And then have a script mail_jpeg.sh similar to the following (replacing "send_email" with whatever commands you are using)
# test if the saved jpeg filename passed to the script has "snapshot" included
# and if so don't sent an email.
# SNAP should be empty for a non snapshot file assuming all snapshot files have
# the word snapshot in them.
SNAP=`echo $1 | grep snapshot`
if [ -z $SNAP ] ; then
I wonder if that would solve your problem? Anyway, best wishes and good luck!
- 06 Mar 2015