Audible Alarm – Warning - Audio O/P

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
User avatar
Lager Monster
Posts: 9
Joined: Mon Feb 28, 2005 5:01 am

Audible Alarm – Warning - Audio O/P

Post by Lager Monster » Tue Dec 20, 2005 11:58 pm

I have seen a lot of discussions on audio I/P into ZM – What about audio O/P

i.e if a filter criteria is met a certain wave file (selectable) is played through the servers speakers.
Hook this up to an amp . . . .

Good for scaring those who stray where they are not supposed to.

Ok it will counter audio triggering with positive feed back but that could be rectified in a filter.

So a filter like:
Monitor Id - equal to – 4
and – Time - greater than – 23:00:00
and – Time – less than – 06:00:00
and – Alarm Frames – greater than – 35
SAVE (call it “scare their pants off”)
Tick - Play wave – GTFout.wav - speaker 2

Depending on the sound card we right now have at least 2 sound channels – Left & Right. More with 5.1 etc

You can make any sound you want
Dog growling, Officer Barbrady (south park), Ghosts . . . . .

This is for a “deterrent” tactic rather than a “catch em in the act” tactic.

Move along now children. There's nothing to see here

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Wed Dec 21, 2005 9:34 am

You can do this with the web interface now but what you want is probably best achieved at the moment by creating a simple script that just watches the monitor states and plays a sound on alarms. Audio output is done differently depending on the hardware you have but shouldn't be too hard even if all you do is cat something through /dev/audio.

Phil

User avatar
Lager Monster
Posts: 9
Joined: Mon Feb 28, 2005 5:01 am

Script query

Post by Lager Monster » Fri Jan 06, 2006 9:02 am

Thanx Phil

How would you suggest I monitor the states . . .
via the /var/log/messages? I have noted entries when an alarm is triggered.
e.g
zma_m5[10549]: INF [Office: 566 - Gone into alarm state]


Is there a better/easier/more efficient way to monitor alarm states?

I found aplay /path/alarm.wav worked on my Fedora FC4 box where cat did not.

I’m a newbie at shell scripts but will give this a go and start a thread in User Contributions

Cheers Lager_Mon

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Sat Jan 07, 2006 9:23 pm

I would suggest using a simple perl script to monitor the states. 1.22.x has a simple(r) perl API to make it easy to write scripts like this and the versions of zmtrigger.pl also supports outgoing triggers so you could modify that as well.
Phil

ynn
Posts: 149
Joined: Fri Mar 17, 2006 2:30 am

Post by ynn » Fri Mar 31, 2006 12:57 pm

phil,

i like this idea of having an audio being played if there is motion detected, is there anyone out there who's already done this?

thanks.

2tomcats
Posts: 13
Joined: Sat Oct 30, 2004 10:59 am

Post by 2tomcats » Fri Mar 31, 2006 3:03 pm

ynn wrote:phil,
i like this idea of having an audio being played if there is motion detected, is there anyone out there who's already done this?
Something similar. My setup is a zm-server somewhere in my serverroom, headless. There are several machines displaying the montage window (or zm4Linux), or some mplayer/xine windows of the streams.

Those machines which are supposed to draw the attention of somebody if something is moving are running a little prog called "bofhlog" (look at freshmeat for details). This prog monitors logfiles and can "do" things if predefined conditions (based on regex) are matched. It is watching zm's logs. In my case an example action would look like this:

- raise or start the montage window (or zm4linux)
- emit a loud beep/play a sound so everybody will be alarmed
- do other things like send mail, pager, icq, ...you get the picture

regards
Uli

mrd
Posts: 245
Joined: Wed Apr 26, 2006 12:39 am
Location: Boston USA

Post by mrd » Thu Mar 22, 2007 6:39 pm

I have something that works pretty well and has the potential to record audio when an event starts/stops too, but I'm not sure it's the best way to go about it.

The script is here:
http://74.0.48.238/zm/monitor_logs.txt

It requires that "Festival" voice generating software be installed but it was pretty easy on my xubuntu box with "yum install festival"

It also requires a perl module called File::Tail that was just about as easy to install.

It works well but has some limitations. It is delayed about 5 seconds from the start of an event (as logged in /var/log/messages) and it can't tell what zone the even was triggered by, only the monitor name.

My questions to those who are more familar with ZM is...

Can you add the zone info to the logged messages?

Better yet, can ZM just provide configurable access to trigger something (an audio message) at the very start of an event and at the end?

All of this might already exist, but in my experiments, I can only get a script to run after an even has processed using a filter and even then it can't seem to generate audio with festival. I'm guessing it needs to run from the console to work or needs a setuid wrapper which can be dangerous on a system.

Maybe I should just be using triggers somehow?

Any ideas are appreciated...
MRD

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests