Receive Alerts Example using MQTT Explorer

MQTT Connection Settings

Host: portal.demo.unifly.tech
Port: 8883
Protocol: MQTT v5.0
SSL/TLS: Enabled
Username: your-api-key
Password: your-api-key
  • Use your API key for both username and password fields

  • TLS encryption is mandatory - unencrypted connections will be rejected

Setup in MQTT Explorer

  1. Create New Connection:

    • Click "Connections" → "Add Connection"

    • Enter the connection details as shown above

    • Enable SSL/TLS

    • Use API key for both username and password

  2. Click "ADVANCED" to add subscription topics:

    • Enter alerts/nearby/{companyUid}/{serialNumber}/# in topic field

    • QoS level should be 1

    • Click "ADD"

MQTT subscribe
  • Replace {companyUid} with your company unique identifier

  • Replace {serialNumber} with your actual UAS serial number

  • Use # wildcard to receive all alert types

MQTT receive alert

Alert Message Types

Collision Alert

Topic: alerts/nearby/{companyUid}/{serialNumber}/{alertId}

API Documentation: receiveNearbyAlerts Operation

Example message:

{
  "type": "UAS_COLLISION",
  "level": "CRITICAL",
  "subject": {
    "uniqueIdentifier": "DRONE123",
    "type": "UAS",
    "position": {
      "longitude": 4.358804,
      "latitude": 50.954191
    }
  },
  "relatedSubject": {
    "uniqueIdentifier": "DRONE456",
    "type": "UAS",
    "position": {
      "longitude": 4.358904,
      "latitude": 50.954291
    }
  },
  "timestamp": "2024-01-23T10:00:00Z"
}

Geofence Alert

Topic: alerts/nearby/{companyUid}/{serialNumber}/{alertId}

Example message:

{
  "type": "INTRUSION",
  "level": "WARNING",
  "subject": {
    "uniqueIdentifier": "DRONE123",
    "type": "UAS"
  },
  "relatedSubject": {
    "uniqueIdentifier": "GEO789",
    "type": "GEOZONE"
  },
  "timestamp": "2024-01-23T10:00:00Z"
}

Emergency Alert

Topic: alerts/nearby/{companyUid}/{serialNumber}/{alertId}

Example message:

{
  "type": "LOW_BATTERY",
  "level": "CRITICAL",
  "subject": {
    "uniqueIdentifier": "DRONE123",
    "type": "UAS"
  },
  "timestamp": "2024-01-23T10:00:00Z"
}