Can someone take a few minutes and get me started on how to make the machine ZM is running on play a sound when the camera I choose goes into alarm mode.
Thanks
Allan
Play a sound on alarm
I made a bash file that runs in terminal and plays . My filter dosen't seem to work but when I click execute I get this in the filter log. Running blind here !!!
10/11/09 19:11:01.954741 zmfilter[22851].INF [Scanning for events using filter '_TempFilter1255302661']
10/11/09 19:11:01.955607 zmfilter[22851].DBG [Reloading filters]
10/11/09 19:11:01.956937 zmfilter[22851].DBG [Found filter '_TempFilter1255302661']
10/11/09 19:11:01.957555 zmfilter[22851].DBG [SQL:select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( M.Id regexp '17' and (E.Notes = 'Motion: All') and E.AlarmFrames >= 3 and E.Cause = 'Motion' and (E.Archived = 0) and zmDiskPercent > 5 ) and ( E.Executed = 0 ) order by E.StartTime desc limit 0, 1]
10/11/09 19:11:01.957864 zmfilter[22851].DBG [Checking filter '_TempFilter1255302661', execute]
10/11/09 19:11:02.170483 zmfilter[22851].DBG [Checking event 380546]
10/11/09 19:11:02.170758 zmfilter[22851].INF [Executing '/home/allan/ping.sh 17/380546']
10/11/09 19:11:02.301726 zmfilter[22851].DBG [Output: MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Terminal type `unknown' is not defined.
Playing /home/allan/ping.ogg.
[Ogg] stream 0: audio (Vorbis), -aid 0
Ogg file format detected.
==========================================================================
Forced audio codec: mad
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 22050 Hz, 1 ch, s16le, 90.0 kbit/25.51% (ratio: 11248->44100)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
[AO SDL] Samplerate: 22050Hz Channels: Mono Format s16le
Opening /dev/dvb/adapter0/audio0
AO: [null] 22050Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 0.0 (00.0) of 0.9 (00.9) 0.2%
A: 0.0 (00.0) of 0.9 (00.9) 0.2%
Exiting... (End of file)]
10/11/09 19:11:01.954741 zmfilter[22851].INF [Scanning for events using filter '_TempFilter1255302661']
10/11/09 19:11:01.955607 zmfilter[22851].DBG [Reloading filters]
10/11/09 19:11:01.956937 zmfilter[22851].DBG [Found filter '_TempFilter1255302661']
10/11/09 19:11:01.957555 zmfilter[22851].DBG [SQL:select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( M.Id regexp '17' and (E.Notes = 'Motion: All') and E.AlarmFrames >= 3 and E.Cause = 'Motion' and (E.Archived = 0) and zmDiskPercent > 5 ) and ( E.Executed = 0 ) order by E.StartTime desc limit 0, 1]
10/11/09 19:11:01.957864 zmfilter[22851].DBG [Checking filter '_TempFilter1255302661', execute]
10/11/09 19:11:02.170483 zmfilter[22851].DBG [Checking event 380546]
10/11/09 19:11:02.170758 zmfilter[22851].INF [Executing '/home/allan/ping.sh 17/380546']
10/11/09 19:11:02.301726 zmfilter[22851].DBG [Output: MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Terminal type `unknown' is not defined.
Playing /home/allan/ping.ogg.
[Ogg] stream 0: audio (Vorbis), -aid 0
Ogg file format detected.
==========================================================================
Forced audio codec: mad
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 22050 Hz, 1 ch, s16le, 90.0 kbit/25.51% (ratio: 11248->44100)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
[AO SDL] Samplerate: 22050Hz Channels: Mono Format s16le
Opening /dev/dvb/adapter0/audio0
AO: [null] 22050Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 0.0 (00.0) of 0.9 (00.9) 0.2%
A: 0.0 (00.0) of 0.9 (00.9) 0.2%
Exiting... (End of file)]
I want to make a script to play a short wav file over the servers internal speaker on each match.
Been at this for 2 days now and starting to pull hair.
I got
#!/bin/bash
mpg123 /path file/name.wav
I did the chmod u+x and can call it from terminal with ./filename works every time. Saved as a .sh file But when I tell zoneminder to execute nothing happens , The filter log shows it did happen but I hear NADA .
And it won't run buy it's self only if I manually execute it.
Any help would be much appreciated
Allan
Been at this for 2 days now and starting to pull hair.
I got
#!/bin/bash
mpg123 /path file/name.wav
I did the chmod u+x and can call it from terminal with ./filename works every time. Saved as a .sh file But when I tell zoneminder to execute nothing happens , The filter log shows it did happen but I hear NADA .
And it won't run buy it's self only if I manually execute it.
Any help would be much appreciated
Allan