Send Telemetry 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. Subscribe to Response Topics:

    • tracking/nearby/{companyUid}/{serialNumber}/# - nearby traffic

    • alerts/nearby/{companyUid}/{serialNumber}/# - relevant alerts

    • operations/{operationId}/instructions/# - receive instructions

    • geofences/# - geofence updates

  3. Publish Messages:

    • Enter the appropriate topic

    • Paste the JSON payload

    • Set QoS 1 ("at least once"): Guaranteed delivery but might have duplicates

    • Click "Publish"

  • Replace {companyUid} with your company unique identifier

  • Replace {serialNumber} with your actual UAS serial number

  • Set "Retain" flag to true only for emergency status messages

  • Keep timestamp in UTC and ISO-8601 format

  • For detailed message formats and constraints, refer to the linked API documentation

Common issues and solutions:

  • Connection refused: Verify API key and TLS settings

  • Message not delivered: Check topic format and JSON syntax

  • No response: Verify subscription topics match your serial number

  • Invalid payload: Consult the AsyncAPI documentation for exact schema requirements

MQTT connection
MQTT publish telemetry2

Topics for Publishing

Location Updates

Topic: telemetry/{companyUid}/{serialNumber}/location

API Documentation: sendTelemetryLocation Operation

Example payload:

{
  "timestamp": "2024-11-26T13:15:33Z",
  "coordinates": {
    "lon": 4.687414,
    "lat": 52.297683
  },
  "altitude": {
    "wgs84": 600,
    "amsl": 0,
    "sfc": 0
  }
}

Heading Updates

Topic: telemetry/{companyUid}/{serialNumber}/heading

API Documentation: sendTelemetryHeading Operation

Example payload:

{
  "timestamp": "2024-01-23T10:00:00Z",
  "true": 180.5,
  "magnetic": 182.3
}

Velocity Updates

Topic: telemetry/{companyUid}/{serialNumber}/velocity

API Documentation: sendTelemetryVelocity Operation

Example payload:

{
  "timestamp": "2024-01-23T10:00:00Z",
  "groundSpeed": 5.2
}

Emergency Status

Topic: telemetry/{companyUid}/{serialNumber}/emergencyStatus

Example payload:

{
  "timestamp": "2024-01-23T10:00:00Z",
  "emergencyStatus": ["LOSS_OF_GPS"]
}

Subscription Topics

Nearby Traffic Information

Topic: tracking/nearby/{companyUid}/{serialNumber}/{trackId}

API Documentation: receiveNearbyTracking Operation

Operation Instructions

Topic: operations/{operationId}/instructions/{instructionId}

Geofence Updates

Topic: geofences/{geofenceId}

API Documentation: receiveGeofenceEvent Operation