Custom Rules
Rule structure, conditions, and operators.
Rule Structure
{
"name": "Rule name shown in alerts",
"enabled": true,
"priority": "high",
"conditions": {
"operator": "AND",
"conditions": [
{ "field": "...", "operator": "...", "value": "..." }
]
},
"notification_enabled": true
}| Field | Type | Description |
|---|---|---|
name | string | π Display name for the rule |
enabled | boolean | β Whether the rule is active |
priority | string | π― low, medium, high, or critical |
conditions | object | βοΈ Condition tree (see below) |
notification_enabled | boolean | π± Send push notifications when triggered |
Condition Fields
| Field | Type | Description | Example |
|---|---|---|---|
icao | string | π’ 24-bit ICAO hex address | A12345 |
callsign | string | π·οΈ Flight number or callsign | UAL123 |
squawk | string | π» Transponder code | 7700 |
altitude | number | π Barometric altitude (feet) | 35000 |
distance | number | π Distance from receiver (NM) | 10 |
type | string | βοΈ ICAO aircraft type code | B738 |
military | boolean | ποΈ Military aircraft flag | true |
category | string | π¦ Aircraft size category | A3 |
Operators
| Operator | Meaning | Works With |
|---|---|---|
eq | β Equals | All types |
ne | β Not equals | All types |
lt | β¬οΈ Less than | Numbers |
gt | β¬οΈ Greater than | Numbers |
le | β¬οΈ Less than or equal | Numbers |
ge | β¬οΈ Greater than or equal | Numbers |
contains | π Contains substring | Strings |
startswith | π Starts with | Strings |
Combining Conditions
Use AND and OR operators to build complex rules. You can nest condition groups.
Alert when a military aircraft is below 10,000ft within 25nm:
{
"operator": "AND",
"conditions": [
{ "field": "military", "operator": "eq", "value": true },
{ "field": "altitude", "operator": "lt", "value": 10000 },
{ "field": "distance", "operator": "lt", "value": 25 }
]
}%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#1e3a5f', 'primaryTextColor': '#fff', 'primaryBorderColor': '#3b82f6', 'lineColor': '#60a5fa'}}}%%
flowchart LR
M["ποΈ Military = true"] --> AND{"β
AND"}
A["π Altitude < 10000"] --> AND
D["π Distance < 25"] --> AND
AND --> ALERT["π Alert!"]
style AND fill:#7c4a03,stroke:#f59e0b,stroke-width:2px,color:#fff
style ALERT fill:#065f46,stroke:#10b981,stroke-width:2px,color:#fffCreating Rules
Updated 7 days ago