Difference between revisions of "Alarms Manager"

From HSYCO
Jump to navigation Jump to search
(Created page with "border|600px == Configuration == === Areas === border|600px File:plugin_alarms_manag...")
 
 
(59 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:plugin_alarms_manager_menu.png|border|600px]]
+
This plugin provides an application for monitoring and configuring alarms reporting for installations comprising heterogeneous devices such as sensors, input/output devices, network devices and IP cameras, managed by several users possibly divided into groups. The application generates alarm logs and notifies users via e-mail and/or SMS text messages.
 +
 
 +
This app works with any I/O Server providing datapoints representing input/output devices or sensors and can be used in combination with the [[GSM | GSM I/O Server]] to send SMS notifications and receive commands and group messages, and with the [[SMTPSERVER | SMTPSERVER I/O Server]] to receive group messages via e-mail.<br/>
 +
Before using the app, configure all the I/O Servers and cameras needed and make sure they all communicate correctly with HSYCO.
 +
 
 +
To view the Alarms Manager interface go to the URL of the "alarms2" project on your server; for instance <nowiki>https://192.168.0.50/hsycoserver/alarms2</nowiki>.<br/>
 +
There are two additional interfaces for mobile devices, "alarms2small" and "alarms2small2", which offer the same functionalities except for the configuration section.
 +
 
 +
 
 +
From the main page you can access the different sections:
 +
 
 +
[[File:plugin_alarms_manager_menu.png|border|500px]]
 +
[[File:plugin_alarms_manager_small_menu.png|border|234px]]
  
 
== Configuration ==
 
== Configuration ==
 +
To access the configuration page click on the icon on the bottom-right corner of the main page.
 +
 +
This section is only available for HSYCO users holding admin rights.
 +
 +
All the devices defined in the configuration and set as "enabled" will be listed in the corresponding sections of the application with a specific ''view interface''.
 +
 +
At the bottom of the configuration page you find a link to the [[Wiring Editor]] which gets automatically populated with the I/O devices defined in this application.
 +
 +
Following is the rest of the configuration sections:
  
 
=== Areas ===
 
=== Areas ===
[[File:plugin_alarms_manager_config_area.png|border|600px]]
+
Areas represent separate locations of the installation. Each area comprises different devices and users.
[[File:plugin_alarms_manager_config_area_edit.png|border|600px]]
+
 
 +
[[File:plugin_alarms_manager_config_area.png|border|500px]]
 +
[[File:plugin_alarms_manager_config_area_edit.png|border|500px]]
 +
 
 +
It is possible to create a hierarchical area structure by assigning parent areas to other areas. It is possible to create as many level as needed.
 +
 
 +
If more than one area is defined then, from the main page, it will be possible to select an area to filter the item listed in the various sections of the application.
  
 
=== I/O Devices ===
 
=== I/O Devices ===
[[File:plugin_alarms_manager_config_io.png|border|600px]]
+
[[File:plugin_alarms_manager_config_io.png|border|500px]]
[[File:plugin_alarms_manager_config_io_edit.png|border|600px]]
+
[[File:plugin_alarms_manager_config_io_edit.png|border|500px]]
 +
 
 +
I/O Devices represent datapoints having a discrete set of possible values. The usual case is datapoints having a 1/0 value (corresponding to the ON/OFF states).
 +
 
 +
It is possible to define custom values by selecting the '''custom''' option in the '''value''' settings of a datapoint and listing its possible values separated by a comma (e.g. "1,2,3").
 +
It is also possible to assign a user friendly label to each value appending it to the corresponding value after a ':' character (e.g. "1:OK,2:WARN,3:ERROR").
 +
 
 +
If the datapoint corresponds to a writable output and you want to allow users to change its value from the view interface select the '''Writable''' option
  
 
=== Sensors ===
 
=== Sensors ===
[[File:plugin_alarms_manager_config_sens.png|border|600px]]
+
[[File:plugin_alarms_manager_config_sens.png|border|500px]]
[[File:plugin_alarms_manager_config_sens_edit.png|border|600px]]
+
[[File:plugin_alarms_manager_config_sens_edit.png|border|500px]]
 +
 
 +
As sensors you can add datapoints having "analog" values such as temperature, pressure and so on.
 +
 
 +
Configuration parameters:
 +
