Skip to main content

Sound Alarm

- PI Vision Widget -

Revision History

Revision No.DateAuthorDocument IDDescription of changes
9.2June 2025RSEW_SoundAlarm_v9.2.docAdded select REST provider
9.1May 2025RSEW_SoundAlarm_v9.1.docAdded feature Get Support
9.0March 2025ALEW_SoundAlarm_v9.0.docCompatibility with PIVision 2024 and new widget style introduced
8.0August 2023AMEW_SoundAlarm_v8.0.docCompatibility PI Vision 2023
7.2January 2023MDCEw_SoundAlarm_v7.2.docAsset management in configuration
7.1January 2023MDCEw_SoundAlarm_v7.1.docPIWebAPI management in a different server
7.0August 2022AMEw_SoundAlarm_v7.0.docCompatibility PI Vision 2022
6.0October 2021MDCEw_SoundAlarm_v6.0.docCompatibility PI Vision 2021
4.0October 2020OSEw_SoundAlarm_v4.0.docCompatibility PI Vision 2020
2.2.1August 2020VSEw_SoundAlarm_v2.2.1.docReview
2.2December 2019PCEw_SoundAlarm_v2.2.docPI Vision 2019 support
2.1January 2019GIEw_SoundAlarm_v1.0.docFirst review

Document References

DocumentDescription
PI Vision Installation and Administration GuidePI Vision™ user manual from AVEVA

Introduction

Sound Alarm widget allows you to play a sound alarm related to an attribute of an element or of an Event Frame. In addition, it is possible to display the alarm through an animated GIF image.

PI Vision from AVEVA, available since 2017, enables viewing real‑time data from the PI Data Archive and data organized in assets from the AVEVA Asset Framework (PI-AF).
To access PI Vision displays, simply navigate to:
https://webServer/PIVision (replace “webServer” with the correct name of the webserver machine)

The widget supports the most recent versions of HTML5-compatible browsers on computers, tablets, and phones running Android and iOS.
PI Vision configuration is intuitive – simply drag-and-drop the control into the display.

Definitions, Acronyms And Abbreviations

Acronyms and definitions that are used in the current manual are listed below.

TermDefinition
EFEvent Frame

Operating Principles And Use

Sound Alarm widget can be configured to be enabled by two kinds of triggers:

  1. Event Frame (EF)
  2. Attribute value of an element
  • In the first case (EF), a string is used as the search key for the event name within the database.
  • In the second case, an attribute (numeric, boolean, or string) is used. (Enumeration sets cannot be used.)
    The widget is activated when the attribute equals 1 (numeric) or True (digital).

To insert the EW_SoundAlarm widget, select the corresponding icon, navigate to the desired asset, and drag it to the display area.

Figure 1 – Sound Alarm

Once the mouse button is released, the widget area is set. Then, by selecting the contextual menu, you can access the widget configuration box.

Figure 2 – Contextual Menu

Functionality and use

It is possible to select an element and then specify the name of the attribute that will activate the alarm (see section 3.2).
For the attribute functioning mode, first select the database containing the element with the chosen attribute.
Once the widget icon is selected from the Asset menu, drag the element containing the attribute.

Figure 3 – Sound Alarm Widget with Attribute

After configuration through the chosen trigger, the widget activates a sound alarm and an animation.
The alarm can be stopped using the switch next to the widget title.

Customization and configuration

The widget configuration allows you to change appearance aspects (colours, text size, and language visualization).

Language

In the International section, choose the language for labels and configuration parameters.

Figure 4 – Language visualization

All modified settings are updated in real time unless marked with “*”; in that case, save the display and refresh the page.

Title

Change the widget title by specifying a string in the Title section.

Figure 5 – Customization of the widget title

Monitored Attribute

In the modality section it’s possible to write the name of the attribute to be monitored. This field is required if the Attribute mode is used.

Figure 6 – Attribute to be monitored

Text Size

Customize the text font by selecting a pixel value from the combo box in the Text size section.

Figure 7 – Customization of the text size

Image Size

Customize the alarm image size.

Figure 8 – Customization of the image size

Sound Path, Image Path and Alarm Image Path

Insert the name of the audio file that will be used as the sound alarm.
The file must reside in the Public/Sounds directory.
Insert the name of the image file for the widget.
The file must reside in the Public/Images directory.
Insert the name of the GIF image file for the alarm.
The file must reside in the Public/Images directory.

Figure 9 Sound Path, Image Path and Alarm Image Path

