Showing detections in Home Assistant
With MQTT discovery turned on, Home Assistant creates map trackers and sensors for each drone the unit detects, plus a device for the unit itself, with no manual entity setup. This article covers what gets created, a map card, and example alerts.
Before you start
- An MQTT broker that both the unit and Home Assistant can reach, with the Home Assistant MQTT integration connected to it.
- MQTT output turned on at the unit with both per-drone topics and discovery enabled. The settings are in Checking that detections are reaching your MQTT broker.
Important Discovery needs mqtt_per_drone_enabled = true as well as mqtt_ha_enabled = true. Each Home Assistant entity needs its own topic, which the combined drone topic cannot provide.
What Home Assistant creates
| Device | Entities |
|---|---|
| One per detected drone | Map trackers for the drone, its pilot, and its home point, plus sensors for position, altitude, height above ground, speed, vertical speed, course, signal strength, frequency, aircraft type, operator ID, link type, and description |
| WarDragon System | A map tracker for the unit’s own position, plus sensors for processor use, memory, disk, temperature, uptime, ground speed, and course |
| Signal alerts (optional) | A tracker per unit that moves to the latest signal alert. Needs mqtt_signals_enabled and mqtt_ha_signal_tracker both set to true. |
ADS-B aircraft do not get entities; there are too many of them. Subscribe to wardragon/aircraft directly if you need them. When a drone stops updating, its entities go offline and drop off the map.
A map card
Add a map card that lists the drone and pilot trackers, substituting the entity IDs Home Assistant created:
type: map
entities:
- device_tracker.drone_<id>
- device_tracker.pilot_<id>
default_zoom: 15
dark_mode: true
Example alerts
These automations read the unit’s drone topic and send a phone notification. Adjust the notify service to match your setup.
Any detection
automation:
- alias: "Drone Detected Alert"
trigger:
- platform: mqtt
topic: "wardragon/drones"
action:
- service: notify.mobile_app
data:
title: "Drone Detected"
message: >
{{ trigger.payload_json.description or 'Unknown drone' }}
({{ trigger.payload_json.id }})
at {{ trigger.payload_json.lat }}, {{ trigger.payload_json.lon }}
A drone inside an area
Replace the four bounds with the latitude and longitude limits of your area.
automation:
- alias: "Drone in Restricted Zone"
trigger:
- platform: mqtt
topic: "wardragon/drones"
condition:
- condition: template
value_template: >
{{ trigger.payload_json.lat | float > <south> and
trigger.payload_json.lat | float < <north> and
trigger.payload_json.lon | float > <west> and
trigger.payload_json.lon | float < <east> }}
action:
- service: notify.all
data:
title: "Drone in Restricted Zone"
message: >
{{ trigger.payload_json.description or 'Unknown' }}
at {{ trigger.payload_json.lat }}, {{ trigger.payload_json.lon }}
A drone that matched the FAA database
automation:
- alias: "RID Verified Drone"
trigger:
- platform: mqtt
topic: "wardragon/drones"
condition:
- condition: template
value_template: "{{ trigger.payload_json.rid_lookup_success == true }}"
action:
- service: notify.mobile_app
data:
title: "RID Verified"
message: >
{{ trigger.payload_json.rid_make }} {{ trigger.payload_json.rid_model }}
({{ trigger.payload_json.id }})
See Verified and unverified tracks for what a match means.
If entities do not appear
- Confirm both
mqtt_ha_enabledandmqtt_per_drone_enabledare true. - Watch the discovery topic while a drone is in range:
mosquitto_sub -h <broker> -t "homeassistant/#" -v. - Check the MQTT integration in Home Assistant under Settings, then Devices & Services.
- Restart Home Assistant after the first discovery messages arrive.
Some fields are empty by design. DJI tracks carry no link type. A Remote ID description is the operator’s own text and is blank if they did not set one. Registered make and model appear only when the FAA lookup succeeds.
Note If the broker goes down, detection and CoT output continue and the unit reconnects on its own. Messages published while the broker is down are not queued, so that stretch will be missing from Home Assistant’s history.
Related
- DragonSync MQTT payload reference ↗ — every topic and field
- Sending detections to other systems
WarDragon is manufactured by Millenium Products Inc. Technical support for purchased kits is requested through the support page. Purchasing and quote requests go through the contact form.
