Development status:
Released,
Release: latest
Information status: Updated
Repository:
http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/SoftwareSystem/PyAlarm
Contact:
Class Description
- This device server is used as a alarm logger, it connects to the list of attributes provided and verifies its values.
- Its focused on notifying Alarms by log files, Mail, SMS and (some day in the future) electronic logbook. It allows to setup alarms based on attribute values, connection status and boolean combinations of them. Independent configuration and mailing lists available for each alarm. You can acknowledge these alarms by a proper command. This device requires Fandango module to be available in the PYTHONPATH.
Families: SoftwareSystem
Key words:
Language: Python
Contact:
Class interface
Attributes:
Name | Description |
---|---|
VersionNumberScalar: DevString | — |
LastAlarmScalar: DevString | — |
AlarmConfigurationSpectrum: DevString | — |
ActiveAlarmsSpectrum: DevString | — |
PastAlarmsSpectrum: DevString | — |
AlarmListSpectrum: DevString | — |
AlarmReceiversSpectrum: DevString | — |
PhoneBookSpectrum: DevString | — |
SentEmailsImage: DevString | — |
SentSMSImage: DevString | — |
AcknowledgedAlarmsSpectrum: DevString | — |
DisabledAlarmsSpectrum: DevString | — |
FailedAlarmsSpectrum: DevString | — |
Commands:
Name | Description |
---|---|
StateInput: DevVoid Output: State |
This command gets the device state (stored in its device_state data member) and returns it to the caller. |
StatusInput: DevVoid Output: DevString |
This command gets the device status (stored in its device_status data member) and returns it to the caller. |
AddReceiverInput: DevVarStringArray Output: DevVarStringArray |
Returns the actual value of AlarmReceivers |
EvaluateFormulaInput: DevString Output: DevString |
Evaluate an Alarm formula |
ResetAlarmInput: DevVarStringArray Output: DevVarStringArray |
Reset alarm, it will be removed from active alarms |
AcknowledgeInput: DevVarStringArray Output: DevVarStringArray |
Acknowledge alarm no more reminders will be sent |
RenounceInput: DevString Output: DevString |
Renounce (opposite to acknowledge) all emails will be send again |
EnableInput: DevString Output: DevString |
Enable alarm that was put to disable state |
DisableInput: DevVarStringArray Output: DevString |
Disable enabled alarm. |
ResetAllInput: DevVarStringArray Output: DevString |
Acknowledge alarm that was put into the file with alarms, it will be removed from active alarms |
GetReleaseInput: DevVoid Output: DevString |
— |
GenerateReportInput: DevVarStringArray Output: DevVarStringArray |
Generates report message |
CreateAlarmContextInput: DevVarStringArray Output: DevLong |
Creates an Snap context for this Alarm |
SendMailInput: DevVarStringArray Output: DevString |
Sends a mail message |
SaveHtmlInput: DevVarStringArray Output: DevString |
Saves a html report |
SendSMSInput: DevVarStringArray Output: DevString |
Sends an SMS message |
CheckAcknowledgedInput: DevString Output: DevBoolean |
Check if the alarm is on AcknowledgedAlarms list. |
CheckDisabledInput: DevString Output: DevBoolean |
Check if the alarm is on DisabledAlarms list. |
Pipes:
Properties:
Name | Description |
---|---|
PhoneBookString[]Type | List of alarms declared like:. User:user@accelerator.es;SMS:+34666555666 |
SMSConfigDevString | Arguments for sendSMS command |
FromAddressDevString | Address that will appear as Sender in mail and SMS |
AllowedActionsString[]Type | List of OS commands that alarms are able to execute. |
StartupDelayDevLong | Number of seconds that PyAlarm will wait before starting to evaluate alarms. |
AlarmListString[]Type | List of alarms to be monitorized. The format is: domain/family/member #It simply checks that dev is alive domain/family/member/attribute> VALUE domain/family/member/State == UNKNOWN domain/family/ * /Temperature> VALUE When using wildcards all slash / must be included |
AlarmReceiversString[]Type | Users that will be notified for each alarm. The format is: [TYPE]:[ADDRESS]:[attributes];... [TYPE]: MAIL / SMS [ADDRESS] : operator@accelerator.es / +34666555444 [attributes]: domain/family/member/attribute;domain/family/ * |
AlarmDescriptionsString[]Type | Description to be included in emails for each alarm. The format is: TAG:AlarmDescription... |
AlarmConfigurationsString[]Type | Configuration customization appliable to each alarm. The format is: TAG:PAR1=Value1;PAR2=Value2;... |
AlarmSeveritiesString[]Type | ALARM:DEBUG/INFO/WARNING/ERROR #DEBUG alarms will not trigger messages |
LogFileDevString | File where alarms are logged, like /tmp/alarm_$NAME.log |
LogLevelDevString | stdout log filter |
HtmlFolderDevString | File where alarm reports are saved |
AlarmThresholdDevLong | Min number of consecutive Events/Pollings that must trigger an Alarm. |
EnabledDevString | If False forces the device to Disabled state and avoids messaging; if INT then it will last only for N seconds after Startup; if a python formula is written it will be used to enable/disable the device |
AlertOnRecoveryDevString | It can contain `email` and/or `sms` keywords to specify if an automatic message must be sent in case of alarm returning to safe level. |
FlagFileDevString | File where a 1 or 0 value will be written depending if theres active alarms or not. This file can be used by other notification systems. |
PollingPeriodDevFloat | Periode in SECONDS in which all attributes not event-driven will be polled; @TODO for convenience any value above 300 will be divided by 1000, it must be DEPRECATED in the future. |
MaxMessagesPerAlarmDevLong | Max Number of messages to be sent each time that an Alarm is activated/recovered/reset. |
FromAddressDevString | Address that will appear as Sender in mail and SMS |
SMSConfigDevString | Arguments for sendSMS command |
UseSnapDevBoolean | If false no snapshots will be trigered (unless specifically added to receivers) |
CreateNewContextsDevBoolean | It enables PyAlarm to create new contexts for alarms if no matching context exists in the database. |
ReminderDevLong | If a number of seconds is set, a reminder mail will be sent while the alarm is still active, if 0 no Reminder will be sent. |
AutoResetDevFloat | If a number of seconds is set, the alarm will reset if the conditions are no longer active after the given interval. |
StartupDelayDevLong | Number of seconds that PyAlarm will wait before starting to evaluate alarms. |
EvalTimeoutDevLong | Timeout for read_attribute calls, in milliseconds . |
UseProcessDevBoolean | To create new OS processes instead of threads. |
UseTaurusDevBoolean | Use Taurus to connect to devices instead of plain PyTango. |
RethrowStateDevBoolean | Whether exceptions in State reading will activate the Alarm. |
RethrowAttributeDevBoolean | Whether exceptions in Attribute reading will activate the Alarm. |
IgnoreExceptionsDevString | Value can be False/True/NaN to return Exception, None or NotANumber in case of read_attribute exception. |
Please log in to comment.
Generated
README
b'# PANIC, Tango Alarm System\n# https://svn.code.sf.net/p/tango-ds/code/DeviceClasses/SoftwareSystem/PyAlarm/tags/latest\n\nhttp://www.tango-controls.org/community/projects/panic\n\nPanic package contains the python AlarmAPI for managing the PyAlarm device servers from a client \napplication or a python shell. The panic module is used by PyAlarm, Panic Toolbar and Panic GUI.\n\n\n# PyAlarm Device Server\n# https://svn.code.sf.net/p/tango-ds/code/DeviceClasses/SoftwareSystem/PyAlarm/tags/latest/panic/ds\n\nPyAlarm is the alarm device server used by ALBA Alarm System, it requires PyTango and Fandango modules, \nboth available from tango-cs.sourceforge.net\n\nSome configuration panels in the GUI require PyAlarm to be available in the PYTHONPATH, to do so you can \nadd the PyAlarm.py folder to the PYTHONPATH variable or copy the PyAlarm.py file within the panic folder; \nso it could be loaded as a part of the module.\n\n\n# Panic GUI\n# https://svn.code.sf.net/p/tango-ds/code/Clients/python/Panic/latest\n\nPanic is an application for controlling and managing alarms.\nIt allows the user to visualize existing alarms in a clear form and adding/editing/deleting alarms.\nIn edit mode user can change name, move alarms to another device, change descriptions and modify formulas.\nAdditional widgets in which the app is equipped allows alarm history viewing, phonebook editing and \ndevice settings manipulation.\n\n\n----\n\n# TAGS \n\ntrunk will contain current development\ntags/latest will contain sources for building packages\ntags/release_* will contain stable releases\n\n----\n\nSergi Rubio\nAlba Synchrotron 2006'
Updated:
The device class has been updated.
You can see previous version here .
23 Feb 2017, Piotr Goryl
Created:
The device class has been added to catalogue.