New: the AI firewall watches every module and explains each incident in plain words. See how it works

Set up your first alarm

Add a threshold alarm rule to a device profile, test it with a few messages, and add recipients so the right people are told.

Alarm rules belong to a device profile, and every device of the profile uses them. This page adds one rule: a high-temperature alarm that opens after three readings above 80 °C in a row and clears when the temperature falls back to 77 °C or below. It then tests the rule and adds a notification.

What you need

  • The Admin role or higher (permission to manage alarm rules).
  • A device that sends temperature. See Connect your first device.

1. Open the profile’s alarm rules

  1. Open Device Profiles in the IoT menu.
  2. Open the profile your device uses (on a new organisation, Default).
  3. Select the Alarm rules tab (“Evaluated for every message of this profile’s devices by the alarm-rules step of the default flow.”).

2. Add the rule

  1. Select Add rule and choose Threshold rule.
  2. Fill in the form:
FieldValueWhat it does
Typehigh_temperatureThe name of this kind of alarm. Letters, digits and _ . : -, unique in the profile. A device has at most one open alarm per type.
Alarm title{{device.name}}: temperature {{value}} °CThe text people see. {{device.name}}, {{value}}, {{key}}, {{threshold}}, {{severity}} and {{type}} are filled in.
SeverityMajorHow serious it is.
When: Key, Operator, Valuetemperature, >, 80The condition. The value can also be attribute:<name> to use a limit stored on each device.
  1. Open Advanced and set:
FieldValueWhat it does
Count inReadings in a rowCount samples, not seconds.
Raise after this many readings in a row3One stray reading does not open the alarm.
Clear after this many readings in a row3One good reading does not close it.
Hysteresis (clear margin)3The alarm holds while the temperature is above 77, so it clears only at 77 or below.
RunbookCheck the burner and the flue sensor.Shown to the person handling the alarm.
  1. Select Add to list, then Save rules. Nothing applies until you save; the tab says how many rules are changed and not saved.

Tip

If temperature is not declared on the profile’s Telemetry keys tab, the form marks it Unknown key. You can still save; the rule fires on devices that send the key.

3. Test it

Send three messages in a row with a temperature above 80:

for t in 85 86 87; do
  mosquitto_pub -h <broker host> -p 8883 --capath /etc/ssl/certs \
    -u "<ACCESS_TOKEN>" -q 1 -t v1/telemetry -m "{\"temperature\": $t}"
done

After the third message an alarm opens with severity Major and status Open. You see it:

  • on the Alarms page in the IoT menu,
  • on the device’s Alarms tab,
  • in the bell in the top bar.

Then send three messages at 77 or below. The alarm is resolved automatically and shows Resolved.

4. Tell people

A rule notifies nobody until you add recipients. The form does not show the notification settings yet, so add them as JSON:

  1. Open the rule again with Edit and switch from Form to JSON.
  2. Add a notify block next to the other fields:
"notify": {
  "recipients": [
    { "kind": "role", "role": "ADMIN" },
    { "kind": "email", "email": "maintenance@example.com" }
  ],
  "minSeverity": "MAJOR",
  "repeatEverySec": 3600
}
  1. Select Update the list, then Save rules.
FieldMeaning
recipients1 to 20 entries: a user ({"kind": "user", "userId": "…"}), a built-in role (OWNER, ADMIN or USER), or an e-mail address.
channelsOptional: the channels to use, for example ["inapp", "mail"]. Left out, every channel the recipient allows is used.

Members and roles are reached in the app (the bell) and in linked chat apps. E-mail goes only to the addresses you list as email recipients, so add one for every inbox that should get the alarm. See Alarm notifications in depth. | minSeverity | Optional: below this severity the alarm is recorded but nobody is told. | | repeatEverySec | Optional: a reminder while the alarm stays open and unacknowledged, 60 seconds to 7 days. |

Note

By default, a Critical alarm reaches its recipients even when they have muted that kind of notification. An administrator can change this under Alarms > Alarm settings (Critical alarms ignore notification preferences).

See Alarm notifications in depth for storms, digests and repeats.

5. Handle the alarm

Any member can Acknowledge an alarm, optionally with a note (“What did you do?”). Clearing it by hand (Clear) needs the Admin role. Most alarms clear by themselves when the condition ends. See Working with alarms.

Also useful

  • An alarm when a device goes quiet: add a Device offline rule (Open after (seconds offline), 10 seconds to 7 days). See Offline alarms.
  • A different limit per device: set the value to attribute:maxTemp and store maxTemp as a server attribute on each device. See Attributes.
  • A profile can hold up to 50 alarm rules. See Alarm rules on device profiles.

Next step

Invite your team.