All Products
Search
Document Center

IoT Platform:Messaging

Last Updated:Jun 18, 2026

The rules engine in IoT Platform forwards device registration, deregistration, and data submission messages from JT/T 808 gateway devices to your servers. You can also use Advanced Message Queuing Protocol (AMQP) server-side subscriptions to push data submission messages.

Usage notes

When you configure data forwarding rules, note the following items:

  • Only the new version of the data forwarding feature supports gateway devices. For more information, see Configure a data forwarding parser.

  • Devices added to JT/T 808 cloud gateways cannot subscribe to topics. You cannot forward data from JT/T 808 cloud gateway devices to a topic.

  • To use data forwarding for JT/T 808 cloud gateway devices, add topics of the following types as the data source: Custom, Device Status Change Notification, and Device Changes Throughout Lifecycle. To add a custom topic as the data source, specify the manufacturer ID, device model, and device ID in the topic name. For more information, see Create a data source.

  • Server-side subscriptions support only the Device Upstream Notification, Device Status Change Notification, and Device Changes Throughout Lifecycle message types. For more information, see Configure AMQP server-side subscription.

Device registration

Topic: /sys/${productKey}/${deviceName}/device/identity/register.

payload: {
    "createTime": 1669968170000,
    "deviceId": "device05",
    "deviceModel": "model1",
    "deviceName": "manufactor_model1_device05",
    "instanceId": "iotx-o****",
    "iotId": "PkhDL********00101",
    "licensePlateColour": "1",
    "licensePlateNumber": "Zhe A****",
    "manufacturer": "manufactor",
    "productKey": "a16h****",
    "status": "register",
    "tenantId": "58CAC7******37C956"
}

Parameter

Type

Description

payload

Object

The content of the device registration message.

createTime

Long

The start time of device registration.

deviceId

String

The device ID registered by the user.

deviceModel

String

The device model registered by the user.

deviceName

String

The DeviceName. Format: ${manufacturer}_${deviceModel}_${deviceId}.

instanceId

String

The ID of the instance to which the device belongs.

iotId

String

The unique identifier of the device in IoT Platform.

licensePlateColour

String

The license plate color. The value must meet the requirements of the JT/T 808 protocol. For more information, see JT/T 808-2019.

licensePlateNumber

String

The license plate number.

manufacturer

String

The ID of the device manufacturer.

productKey

String

The unique identifier of the product to which the device belongs.

status

String

The status of the device. Set the value to register, which indicates that the device is registered.

tenantId

String

The ID of the user to which the device belongs.

Submit device status

Topic: /sys/${productKey}/${deviceName}/device/status/notify.

  • Format of data that is submitted by a device when the device goes online:

    {
        "protocol": "jt808",
        "status":"online",
        "iotId":"4z819VQHk6VSLmmBJfrf00107e****",
        "productKey":"al12345****",
        "deviceName":"deviceName1234",
        "time":"2018-08-31 15:32:28.205",
        "utcTime":"2018-08-31T07:32:28.205Z",
        "lastTime":"2018-08-31 15:32:28.195",
        "utcLastTime":"2018-08-31T07:32:28.195Z",
        "clientIp":"192.0.2.1"
    }
  • Format of data that is submitted by a device when the device goes offline:

    {
        "protocol": "jt808",
        "status":"offline",
        "iotId":"4z819VQHk6VSLmmBJfrf00107e****",
        "offlineReasonCode":427,
        "productKey":"al12345****",
        "deviceName":"deviceName1234",
        "time":"2018-08-31 15:32:28.205",
        "utcTime":"2018-08-31T07:32:28.205Z",
        "lastTime":"2018-08-31 15:32:28.195",
        "utcLastTime":"2018-08-31T07:32:28.195Z",
        "clientIp":"192.0.2.1"
    }

Parameters

Parameter

Type

Description

protocol

String

If you use a JT/T 808 cloud gateway, set the value to jt808.

status

String

The status of the device.

  • online: Online.

  • offline: Offline.

iotId

String

The unique identifier of the device in IoT Platform.

offlineReasonCode

Integer

The error code when the device goes offline. Device behavior error codes.

productKey

String

The unique identifier of the product to which the device belongs.

deviceName

String

The name of the device.

lastTime

String

Deprecated. No longer used.

utcLastTime

String

time

String

The time when the device went online or offline.

Messages are not sorted by online/offline time. Sort them by the time value.

For example, you receive the following three messages in sequence:

  1. Online: 2018-08-31 10:02:28.195.

  2. Offline: 2018-08-31 10:01:28.195.

  3. Offline: 2018-08-31 10:03:28.195.

These three messages show that the device went offline, then online, then offline again.

utcTime

String

The UTC time when the device went online or offline.

clientIp

String

The public IP address of the device.

Device data submission

Topic: /sys/${productKey}/${deviceName}/device/message/uplink.

payload: {
    header:{
        messageId:"",
        version:"",
        phone:"",
        serialNumber:""
    },
    body:{
        data:"dGVzdDEyMw==",
        type: 65
    }
}

Parameter

Type

Description

payload

Object

The message submitted by the device, which includes the header and body parameters. The content can be pass-through data, location statistics, or GPS data.

header

Object

The message header.

  • messageId: the message ID.

  • version: the protocol version.

  • phone: the phone number.

  • serialNumber: the serial number of the message. Valid values: 0 to 65535. The device increases the serial number by one for each message that is submitted by the device.

The values of the messageId, version, and phone parameters must meet the requirements of the JT/T 808 protocol. For more information, see JT/T 808-2019.

body

Object

The message body.

  • data: the content of the message. The content is encoded in Base64.

  • type: the type of the pass-through message. In this example, 65 represents 0x41, which indicates that Serial Port 1 is used to pass through data.

The message body must meet the requirements of the JT/T 808 protocol. For more information, see JT/T 808-2019.

Device deregistration

Topic: /sys/${productKey}/${deviceName}/device/identity/unregister.

payload: {
    "createTime": 1669968170000,
    "deviceId": "device05",
    "deviceModel": "model1",
    "deviceName": "manufactor_model1_device05",
    "instanceId": "iotx-o****",
    "iotId": "PkhDL********00101",
    "licensePlateColour": "1",
    "licensePlateNumber": "Zhe A****",
    "manufacturer": "manufactor",
    "productKey": "a16h****",
    "status": "register",
    "tenantId": "58CAC7******37C956"
}

Parameter

Type

Description

payload

Object

The content of the device deregistration message.

createTime

Long

The start time of the device deregistration.

deviceId

String

The device ID.

deviceModel

String

The model of the device.

deviceName

String

The DeviceName. Format: ${manufacturer}_${deviceModel}_${deviceId}.

instanceId

String

The ID of the instance to which the device belongs.

iotId

String

The unique identifier of the device in IoT Platform.

licensePlateColour

String

The license plate color. The value must meet the requirements of the JT/T 808 protocol. For more information, see JT/T 808-2019.

licensePlateNumber

String

The license plate number.

manufacturer

String

The ID of the device manufacturer.

productKey

String

The unique identifier of the product to which the device belongs.

status

String

The status of the device. Set the value to unregister, which indicates that the device is deregistered.

tenantId

String

The ID of the user to which the device belongs.