* '''Unit''': unit symbol used in the view interface for this sensor
 +
* '''Min'''/'''Max''': valid range for the sensor values. Values outside the specified range will be ignored by the application.
 +
* '''Apply transformation''': to be used in case a transformation is needed to calculate the actual measured value from the value of the specified datapoint. For instance, it can be used for temperature probes outputting a 4-20 mA value. The read value will be multiplied by the specified '''m''' value and then added to the '''t''' value.
 +
* '''Create data logger''': whether to create a [[Data Loggers | data logger]] gathering data from this sensor. It will be visible in the sensor's view interface. It is possible to specify the persistence time of the saved data.
  
 
=== Pings ===
 
=== Pings ===
[[File:plugin_alarms_manager_config_ping.png|border|600px]]
+
[[File:plugin_alarms_manager_config_ping.png|border|500px]]
[[File:plugin_alarms_manager_config_ping_edit.png|border|600px]]
+
[[File:plugin_alarms_manager_config_ping_edit.png|border|500px]]
 +
 
 +
Here you can add network devices to monitor their connectivity (by means of "ping" requests sent from HSYCO). Specify their IP address or host name and set the device name.
 +
 
 +
It is possible to specify the '''interval''' at which ping requests are sent and the number of failures after which the device is considered unresponsive and thus an '''alarm''' is triggered.
  
 
=== Cameras ===
 
=== Cameras ===
[[File:plugin_alarms_manager_config_cam.png|border|600px]]
+
[[File:plugin_alarms_manager_config_cam.png|border|500px]]
[[File:plugin_alarms_manager_config_cam_edit.png|border|600px]]
+
[[File:plugin_alarms_manager_config_cam_edit.png|border|500px]]
 +
 
 +
The cameras listed here are the ones defined in HSYCO's configuration. You cannot add or configure a camera from here.
 +
 
 +
As for the other sections, here you can enable/disable cameras to make them available or not in the view interface and assign them a descriptive name and the associated area.
  
 
=== General ===
 
=== General ===
[[File:plugin_alarms_manager_config_general.png|border|600px]]
+
[[File:plugin_alarms_manager_config_general.png|border|500px]]
 +
 
 +
