Each recipe is one rule. To use it: open the profile’s Alarm rules tab, click Add rule > Threshold rule (or Device offline rule), switch to JSON, paste, adjust keys and numbers, click Add to list, then Save rules. Every key must match what your devices send, including case.
1. Temperature ladder
Three severities on one key; the highest true one wins.
{
"type": "high_temperature",
"title": "{{device.name}}: {{value}} °C ({{severity}})",
"severities": [
{ "severity": "CRITICAL", "condition": { "key": "temperature", "op": ">", "value": 90 } },
{ "severity": "MAJOR", "condition": { "key": "temperature", "op": ">", "value": 80 } },
{ "severity": "WARNING", "condition": { "key": "temperature", "op": ">", "value": 70 } }
],
"debounce": { "mode": "count", "raise": 2, "clear": 2 },
"hysteresis": 2,
"runbook": "Check cooling and airflow. Above 90 °C shut the unit down.",
"enabled": true
}
2. One rule, a limit per device
Each device carries its own limit as a server or shared attribute maxTempThreshold. Devices without it are not checked.
{
"type": "temp_over_limit",
"title": "{{device.name}}: {{value}} °C, limit {{threshold}}",
"severities": [
{ "severity": "MAJOR", "condition": { "key": "air_temp", "op": ">", "value": { "attribute": "maxTempThreshold" } } }
],
"debounce": { "mode": "count", "raise": 2, "clear": 2 },
"enabled": true
}
3. Warning band below the limit
A warning between a warning attribute and the hard limit; recipe 2 covers above the limit.
{
"type": "temp_warning_band",
"title": "{{device.name}}: {{value}} °C, getting warm",
"severities": [
{ "severity": "WARNING", "condition": { "all": [
{ "key": "air_temp", "op": ">", "value": { "attribute": "warnTempThreshold" } },
{ "key": "air_temp", "op": "<=", "value": { "attribute": "maxTempThreshold" } }
] } }
],
"enabled": true
}
4. Low battery
Hysteresis 3 keeps the alarm from flapping as the battery recovers in the sun.
{
"type": "battery_low",
"title": "{{device.name}}: battery {{value}} %",
"severities": [
{ "severity": "MINOR", "condition": { "key": "battery", "op": "<", "value": 10 } },
{ "severity": "WARNING", "condition": { "key": "battery", "op": "<", "value": 20 } }
],
"hysteresis": 3,
"enabled": true
}
5. Door open while pressure is low
Two keys that may arrive in separate messages. The rule uses the latest value of each.
{
"type": "door_open_low_pressure",
"title": "{{device.name}}: door open with low pressure",
"severities": [
{ "severity": "MAJOR", "condition": { "all": [
{ "key": "door_open", "op": "==", "value": true },
{ "key": "pressure", "op": "<", "value": 1.2 }
] } }
],
"debounce": { "mode": "duration", "raise": 60, "clear": 30 },
"enabled": true
}
6. Door open too long
{
"type": "door_open_long",
"title": "{{device.name}}: door open for over 5 minutes",
"severities": [ { "severity": "WARNING", "condition": { "key": "door_open", "op": "==", "value": true } } ],
"debounce": { "mode": "duration", "raise": 300, "clear": 1 },
"enabled": true
}
The time is device time: the device must report while the door stays open.
7. Leak that stays until reset
The alarm does not clear when the sensor dries; it waits for leak_reset.
{
"type": "water_leak",
"title": "{{device.name}}: water leak",
"severities": [ { "severity": "CRITICAL", "condition": { "key": "water_leak", "op": "==", "value": true } } ],
"clear": { "key": "leak_reset", "op": "==", "value": true },
"runbook": "Close the main valve and find the leak. The alarm clears when the device reports leak_reset = true, or clear it by hand.",
"enabled": true
}
8. Fault code from a controller
Any non-zero alarm code, with the code in the title.
{
"type": "ups_fault",
"title": "{{device.name}}: UPS alarm code {{value}}",
"severities": [ { "severity": "MAJOR", "condition": { "key": "ups_a_alarm_code", "op": "!=", "value": 0 } } ],
"enabled": true
}
For a text status, use == with the text: { "key": "state", "op": "==", "value": "fault" }.
9. A flapping sensor
A level switch that chatters near its switching point. Debounce by readings, plus a stricter dampening.
{
"type": "tank_high_level",
"title": "{{device.name}}: tank level high",
"severities": [ { "severity": "MAJOR", "condition": { "key": "level_high", "op": "==", "value": true } } ],
"debounce": { "mode": "count", "raise": 3, "clear": 5 },
"dampening": { "maxTransitions": 4, "windowSec": 1800, "holdSec": 900 },
"enabled": true
}
10. Offline after 15 minutes, with reminders
{
"type": "device_offline",
"title": "{{device.name}} is offline",
"inactivity": { "afterSec": 900, "severity": "MAJOR" },
"notify": {
"recipients": [ { "kind": "role", "role": "ADMIN" }, { "kind": "email", "email": "noc@example.com" } ],
"repeatEverySec": 3600
},
"enabled": true
}
Reminders go out every hour while the alarm is open and nobody has acknowledged it.
Adding notifications
Any recipe takes a notify block:
"notify": {
"recipients": [ { "kind": "role", "role": "OWNER" }, { "kind": "email", "email": "oncall@example.com" } ],
"minSeverity": "MAJOR",
"repeatEverySec": 1800
}
See Alarm notifications in depth.
Only for one topic
For devices that publish their own topics, add "topic" to a leaf: { "key": "temp", "op": ">", "value": 60, "topic": "plant/line2/oven" }. See Alarm conditions reference.

