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