* '''Delete log files after X days''': specifies the persistence time of the [[#Log | log]] files created by the application
 +
* '''E-Mail sender''': the e-amail address to be used to send alarm notifications to users
 +
* '''Max recording time on manual command''': The [[#Cameras | cameras view interface]] gives the possibility to manually record images from the selected camera. This option specifies when to automatically stop the recording if not manually stopped.
 +
 
 +
== Groups ==
 +
[[File:plugin_alarms_manager_groups.png|border|500px]]
 +
 
 +
A group represents a set of users monitoring the same set of devices.
 +
 
 +
Create/delete groups using the '''+'''/'''-''' buttons at the bottom of the list and enter a name.
 +
 
 +
For each group you can select the days it is active and, for each day, up to 2 time intervals in which it is active. When a group is active, the users belonging to the group will receive alarm notifications targeted for such group.
 +
 
 +
Groups currently active display a "&#149;" symbol next to their names.
 +
 
 +
The '''Receives system alarms''' option specifies whether this group should receive system alarms triggered by the [[System | System I/O Server]] (which should be added in HSYCO's configuration) such as low storage available, no internet connectivity, disconnected I/O Servers and unreachable cameras.
  
 
== Users ==
 
== Users ==
[[File:plugin_alarms_manager_users.png|border|600px]]
+
[[File:plugin_alarms_manager_users.png|border|500px]]
  
== Groups ==
+
Create/delete users using the '''+'''/'''-''' buttons at the bottom of the list and enter a name.
[[File:plugin_alarms_manager_groups.png|border|600px]]
+
 
 +
*'''E-Mail''': if specified, alarms notifications for the user will be sent to the specified address
 +
*'''Enabled''': whether or not this user is enabled, i.e. receives notifications.
 +
*'''Tel.''': if HSYCO is provided with a [[GSM | GSM I/O Server]] you can specify the phone number of the user that will be used to send SMS text notifications to. The user can send SMS messages to the GSM modem with body "on" or "off" to respectively enable or disable himself. Use the same number format described in the GSM I/O Server documentation
 +
*'''Call after notification''': select if a call should be placed to the user after sending a notification. The call will be closed when rejected, answered or after a timeout.
 +
*'''Can send group messages''': select if the specified number is allowed to send [[#Group messages | Group messages]]
 +
*'''Group(s)''': select the group(s) the user belongs to
  
 
== I/O Devices ==
 
== I/O Devices ==
[[File:plugin_alarms_manager_io_in.png|border|600px]]
+
[[File:plugin_alarms_manager_io_in.png|border|500px]]
[[File:plugin_alarms_manager_io_out.png|border|600px]]
+
[[File:plugin_alarms_manager_io_out.png|border|500px]]
[[File:plugin_alarms_manager_io_alarm.png|border|600px]]
+
 
 +
This section lists the configured I/O Devices. 
 +
By selecting an entry you can view its current state and, if configured as writable, set its value.
 +
 
 +
For each device you can specify alarm conditions that will trigger notifications to the target groups. To add a condition click on the '''+''' icon:
 +
 
 +
[[File:plugin_alarms_manager_io_alarm.png|border|500px]]
 +
 
 +
The specified message (and subject for e-mails) will be sent via e-mail/SMS to the users belonging to the target group (if active) when the specified condition evaluates to true.<br/>
 +
You can have the app automatically add the name of the area the device belongs to and the time when the condition triggered.<br/>
 +
To avoid repeated notifications you can specify a time interval after an alarm condition is exited in which new notifications will be suppressed.
 +
 
 +
Devices for which alarm conditions have been defined show a "&#149;" symbol next to their names in the list. If one of the conditions is active, both the condition and the device name turn red.
  
 
== Sensors ==
 
== Sensors ==
[[File:plugin_alarms_manager_sensor.png|border|600px]]
+
[[File:plugin_alarms_manager_sensor.png|border|500px]]
[[File:plugin_alarms_manager_sensor_dl.png|border|600px]]
+
[[File:plugin_alarms_manager_sensor_dl.png|border|500px]]
[[File:plugin_alarms_manager_sensor_alarm.png|border|600px]]
+
 
 +
This section lists the configured sensors. By selecting an entry you can view its current state and, if configured, its data logger chart.
 +
 
 +
As for I/O devices you can add alarm conditions:
 +
 
 +
[[File:plugin_alarms_manager_sensor_alarm.png|border|500px]]
  
 
== Cameras ==
 
== Cameras ==
[[File:plugin_alarms_manager_cam.png|border|600px]]
+
[[File:plugin_alarms_manager_cam.png|border|500px]]
[[File:plugin_alarms_manager_cam_alarm.png|border|600px]]
+
 
 +
This page lists all the configured cameras. Click on a list entry to view the video stream of the camera and manually record frames.
 +
 
 +
For each camera you can create recording conditions associated to an I/O device switching to a specific value:
 +
 
 +
[[File:plugin_alarms_manager_cam_alarm.png|border|500px]]
  
 
== Ping ==
 
== Ping ==
[[File:plugin_alarms_manager_ping.png|border|600px]]
+
[[File:plugin_alarms_manager_ping.png|border|500px]]
 +
 
 +
Here you can see all the monitored network devices and specify the target group(s) to send notifications to in case of loss of connectivity.
  
 
== Log ==
 
== Log ==
[[File:plugin_alarms_manager_log.png|border|600px]]
+
[[File:plugin_alarms_manager_log.png|border|500px]]
 +
 
 +
This page lists all the recorded alarm events.
 +
You can select log entries and send them via e-mail in CSV format (clicking on the envelop icon) or delete them (clicking on the '''-''' icon).
 +
 
 +
Log entries are also stored in CSV files contained in the directory "alarms_manager_data/logs" in the HSYCO root on the server.
 +
 
 +
== Group messages ==
 +
Enabled users can send group messages via SMS (GSM I/O Server required) or e-mail (SMTPSERVER I/O Server required) to other users.
 +
 
 +
To send a group message via SMS, send a text to the connected GSM modem; to send it via e-mail, send it to SMTP server addressing it to an e-mail address with the same username as the address from which notifications are sent. For instance, if notifications are sent from "alarms@hsyco.com", you can send the e-mail to any address like "alarms@<any_domain_name>".
 +
 
 +
The message sent must have the following format:
 +
 
 +
<pre>
 +
<area>:<group1>,<group2>,...,<groupN>#<message>
 +
</pre>
 +
 
 +
You can omit the area and/or the groups to send the message to all users without filtering by area/group.
 +
 
 +
Moreover, in case the message is sent from other devices which automatically add custom text, it is possible to add the delimiters "<code>=>=</code>" and "<code>=<=</code>" to respectively mark the beginning and the end of the portion of text that has to be processed. You can use both delimiters or just one of them.
 +
 
 +
For e-mails, the message can be sent both in the subject or in the body of the e-mail.
 +
 
 +
== Events  ==
 +
The application generates USER events that can be used to add custom logic to alarm events.
 +
 
 +
For each datapoint with alarm conditions defined, the following USER events are triggered:
 +
 
 +
<pre>
 +
alarm.<datapoint_id> = 1      // when at least an alarm condition on the datapoint is true
 +
alarm.<datapoint_id> = 0      // when all alarm conditions on the datapoint are false
 +
</pre>
 +
 
 +
== File Messages Extension ==
 +
 
 +
The File Messages Extension is an optional plugin that works in combination with the Alarms Manager plugin to provide file-based messages and an alternative alert routing logic for SMS alerts.
 +
 
 +
=== File Messages ===
 +
 
 +
Writing text files in a sub-directory named "alarms_manager_messages" will generate alerts to the appropriate SMS destination numbers, based on the current schedule defined in the Alarms Manager, or the alternative routing logic.
 +
 
 +
The messages sub-directory is also accessible, just like the main HSYCO directory, from remote systems as a shared HSYCO network disk server.
 +
 
 +
The plugin constantly scans the alarms_manager_messages for text files (files starting with ".", and the special-purpose "schedule.txt" file are ignored) having the following format:
 +
 
 +
<pre>
 +
<line1>
 +
...
 +
<lineN>
 +
=end=
 +
</pre>
 +
 
 +
Note that files are ignored if the last line is different from the terminator text "=end=". This is intended to prevent the plugin from processing files that are not yet fully written by an external applicaton.
 +
 
 +
You can have multiple message lines in each file.
 +
 
 +
Each line can have a text message with no additional information, or a destination prefix with area and group(s) IDs:
 +
 
 +
<pre>
 +
<message>
 +
#<message>
 +
<group>#<message>
 +
<group1>,<group2>,...<groupN>#<message>
 +
<area>:<group1>,<group2>,...,<groupN>#<message>
 +
</pre>
 +
 
 +
The "#" character is the area/group prefix separator. If you want to have "#" characters in the message, always prepend the message with the "#", even if you don't need to set a group.
 +
 
 +
If the area or group are not set, the message is sent to all users associated with any group in the Alarms Manager plugin.
 +
 
 +
{{note|Text files are automatically deleted after processing.}}
 +
 
 +
==== message.txt example ====
 +
 
 +
<pre>
 +
This is an alert message to all users.
 +
#This is an alert message to all users, with one or more ## characters in the text.
 +
main_area: day, night#This is an alert message to users of groups day and night in area main_area
 +
</pre>
 +
 
 +
=== Alternative Alert Routing Logic ===
 +
 
 +
An alternative alert routing logic, overriding the current weekly schedule defined in the Alarms Manager, is based on a simple date-time interval match text file format, with associated list of recipients, defined with the "schedule.txt" file, located in the alarms_manager_messages directory:
 +
 
 +
<pre>
 +
<date-time-from>,<date-time-to>,<timeout>,<user1>,...,<userN>
 +
*,*,*,<user1>,...,<userN>
 +
</pre>
 +
 
 +
The <user> fields in the file are the GSM numbers of Alarms Manager's active users. Numbers that are not associated with any user are ignored.
 +
 
 +
The date-time match is positive if the current time is: date-time-from <= current time < date-time-to. The date-time format can be any of the following, where the optional separator character can be a valid character, like "-", ".", " " or ":":
 +
 
 +
<pre>
 +
YYYYMMDDHHMM
 +
YYYYMMDD-HHMM
 +
YYYYMMDD-HH-MM
 +
YYYY-MM-DD-HHMM
 +
YYYY-MM-DD-HH-MM
 +
</pre>
 +
 
 +
When an alert message file is processed, each message will be sent to the users in the list matching the defined time interval. The plugin sends the message to the first user in the list, and an SMS reply to acknowledge alert’s reception is required within <timeout> seconds. If no acknowledge is received, the alert is sent to the next user in the list. Alerts that are not acknowledged by any user, or if all the user in the list are temporarily disabled, are sent (in parallel, no acknowledge required) to a jolly list.
 +
 
 +
The jolly list is a special list, defined in schedule.txt, as *,*,*,<user1>,...,<userN>.
 +
 
 +
An acknowledge is any text message -- except the "on" and "off" special messages, that are used to self-enable or disable a user.
 +
 
 +
 
 +
==== schedule.txt example ====
 +
 
 +
<pre>
 +
20160101-00:00, 20160201-00:00, 30, 3331021340, 3285043097
 +
201510061200, 20151007-12:00, 30, 29652932, 29652932, 29652931
 +
2015-10-07-12:00, 20160101-12:00, 30, 29652937, 29652938, 29652939
 +
*, *, *, 3489259249, 3306046740, 3109893094
 +
</pre>

Latest revision as of 16:50, 4 February 2016

This plugin provides an application for monitoring and configuring alarms reporting for installations comprising heterogeneous devices such as sensors, input/output devices, network devices and IP cameras, managed by several users possibly divided into groups. The application generates alarm logs and notifies users via e-mail and/or SMS text messages.

This app works with any I/O Server providing datapoints representing input/output devices or sensors and can be used in combination with the GSM I/O Server to send SMS notifications and receive commands and group messages, and with the SMTPSERVER I/O Server to receive group messages via e-mail.
Before using the app, configure all the I/O Servers and cameras needed and make sure they all communicate correctly with HSYCO.

To view the Alarms Manager interface go to the URL of the "alarms2" project on your server; for instance https://192.168.0.50/hsycoserver/alarms2.
There are two additional interfaces for mobile devices, "alarms2small" and "alarms2small2", which offer the same functionalities except for the configuration section.


From the main page you can access the different sections:

Plugin alarms manager menu.png Plugin alarms manager small menu.png

Configuration

To access the configuration page click on the icon on the bottom-right corner of the main page.

This section is only available for HSYCO users holding admin rights.

All the devices defined in the configuration and set as "enabled" will be listed in the corresponding sections of the application with a specific view interface.

At the bottom of the configuration page you find a link to the Wiring Editor which gets automatically populated with the I/O devices defined in this application.

Following is the rest of the configuration sections:

Areas

Areas represent separate locations of the installation. Each area comprises different devices and users.

Plugin alarms manager config area.png Plugin alarms manager config area edit.png

It is possible to create a hierarchical area structure by assigning parent areas to other areas. It is possible to create as many level as needed.

If more than one area is defined then, from the main page, it will be possible to select an area to filter the item listed in the various sections of the application.

I/O Devices

Plugin alarms manager config io.png Plugin alarms manager config io edit.png

I/O Devices represent datapoints having a discrete set of possible values. The usual case is datapoints having a 1/0 value (corresponding to the ON/OFF states).

It is possible to define custom values by selecting the custom option in the value settings of a datapoint and listing its possible values separated by a comma (e.g. "1,2,3"). It is also possible to assign a user friendly label to each value appending it to the corresponding value after a ':' character (e.g. "1:OK,2:WARN,3:ERROR").

If the datapoint corresponds to a writable output and you want to allow users to change its value from the view interface select the Writable option

Sensors

Plugin alarms manager config sens.png Plugin alarms manager config sens edit.png

As sensors you can add datapoints having "analog" values such as temperature, pressure and so on.

Configuration parameters:

  • Unit: unit symbol used in the view interface for this sensor
  • Min/Max: valid range for the sensor values. Values outside the specified range will be ignored by the application.
  • Apply transformation: to be used in case a transformation is needed to calculate the actual measured value from the value of the specified datapoint. For instance, it can be used for temperature probes outputting a 4-20 mA value. The read value will be multiplied by the specified m value and then added to the t value.
  • Create data logger: whether to create a data logger gathering data from this sensor. It will be visible in the sensor's view interface. It is possible to specify the persistence time of the saved data.

Pings

Plugin alarms manager config ping.png Plugin alarms manager config ping edit.png

Here you can add network devices to monitor their connectivity (by means of "ping" requests sent from HSYCO). Specify their IP address or host name and set the device name.

It is possible to specify the interval at which ping requests are sent and the number of failures after which the device is considered unresponsive and thus an alarm is triggered.

Cameras

Plugin alarms manager config cam.png Plugin alarms manager config cam edit.png

The cameras listed here are the ones defined in HSYCO's configuration. You cannot add or configure a camera from here.

As for the other sections, here you can enable/disable cameras to make them available or not in the view interface and assign them a descriptive name and the associated area.

General

Plugin alarms manager config general.png

  • Delete log files after X days: specifies the persistence time of the log files created by the application
  • E-Mail sender: the e-amail address to be used to send alarm notifications to users
  • Max recording time on manual command: The cameras view interface gives the possibility to manually record images from the selected camera. This option specifies when to automatically stop the recording if not manually stopped.

Groups

Plugin alarms manager groups.png

A group represents a set of users monitoring the same set of devices.

Create/delete groups using the +/- buttons at the bottom of the list and enter a name.

For each group you can select the days it is active and, for each day, up to 2 time intervals in which it is active. When a group is active, the users belonging to the group will receive alarm notifications targeted for such group.

Groups currently active display a "&#149;" symbol next to their names.

The Receives system alarms option specifies whether this group should receive system alarms triggered by the System I/O Server (which should be added in HSYCO's configuration) such as low storage available, no internet connectivity, disconnected I/O Servers and unreachable cameras.

Users

Plugin alarms manager users.png

Create/delete users using the +/- buttons at the bottom of the list and enter a name.

  • E-Mail: if specified, alarms notifications for the user will be sent to the specified address
  • Enabled: whether or not this user is enabled, i.e. receives notifications.
  • Tel.: if HSYCO is provided with a GSM I/O Server you can specify the phone number of the user that will be used to send SMS text notifications to. The user can send SMS messages to the GSM modem with body "on" or "off" to respectively enable or disable himself. Use the same number format described in the GSM I/O Server documentation
  • Call after notification: select if a call should be placed to the user after sending a notification. The call will be closed when rejected, answered or after a timeout.
  • Can send group messages: select if the specified number is allowed to send Group messages
  • Group(s): select the group(s) the user belongs to

I/O Devices

Plugin alarms manager io in.png Plugin alarms manager io out.png

This section lists the configured I/O Devices. By selecting an entry you can view its current state and, if configured as writable, set its value.

For each device you can specify alarm conditions that will trigger notifications to the target groups. To add a condition click on the + icon:

Plugin alarms manager io alarm.png

The specified message (and subject for e-mails) will be sent via e-mail/SMS to the users belonging to the target group (if active) when the specified condition evaluates to true.
You can have the app automatically add the name of the area the device belongs to and the time when the condition triggered.
To avoid repeated notifications you can specify a time interval after an alarm condition is exited in which new notifications will be suppressed.

Devices for which alarm conditions have been defined show a "&#149;" symbol next to their names in the list. If one of the conditions is active, both the condition and the device name turn red.

Sensors

Plugin alarms manager sensor.png Plugin alarms manager sensor dl.png

This section lists the configured sensors. By selecting an entry you can view its current state and, if configured, its data logger chart.

As for I/O devices you can add alarm conditions:

Plugin alarms manager sensor alarm.png

Cameras

Plugin alarms manager cam.png

This page lists all the configured cameras. Click on a list entry to view the video stream of the camera and manually record frames.

For each camera you can create recording conditions associated to an I/O device switching to a specific value:

Plugin alarms manager cam alarm.png

Ping

Plugin alarms manager ping.png

Here you can see all the monitored network devices and specify the target group(s) to send notifications to in case of loss of connectivity.

Log

Plugin alarms manager log.png

This page lists all the recorded alarm events. You can select log entries and send them via e-mail in CSV format (clicking on the envelop icon) or delete them (clicking on the - icon).

Log entries are also stored in CSV files contained in the directory "alarms_manager_data/logs" in the HSYCO root on the server.

Group messages

Enabled users can send group messages via SMS (GSM I/O Server required) or e-mail (SMTPSERVER I/O Server required) to other users.

To send a group message via SMS, send a text to the connected GSM modem; to send it via e-mail, send it to SMTP server addressing it to an e-mail address with the same username as the address from which notifications are sent. For instance, if notifications are sent from "alarms@hsyco.com", you can send the e-mail to any address like "alarms@<any_domain_name>".

The message sent must have the following format:

<area>:<group1>,<group2>,...,<groupN>#<message>

You can omit the area and/or the groups to send the message to all users without filtering by area/group.

Moreover, in case the message is sent from other devices which automatically add custom text, it is possible to add the delimiters "=>=" and "=<=" to respectively mark the beginning and the end of the portion of text that has to be processed. You can use both delimiters or just one of them.

For e-mails, the message can be sent both in the subject or in the body of the e-mail.

Events

The application generates USER events that can be used to add custom logic to alarm events.

For each datapoint with alarm conditions defined, the following USER events are triggered:

alarm.<datapoint_id> = 1       // when at least an alarm condition on the datapoint is true
alarm.<datapoint_id> = 0       // when all alarm conditions on the datapoint are false

File Messages Extension

The File Messages Extension is an optional plugin that works in combination with the Alarms Manager plugin to provide file-based messages and an alternative alert routing logic for SMS alerts.

File Messages

Writing text files in a sub-directory named "alarms_manager_messages" will generate alerts to the appropriate SMS destination numbers, based on the current schedule defined in the Alarms Manager, or the alternative routing logic.

The messages sub-directory is also accessible, just like the main HSYCO directory, from remote systems as a shared HSYCO network disk server.

The plugin constantly scans the alarms_manager_messages for text files (files starting with ".", and the special-purpose "schedule.txt" file are ignored) having the following format:

<line1>
...
<lineN>
=end=

Note that files are ignored if the last line is different from the terminator text "=end=". This is intended to prevent the plugin from processing files that are not yet fully written by an external applicaton.

You can have multiple message lines in each file.

Each line can have a text message with no additional information, or a destination prefix with area and group(s) IDs:

<message>
#<message>
<group>#<message>
<group1>,<group2>,...<groupN>#<message>
<area>:<group1>,<group2>,...,<groupN>#<message>

The "#" character is the area/group prefix separator. If you want to have "#" characters in the message, always prepend the message with the "#", even if you don't need to set a group.

If the area or group are not set, the message is sent to all users associated with any group in the Alarms Manager plugin.

Text files are automatically deleted after processing.


message.txt example

This is an alert message to all users.
#This is an alert message to all users, with one or more ## characters in the text.
main_area: day, night#This is an alert message to users of groups day and night in area main_area

Alternative Alert Routing Logic

An alternative alert routing logic, overriding the current weekly schedule defined in the Alarms Manager, is based on a simple date-time interval match text file format, with associated list of recipients, defined with the "schedule.txt" file, located in the alarms_manager_messages directory:

<date-time-from>,<date-time-to>,<timeout>,<user1>,...,<userN>
*,*,*,<user1>,...,<userN>

The <user> fields in the file are the GSM numbers of Alarms Manager's active users. Numbers that are not associated with any user are ignored.

The date-time match is positive if the current time is: date-time-from <= current time < date-time-to. The date-time format can be any of the following, where the optional separator character can be a valid character, like "-", ".", " " or ":":

YYYYMMDDHHMM
YYYYMMDD-HHMM
YYYYMMDD-HH-MM
YYYY-MM-DD-HHMM
YYYY-MM-DD-HH-MM

When an alert message file is processed, each message will be sent to the users in the list matching the defined time interval. The plugin sends the message to the first user in the list, and an SMS reply to acknowledge alert’s reception is required within <timeout> seconds. If no acknowledge is received, the alert is sent to the next user in the list. Alerts that are not acknowledged by any user, or if all the user in the list are temporarily disabled, are sent (in parallel, no acknowledge required) to a jolly list.

The jolly list is a special list, defined in schedule.txt, as *,*,*,<user1>,...,<userN>.

An acknowledge is any text message -- except the "on" and "off" special messages, that are used to self-enable or disable a user.


schedule.txt example

20160101-00:00, 20160201-00:00, 30, 3331021340, 3285043097
201510061200, 20151007-12:00, 30, 29652932, 29652932, 29652931
2015-10-07-12:00, 20160101-12:00, 30, 29652937, 29652938, 29652939
*, *, *, 3489259249, 3306046740, 3109893094