dpguest
Posts: 28
Joined: Wed Feb 06, 2013 4:17 pm

motion mmal and email

Fri May 31, 2013 9:59 pm

I have dozencrows wonderful adaptation of motion running on my pi. It fires up the pi camera and captures motion when it occurs. It creates a jpg file from the "center" of the motion detected, and an avi movie.

I have mail installed and the following works:

echo 'hi' | mail -s 'Sample Mail' <email address>

If I place this statement in place of value in the on_picture_save, et

; on_picture_save echo 'hi' | mail -s 'Sample Mail' <email address>

I do not get the email when the picture is saved. What am I missing?

thanks....

User avatar
dozencrows
Posts: 172
Joined: Sat Aug 04, 2012 6:02 pm

Re: motion mmal and email

Sat Jun 01, 2013 12:53 pm

Try removing the leading semi-colon from your on_picture_save line, giving you:

Code: Select all

on_picture_save echo 'hi' | mail -s 'Sample Mail' <email address>
That semi-colon makes the line into a "comment" - i.e. it doesn't get read by motion. Taking it out should make it work (assuming you've got the mail side of things set up).

LBS
Posts: 4
Joined: Mon Jan 28, 2013 3:53 pm

Re: motion mmal and email

Sat Jun 01, 2013 7:51 pm

I've just got my camera and I'm trying to get motion running with the pi camera.
What setting are you using in motion.conf for videodevice?

User avatar
dozencrows
Posts: 172
Joined: Sat Aug 04, 2012 6:02 pm

Re: motion mmal and email

Sun Jun 02, 2013 2:22 pm

Hi LBS!

There are a few ways to do this - you can set your Pi camera up as a webcam via a script triggered from a web server running on the Pi, then configure motion to read from that. See this thread for more: http://www.raspberrypi.org/phpBB3/viewt ... 43&t=43844

Or you can try my customised version of motion which uses the Pi camera directly - read this thread for more info: http://www.raspberrypi.org/phpBB3/viewt ... 43&t=44966

Return to “Camera board”