Motion - Bug Report 2015x 07x 30x 234443

BUG:

I have installed motion on several linux distros to see if this was distro dependant but it is not. Motion's all working well apart from the event_on_start option in the motion conf file. It simply will not trigger an audio file for me. I have tried it with other commands such as the "touch" command, for instance, same problem, So, it is not merely audio related.

However, have made a fix with a bash script. The contents of which are:


#!/bin/sh
dir1=/path-to-where-your-are-telling-motion-to-store-pictures-and-or-movies
while inotifywait -qqre modify "$dir1"; do
aplay /path-to-your-audio-file
done


Before running your bash script, you need to install inotify-tools for it to work:

sudo apt-get install inotify-tools

Obviously, the "aplay: command to run an audio file could be replaced with any command to do anything. For example, send an email etc.

The great thing about this script is that it keeps on trucking. That is to say, if motion is detected and persists, the audio file will simply keep on repeating. But, if motion stops, so will the audio file. However, if motion is detected again at a later time, the audio file will be trigged once more and will keep on repeating again....until motion stops......ad infinitum.

Hope this helps anyone with similar problem.

Paste in your error messages, config settings, terminal window output etc in this text field.

Environment

Motion version: 3.2.12
ffmpeg version:  
Shared libraries: ffmpeg, mysql, postgresql
Server OS:  
-- StephenCook - 30 Jul 2015

Follow up

Fix record

Topic revision: r1 - 30 Jul 2015, StephenCook
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.