Safety & Alerts
Configure safety monitoring and custom alert rules for aircraft tracking.
SkySpy provides two types of alerts: automatic safety monitoring that detects dangerous conditions, and custom alert rules you define to track specific aircraft or situations.
%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#1e3a5f', 'primaryTextColor': '#fff', 'primaryBorderColor': '#3b82f6', 'lineColor': '#60a5fa'}}}%%
flowchart LR
subgraph Input["π‘ Live Traffic"]
AC["βοΈ Aircraft Data"]
end
subgraph Detection["π Detection"]
SAFETY["π‘οΈ Safety Engine"]
RULES["π Custom Rules"]
end
subgraph Output["π¬ Alerts"]
DASH["π₯οΈ Dashboard"]
PUSH["π± Push Notifications"]
end
AC --> SAFETY
AC --> RULES
SAFETY --> DASH
SAFETY --> PUSH
RULES --> DASH
RULES --> PUSH
style Input fill:#0d4f8b,stroke:#3b82f6,stroke-width:2px,color:#fff
style Detection fill:#7c4a03,stroke:#f59e0b,stroke-width:2px,color:#fff
style Output fill:#065f46,stroke:#10b981,stroke-width:2px,color:#fff
Safety Monitoring
The safety engine continuously analyzes live traffic and automatically detects dangerous conditions.
Emergency Squawk Codes
| Code | Icon | Meaning |
|---|---|---|
7700 | π¨ | General Emergency β Aircraft in distress |
7600 | π» | Radio Failure β Lost communications (NORDO) |
7500 | β οΈ | Hijack β Unlawful interference |
Configuration
SAFETY_MONITORING_ENABLED=true
SAFETY_PROXIMITY_NM=1.0 # Nautical miles
SAFETY_ALTITUDE_DIFF_FT=1000 # FeetCustom Alert Rules
Create rules to get notified when specific aircraft appear or conditions are met.
%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#1e3a5f', 'primaryTextColor': '#fff', 'primaryBorderColor': '#3b82f6', 'lineColor': '#60a5fa'}}}%%
flowchart TB
subgraph Rule["π Alert Rule"]
direction TB
NAME["π Rule Name"]
COND["βοΈ Conditions"]
PRIO["π― Priority Level"]
end
subgraph Fields["π Available Fields"]
direction LR
ICAO["π’ ICAO Hex"]
CALL["π·οΈ Callsign"]
ALT["π Altitude"]
DIST["π Distance"]
MIL["ποΈ Military"]
end
Rule --> Fields
style Rule fill:#0d4f8b,stroke:#3b82f6,stroke-width:2px,color:#fff
style Fields fill:#065f46,stroke:#10b981,stroke-width:2px,color:#fff
Quick Example
curl -X POST http://localhost:5000/api/alerts/rules \
-H "Content-Type: application/json" \
-d '{
"name": "Military Aircraft Nearby",
"enabled": true,
"priority": "high",
"conditions": {
"operator": "AND",
"conditions": [
{ "field": "military", "operator": "eq", "value": true },
{ "field": "distance", "operator": "lt", "value": 50 }
]
},
"notification_enabled": true
}'Notifications
When alerts trigger, SkySpy sends push notifications via Apprise.
%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#1e3a5f', 'primaryTextColor': '#fff', 'primaryBorderColor': '#3b82f6', 'lineColor': '#60a5fa'}}}%%
flowchart LR
ALERT["π Alert Triggered"] --> APPRISE["π€ Apprise"]
APPRISE --> PO["π± Pushover"]
APPRISE --> TG["βοΈ Telegram"]
APPRISE --> DC["π¬ Discord"]
APPRISE --> MORE["π 80+ more..."]
style ALERT fill:#991b1b,stroke:#ef4444,stroke-width:2px,color:#fff
style APPRISE fill:#7c4a03,stroke:#f59e0b,stroke-width:2px,color:#fff
APPRISE_URLS="pushover://user@token;tgram://bot/chat"
NOTIFICATION_COOLDOWN=300Implementation
π Custom Rules
Rule structure, conditions, and operators
π Rule Examples
Common rule patterns and use cases
Next Steps
Updated 7 days ago