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
- Open Device Profiles in the IoT menu.
- Open the profile your device uses (on a new organisation, Default).
- 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
- Select Add rule and choose Threshold rule.
- Fill in the form:
| Field | Value | What it does |
|---|---|---|
| Type | high_temperature | The 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}} °C | The text people see. {{device.name}}, {{value}}, {{key}}, {{threshold}}, {{severity}} and {{type}} are filled in. |
| Severity | Major | How serious it is. |
| When: Key, Operator, Value | temperature, >, 80 | The condition. The value can also be attribute:<name> to use a limit stored on each device. |
- Open Advanced and set:
| Field | Value | What it does |
|---|---|---|
| Count in | Readings in a row | Count samples, not seconds. |
| Raise after this many readings in a row | 3 | One stray reading does not open the alarm. |
| Clear after this many readings in a row | 3 | One good reading does not close it. |
| Hysteresis (clear margin) | 3 | The alarm holds while the temperature is above 77, so it clears only at 77 or below. |
| Runbook | Check the burner and the flue sensor. | Shown to the person handling the alarm. |
- 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:
- Open the rule again with Edit and switch from Form to JSON.
- Add a
notifyblock next to the other fields:
"notify": {
"recipients": [
{ "kind": "role", "role": "ADMIN" },
{ "kind": "email", "email": "maintenance@example.com" }
],
"minSeverity": "MAJOR",
"repeatEverySec": 3600
}
- Select Update the list, then Save rules.
| Field | Meaning |
|---|---|
recipients | 1 to 20 entries: a user ({"kind": "user", "userId": "…"}), a built-in role (OWNER, ADMIN or USER), or an e-mail address. |
channels | Optional: 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:maxTempand storemaxTempas a server attribute on each device. See Attributes. - A profile can hold up to 50 alarm rules. See Alarm rules on device profiles.

