Sound Alarm
- PI Vision Widget -
Revision History
| Revision No. | Date | Author | Document ID | Description of changes |
|---|---|---|---|---|
| 9.2 | June 2025 | RS | EW_SoundAlarm_v9.2.doc | Added select REST provider |
| 9.1 | May 2025 | RS | EW_SoundAlarm_v9.1.doc | Added feature Get Support |
| 9.0 | March 2025 | AL | EW_SoundAlarm_v9.0.doc | Compatibility with PIVision 2024 and new widget style introduced |
| 8.0 | August 2023 | AM | EW_SoundAlarm_v8.0.doc | Compatibility PI Vision 2023 |
| 7.2 | January 2023 | MDC | Ew_SoundAlarm_v7.2.doc | Asset management in configuration |
| 7.1 | January 2023 | MDC | Ew_SoundAlarm_v7.1.doc | PIWebAPI management in a different server |
| 7.0 | August 2022 | AM | Ew_SoundAlarm_v7.0.doc | Compatibility PI Vision 2022 |
| 6.0 | October 2021 | MDC | Ew_SoundAlarm_v6.0.doc | Compatibility PI Vision 2021 |
| 4.0 | October 2020 | OS | Ew_SoundAlarm_v4.0.doc | Compatibility PI Vision 2020 |
| 2.2.1 | August 2020 | VS | Ew_SoundAlarm_v2.2.1.doc | Review |
| 2.2 | December 2019 | PC | Ew_SoundAlarm_v2.2.doc | PI Vision 2019 support |
| 2.1 | January 2019 | GI | Ew_SoundAlarm_v1.0.doc | First review |
Document References
| Document | Description |
|---|---|
| PI Vision Installation and Administration Guide | PI 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.
| Term | Definition |
|---|---|
| EF | Event Frame |
Operating Principles And Use
Sound Alarm widget can be configured to be enabled by two kinds of triggers:
- Event Frame (EF)
- 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:
| Software | Version | Note |
|---|---|---|
| PI Vision | 2024 (*) | 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.
-
Copy Files:
Copy the following files into:
..\PIPC\PIVision\Scripts\app\editor\symbols\extsym-EwSoundAlarm.jssym-EwSoundAlarm-config.htmlsym-EwSoundAlarm-template.html
-
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.jsandMoment.js - Sounds:
• Contains the ringtone to be used as the alarm audio file.
Save the file and restart IIS.
- Images:
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.