Annunciators/Recivers¶
PyAlarm device can invoke several actions on alarm state change:
Send an email:
user.name@domaing.us
,Send an SMS:
SMS:+44010101010
,Call a tango command:
ACTION(alarm:command, tan/go/device/command, argumets)
,Set a value of a tango attribut:
ACTION(acknowlegde:attribute,tan/go/device/attribute, value)
,Call an operating system call (command):
ACTION(reset:system, '/usr/local/beep')
,
The list of anouncianttions for an alarm is defined as a semicolon(;) divided list set in AlarmReceivers property. The property format is:
ALARM_NAME_1:LIST;OF;RECEIVERS_1
ALARM_NAME_2:LIST;OF;RECEIVERS_2
Actions¶
Actions (ACTION(...)
) can be used to annunciate the alarm or to invoke some operations.
Actions can be invoked for the following events:
ALARM - an alarm is triggered,
ACKNOWLEDGED - an operator acknowledged the alarm,
RECOVERED - the alarm condition become not active (formula evaluation become False),
REMINDER - not acknowledged alarm reminder is being sent,
AUTORESET - the alarm change automaticaly to Normal state (not active),
RESET - an operator reset the alarm
DISABLED - an operator disabled the alarm
For an arguments for command or variable set actions one can use the following variables:
$ALARM/$TAG/$NAME : Alarm name
$DEVICE : PyAlarm name
$DESCRIPTION : Description text
$VALUES : last values evaluated for that alarm
$SNAP : last values stored for that alarm
$REPORT : full report sent when the alarm was raised
$DATE/$DATETIME : current time as YYYYMMDD_hhmm
$MESSAGE : type of alarm event (RESET,ALARM,REMINDER,…)
$JSON : all the previous fields in a JSON dictionary
These will be substituted with the value upon action invoking.
For operating system calls, list of commands to excute is limited to what is specified in the AllowedActions property.
Actions can be used to integrate external systems like a TextTalker or Teams.
PhoneBook¶
The Phonebook is defined as multientries Phonebook free property in PANIC section of free properties.
Each line defines one named resceivers list: %RECIVER_NAME: LIST;OF;RECEIVERS
, for example:
%PIOTR GORYL:piotr.goryl@s2innovation.com;SMS:0048795794004
Then, a %RECIVER_NAME can be used as a key in AlarmReceivers property.
Global Recivers¶
It is possible to define a default list of receivers/actions for a set of alarms. The set of alarms is defined by a regular expression. The global receivers list is defined in a PyAlarm class property:
GlobalReceivers: Receivers to be applied globally to all alarms.
Declared as: FILTER:receiver,ACTION(MESSAGE:...)
, for example:
*VC*:vacuum@cells.es,ACTION(RESET:command,t/t/t/stop)