For the configuration of the next part, distinguish whether the widget operates in Attribute or EF mode.

Event Frame Mode configuration

When using Event Frame mode, the settings menu includes:

  • Loop: When enabled, the sound repeats even if the file ends.
  • Alarm timeout: Seconds after which the sound alarm stops.
  • Mode: Select either EF or Attribute mode.
  • Search frequency: Frequency (in seconds) for EF search in the database.
  • Search Interval: The interval for EF search (for example, “-8h” means the search starts 8 hours before).
  • Query EF name: A string to match the EF name (can be partial; event frames must be annotated).
  • Server WebAPI: Enter the PIWebAPI server name if different from the PI Vision server.

Figure 10 – EventFrame mode configuration

(Settings such as Loop, Alarm timeout, Mode, Search frequency, Search Interval, and Query EF name are explained in the figure caption.)

Attribute Mode configuration

When using Attribute mode, the settings menu includes:

  • Loop: When enabled, the sound repeats.
  • Alarm timeout: Seconds after which the sound alarm stops.
  • Mode: Select either EF or Attribute mode.
  • Server WebAPI: Enter the PIWebAPI server name if it is different from the PI Vision server.

Figure 11 – Example Query and annotation

Figure 12 – Attribute mode configuration

REST Provider

Allows the user to select between default or custom protocol for api requests.

Figure 13 - REST Provider selection

Assets

Lists the attributes dragged into the display to create the widget.
If there is more than one, you may delete an asset by clicking the associated symbol.

Figure 14 – Assets section

Colors

Customize the widget colours (for title and background).

Figure 15 – Widget colors settings

Contacts

Get Support button (read Get Support documentation)

Link to e-matica.com (click on the icon)

Link to widget online documentation (click on link)

Figure 16 – Contact us

Installation

Follow the instructions below for installation requirements and procedure.

Requirements

In order to install the product, minimum requirements are listed in the table below:

SoftwareVersionNote
PI Vision2024 (*)Requirements are linked to the PI Vision correct functioning
Table 1 - Installation prerequisites

(*)This widget is also compatible with PI Vision 2023, 2022, 2021, 2020 and 2019.

We suggest using Google Chrome for full compatibility with the widget.

Installation procedure

The installation procedure involves copying files and folders to the predefined PI Vision path.

  1. Copy Files:
    Copy the following files into:
    ..\PIPC\PIVision\Scripts\app\editor\symbols\ext

    • sym-EwSoundAlarm.js
    • sym-EwSoundAlarm-config.html
    • sym-EwSoundAlarm-template.html
  2. Copy Folders:
    In the folder ..\PIPC\PIVision\Public, copy these folders:

    • Images:
      • Contains the control icon: EwSoundAlarm.png
      • Also copy the image file to be associated with the alarm.
    • Libs:
      • Contains the libraries: EWClasses.js and Moment.js
    • Sounds:
      • Contains the ringtone to be used as the alarm audio file.

    Save the file and restart IIS.

Additional notes for the use of the product

In the latest versions of Google Chrome the default autoplay for sounds and videos is disabled. For proper widget functioning, adjust the browser settings as follows:

  • Open Chrome and navigate to chrome://flags
  • Search for "Autoplay" in the flags search bar
  • Select Autoplay Policy
  • Choose No Gesture is required from the menu
  • Restart the browser

This procedure is summarized in:

Figure 17 – Google Chrome Autoplay

For Chrome versions later than 76, add the following command when starting Chrome:
--autoplay-policy=no-user-gesture-required

Steps:

  • Right-click the Chrome shortcut icon
  • Open the Properties tab
  • In the Target field, add after the closing quote:
    --autoplay-policy=no-user-gesture-required
  • Example:
    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --autoplay-policy=no-user-gesture-required
  • Click Apply and then OK

Additionally, to access multimedia files (the alarm sound) from PI Vision, you must enable .mp3 as an allowed MIME type:

  • Open Internet Information Services (IIS) Manager
  • Navigate to: PI-Server > Sites > Default Web Site > PiVision > MIME Types
  • Add the following MIME type:
    File Extension: .mp3
    MIME Type: audio/mpeg
  • Click OK
Figure 18 – MIME Type

Next, modify the web.config file in the PI Vision folder to add the necessary lines (as shown in the figure). Finally, from a command prompt, run iisreset to restart IIS.

Figure 19 – Web.config and iisreset

Notes And References

For more information about Vision PI refer to documentation on AVEVA © portal.
For information about the web service to refer to the specific documentation.