Sending an alarm notification via VOIP (text-to-speech)
Introduction
Hello and welcome to a new guide on how to best use Movicon.NExT™.
In this technote we will show you how to configure the Alarm Dispatcher
to send notifications by VOIP.
Example
We will use an example to give you a better idea of how to do this.
How to create the tag
Having already started up the software and loaded the project:
Open the I/O Data Server
in the project tree within the Project Explorer window.
Go
to the Tag List by selecting the appropriate I/O Data Server tab.
Right
click on the workspace and select the Add New Tag from the menu
that appears.
Configure
the tag using the properties window in the following way:
Name
boolTest
Model Type
Variable
Data Type
Boolean
Confirm
these changes by clicking on the Accept Changes icon located on
the toolbar at the top of the Properties window.
How to create and associate the alarm
We shall now create an alarm in this way:
Open
the I/O Data Server located in the Project Explorer window’s project
tree.
Access
the Alarms tab by selecting the corresponding I/O Data Server
tab.
Expand
the items in the Alarm tab until you reach the Source item.
Select
and right-click the Source item to open its contextual menu.
Select
the Add New Alarm Definition menu option and configure the alarm
as follows:
Name
boolTestAlarm
Alarm Type
Trip Alarm
Activation Condition
Equals
Activation Value
1
Click
the Accept Changes button on the alarm properties window’s toolbar
to confirm.
Now that we have created and configured the tag and alarm, we can
go ahead and assign the two elements:
Select
the alarm you have just created in the I/O Data Server’s Alarm
tab.
Right-click
it and select the Assign Tag option from the menu that appears.
Select
the previously created boolTest Tag from the table and click OK
to confirm.
How to create the screen
Now, we will need to create a screen:
Look
for the Screens resource in the project's tree structure in the
Project Explorer window and select it.
Right-click
it and select the New option from the menu which opens.
A
New Screen popup will appear through which you can set the screen's
main properties. Configure the screen as follows:
Width:
1920
Height:
1080
Name:
Main
Click
the OK button to confirm the configuration.
Once the screen has been created, you can then change the project's
properties by inserting the screen as the project's Main screen which
will show when the project starts up. To do this:
Select
the name of the project from the application's tree structure.
Open
the Properties window.
Change
the following project properties in this way:
Startup
Page Type: Main Screen
Startup
Screen Name: Main
Once you have finished configuring the project startup page, click
on the Save All icon located on the toolbar at the top to save the
project.
Now, open the Main screen and click on the Toolbox tab on the far
right of the editor window to open the Toolbox library provided by
Movicon.NExT.
Go to the Toggle Switches folder and drag a Vertical Switch onto the
screen. Drag the boolTestTag onto the object to associate it.
How to create a user within the project
To use the Alarm Dispatcher correctly, you will need to create a
user within the project. This user will be the one who receives notifications
from the Alarm Dispatcher.
To do this:
Double-click
on the Users module located on the project tree.
Once
the module’s configuration window has displayed, right-click on
the Admin folder and select the Add New User option to insert
a user in the selected folder.
Configure
the user as follows:
User
Name: User1
Password:
1111
Confirm
Password: 1111
Email
- Address: insert User1’s email
VOIP
- Phone Number: insert User1’s VoIP number
SMS
- Phone Number: insert User1’s phone number
Telegram
- Chat ID: insert User1’s Telegram Chat ID
How to configure the Alarm Dispatcher’s VoIP plugin
We shall now configure the Alarm Dispatcher:
Double-click
on the Alarm Dispatcher module located on the project tree in
the Project Explorer window to open it.
Leave
all the default settings as they are in the General Settings tab
that opens and select the Plugin List tab.
Right-click
within the Plugin List’s workspace to insert a plugin by selecting
the Add New Plugin from the menu that appears.
Select
Send VOIP voice calls and click OK to confirm.
Once the VOIP plugin has been added to the list, you can start configuring
it:
Select
and right-click the plugin, then select the Edit Plugin option
from the menu that appears.
Configure
the popup that displays based on the VOIP provider.
Click
the OK button to confirm.
This plugin supports calls with:
Direct
IP: the recipient is a VoIP client that can be reached directly
by specifying its IP. In this case, no account with VoIP service
providers is needed.
Provider:
you use the services of a provider which can connect the plugin
with the pstn and cellular telephone network. In this case, an
SIP account must be opened with a VoIP service provider and access
to the server must be obtained. Server access settings are part
of the plugin configuration.
After moving to the Notifications tab, we can configure a message
to be sent:
Click
on Notifications and then right-click on the workspace. Choose
the Add Notification option from the context menu.
Configure
the notification by changing the properties appropriately. For
example:
Notification
Type: Local
Plug
In Name: Voice over IP message sender
Name:
Notification
Recipient:
User1
Text
Message: VOIP - New Alarm from boolTest
Notification
Tag/Area: boolTest
Alarm
Type: Trip Alarm
Activation
Condition: Uguale
Activation
Value: 1
Severity:
100
Send
When ON
Save the project by clicking on the Save All icon found in the Movicon.NExT
editor toolbar.
Runtime Test
Click the Start Runtime icon to test to see if everything works
in runtime.
Once the application is started and the screen appears, clicking on
the switch allows you to change the value of the boolTest tag from
0 to 1.
In this condition, the alarm associated with the tag is activated and
the Alarm Dispatcher sends a VOIP communication alerting the user
of the active alarm.