LinuxMCE Forums

General => Users => Topic started by: secs on November 28, 2008, 09:16:16 pm

Title: extra events
Post by: secs on November 28, 2008, 09:16:16 pm
Hi all.

Probably not the best subject heading but I will explain a bit more.

I have my capture card working. Really well actually. I was going to give up but persisted and glad I did. Now I have it firing Linuxmce apparently as I can view the Alerts Log and see images and times of motion detection. So I assume the that motion is passing the info back to Pluto etc ok.

I would like to fire a script to send the captured image etc off site via email and ftp etc. I have added

on_picture_save /usr/bin/send_mail %f
on_movie_end /usr/bin/send_mail %f

to the CONFIGERATION section of the Advance-devices-motionwrapper-camera

bit yet it doesn't seem to fire it.

Can anyone see a mistake or it there another way?

I have checked the cameras conf file in the motion stuff itself and the above has been added to it.


Title: Re: extra events
Post by: bulek on November 28, 2008, 09:45:46 pm

maybe for a start, you could try to put in some trivial task, to see if the problem is in motion or in your script...

What version of motion do you use ? I think I always upgrade motion instantly, cause Ubuntu stock one is quite outdated, but I'm speaking this out of memory.... not sure....

I use this one :
motion Version 3.2.11, Copyright 2000-2005 Jeroen Vreeken/Folkert van Heusden/Kenneth Lavrsen

Maybe it is the stock one - do you have the same ?


Title: Re: extra events
Post by: colinjones on November 28, 2008, 09:51:16 pm
bulek - does Motion support setting of polygons (say a rectangle) to ignore in the image processing? eg pointing a camera at a room with a window in it that has a lot of motion outside. You could describe a polygon to include the window, for Motion to ignore motion in....
Title: Re: extra events
Post by: elspic on November 29, 2008, 12:15:47 am
colinjones: I'm not sure if that is possible, but I think the inverse is possible using area_detect:

# Detect motion in predefined areas (1 - 9). Areas are numbered like that:  1 2 3
# A script (on_area_detected) is started immediately when motion is         4 5 6
# detected in one of the given areas, but only once during an event.        7 8 9
# One or more areas can be specified with this option. (Default: not defined)
; area_detect value

I'm not sure if you'd do something like area_detect 1,2,3,4,6,7,8,9 to ignore the center of the image or if it would be multiple statements.

secs: Could you update the wiki or at least post what you did to get motion working so well for you? Do you have a problem with any of your cameras not updating? I've found it easiest to see this issue in a quad view. After a minute one or more of the camera images will stop refreshing. You can actually see the timestamp stuck at the time on the stuck ones while the working ones continue to change.

Bulek: When you say you upgrade motion, do you go through apt or get the newest sources and compile?
Title: Re: extra events
Post by: secs on November 29, 2008, 01:09:40 am
Hi all.

I actually program in Delphi for that horrible os Windows and when I get problems, I add stuff so it writes to a log file so I can see where its up to. So just after I posted the above, I did a Google and found you can simly add

logger some type of info

to your scripts and it writes it to the syslog

So yes it is actually running the script.

It seems that the script works if I call it from the command line but doesn't do all it should when called from Motion so it must be a permisions type problem and not a Linuxmce or Motion one.

I will keep you informed. Thanks to all those who helped..