on_xxxx Feature Discussion
Proposal
Motion has some config options to start external programs or scripts when a certain event has occurred. These options are following:
execute |
at start of event |
onsave |
picture saved |
onmpeg |
movie started |
onffmpegclose |
movie ended |
mail |
send mail at start of event |
sms |
send sms at start of event |
The naming is not consistent nor very clear to the user. Some are missing (end of event) and others are not flexible enough (mail: sender address not configurable).
This is how the script commands should look like:
Function |
Old Option |
New Option |
Argument Appended |
Start of event (first motion) |
execute |
on_event_start |
None |
End of event (no motion for gap seconds) |
New! |
on_event_end |
None |
Picture saved (jpg or ppm) |
onsave |
on_picture_save |
Filename of picture |
Movie starts (mpeg file opened) |
onmpeg |
on_movie_start |
Filename of movie |
Movie ends (mpeg file closed) |
onffmpegclose |
on_movie_end |
Filename of movie |
Motion detected (each single frame with Motion detected) |
New! |
on_motion_detected |
None |
Mail and sms can be removed. They are executed today, when an event starts. This funtionality can be built using the on_event_start script with even more flexibility than we have today.
--
JoergWeber - 28 Mar 2005