Alarms and notifications
Define alarm rules and calculated fields, work with active alarms and send notifications by mail, SMS and other channels.
Alarm rules
In Aniston Nexus 4.3 an alarm rule is a calculated field of type ALARM on a device profile, asset profile or single entity. It reads telemetry and attributes as arguments and raises, updates and clears an alarm by condition and severity (critical, major, minor, warning, indeterminate), with optional duration ("for at least 5 minutes") and repeat conditions.
Open the profile, Calculated fields (or Alarm rules), +. Keep conditions on the keys the devices actually send (see the package CONTRACT.md), and give each rule a clear condition so alarms do not stay active forever.
Alarms > Alarm rules (tenant administrators) lists every alarm rule of the tenant in one table: alarm type, owner (profile or entity, with a link to it), severities, a one-line Conditions summary of each create and clear condition (the full text is in the tooltip), and whether a clear condition is set. Search by alarm type, filter by owner type or entity, and use the row actions to edit a rule in the same editor the profile uses, copy, export, see debug events or change its debug settings. The REST API behind it is GET /api/alarm/rules (tenant-wide, paged, textSearch) and GET /api/alarm/rules/{entityType}/{entityId}. Alarm rules have no separate on/off switch: to stop one, delete it (export it first to keep a copy).
The BMS package ships its alarm rules as files (solutions/nexus-bms/profiles/alarm_rules/), one per profile. The Water package raises its alarms in the Water Tank Processing rule chain.
Calculated fields
Calculated fields of type SIMPLE or SCRIPT compute new telemetry from other values (volume from level, power from current and voltage, an average over related devices). Results are saved like device telemetry, so dashboards and alarm rules can use them.
Working with alarms
The Alarms page and alarm widgets list active and cleared alarms with their originator. Users acknowledge an alarm (seen, being handled) and clear it when it is resolved; both are recorded with the user and time. Assign alarms to a user to make ownership clear.
Notifications
Notification center sends messages when alarms change or other events happen:
- Recipients (targets): users, user groups by role, customers, Slack channels, or external numbers/e-mails.
- Templates: subject and text per delivery method (web, e-mail, SMS, Slack, mobile app), with placeholders such as
${alarmType},${alarmSeverity},${alarmOriginatorName}. - Rules: trigger (alarm, device activity, rule-engine event…), filter, template, recipients, and escalation steps.
The packages ship their targets, templates and rules in solutions/*/notification_rules/. Recipient lists in the repository are role-based; real phone numbers and e-mails are added on the server, never committed.
Mail and SMS
The system administrator sets the outgoing mail server (Settings > Mail server) and the SMS provider (Settings > Notifications). For tests, solutions/nexus-water/tools/smtp_sink/ and smpp_sim/ catch messages locally; setup_mail.py and setup_sms.py configure a server from the command line.
WhatsApp, voice and webhook alerts with escalation are provided by the notify package of nexus-services (off by default; see its README).
Microsoft 365 (Exchange Online) mail and Teams workflow URLs: see Microsoft 365 mail and Teams.