Playing a sound when alarms go active

As everything I have found is from old posts, I figured I would reach out for any new ideas.

I need an alarm to play, until acknowledged, for an active high priority alarm (HiHi & LoLo).
I can add a tag event scrip for alarm active, based on priority (high priority only), but I also need this .wav file to loop until acknowledged. (simple buzzer .wav file, short and sweet).

How will this .wav file play, will it need to launch another program to play, which I do not want…

thanks in Advance

Are you looking for the scripting function to play the sound? system.util.playSoundClip

Or are you looking for more on how it works? I haven’t used it yet but by the description it doesn’t look like it opens another program to play it.

The scripting function with the ability to play the file and silence when acknowledged

No scripting required. Bind the soundPlayer’s trigger property the tag’s AlarmHighestUnackPriority.

Example: this will chack for the priority to be over Medium

if({path/to/tag.AlarmHighestUnackPriority} > 2, 1, 0)

If there are more than one tag you want to do this for, make a client tag and OR the statuses together.


Rather than tie the audible alarm to individual alarms, you could trigger it when alarms of a certain priority are unacknowledged by putting something like this in an expression tag and binding it to the sound player trigger:

// Count active unacknowledged medium & high priority alarms.
runScript('len(system.alarm.queryStatus(priority=[2,3], state=["ActiveUnacked"]))', 2500)

You can also filter further than shown in code above; see system.alarm.queryStatus.

Put the sound player in a window that is always open (like header or navigation bar) if you want the alarm to play regardless of what windows are open in client.


I was also looking to play a sound with active alarms and found a pretty simple solution.

I added this property change script to the Alarm Count Label template on the built in Navigation page:

# when this label turns red, play the alarm audible
if event.propertyName == 'background':
	if "r=255,g=0,b=0" in str(event.newValue):

Now, when the alarm label is flashing red and yellow, it will play the Windows chimes.wav sound when it turns red.