Skip to main content

Cargo

This page has not been fully updated to represent the latest state of the Helium Network following the migration to Solana on April 18, 2023.
info

Helium Cargo is an evaluation tool and the data collected is available to all developers. Please do not share any sensitive information. Use at your own discretion.

Add a Cargo Integration

To add an integration, go to Integrations on the left-hand menu. Select the integration to add - in this case, the Cargo integration.

The next step is to name the integration.

Connecting Integrations to Devices

Devices or groups of devices (via labels) can be directly connected to integrations on the Flows Worskpace. Labels are identifiers used to group devices for easy management. To connect one or more devices to one or more integrations, simply connect the Device and Integration nodes on the Flows Workspace.

info

Quick video tutorial connecting devices to an integration here.

Node elements (devices, labels, integrations) need to be created before they're available on the Flows Workspace. More information about Flows here.

Cargo Endpoint

The Cargo endpoint is where device data is sent if connected with a Label.

HTTP Details

keyvalue
Methodpost
Endpointhttps://cargo.helium.com/api/payloads
Headers{"Content-Type":"application/json"}

Cargo Payload

The Cargo payload defines the content and structure of the data payload that must be sent to the cargo endpoint from a device or separate application. Cargo currently accepts data from either the decoded or thepayload field. Each field has different requirements described below.

Decoded Field

The decoded field is the preferred method for sending data to Cargo. This method requires the use of a Function Decoder on Console in order to decode the device payload before sending it to Cargo. The accepted fields are listed below and can be located at any depth within the decoded field.

Required JSON FieldsDescription
latitudeLatitude in Degrees
longitudeLongitude in Degrees
altitudeAltitude in Meters
Optional JSON FieldsDescription
speedSpeed in mph
batteryBattery Voltage

Payload Field

Cargo is also capable of decoding the payload field, but is only compatible with a few common tracking devices.

Compatible Devices:

  • RAK 7200
  • Dragino LGT-92
  • Browan Object Locator
  • Digital Matter Oyster & Yabby

You also have the option of encoding the required data on a development device before transmitting it as described below.

Total Payload:

  • 12 Bytes without Battery Voltage
  • 14 Bytes with Battery Voltage

Packed in the following order:

  • int32_t Latitude in Degrees
  • int32_t Longitude in Degrees
  • int16_t Elevation in Meters
  • int16_t Speed in mph
  • uint16_t Battery Voltage (Optional)

Example:

if (GPS.hasFix) {
idx = 0;
data = (uint32_t)(GPS.latitudeDegrees * 1E7);
payload[idx++] = data >> 24;
payload[idx++] = data >> 16;
payload[idx++] = data >> 8;
payload[idx++] = data;
data = (uint32_t)(GPS.longitudeDegrees * 1E7);
payload[idx++] = data >> 24;
payload[idx++] = data >> 16;
payload[idx++] = data >> 8;
payload[idx++] = data;
data = (int)(GPS.altitude);
payload[idx++] = data >> 8;
payload[idx++] = data;
data = (int)(GPS.speed);
payload[idx++] = data >> 8;
payload[idx++] = data;
}