Appearance
Data Format Definition
This section presents data format of each message type defined in Data Format Overview.
Current Version: v1.0.0.
Online And Offline Event
Reports device status: online, offline, or reconnected.
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | ONLINE | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | N | ||||||||||
|
Example:
json
{
"productKey": "p12345",
"deviceKey": "1234567890",
"type": "ONLINE",
"createdAt": 1609316592000,
"ticket": "5f9924d171977c33bc5ad1b1",
"gateway": {
"productKey": "p12344",
"deviceKey": "1234567891"
},
"data": {
"value": 1
}
}
Device And Module Status
Reports device status and module status: battery level, voltage, signal strength, firmware version and ICCID.
Field | Type | Note | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | |||||||||
deviceKey | String | DK | |||||||||
type | Enum | STATUS | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | |||||||||
ticket | String | Message ID. | |||||||||
gateway | JSON Object | Gateway details. | |||||||||
| |||||||||||
data | JSON Object | ||||||||||
|
Example:
json
{
"productKey": "p12345",
"deviceKey": "1234567890",
"type": "STATUS",
"createdAt": 1609316592000,
"ticket": "5f9924d171977c33bc5ad1b1",
"data": {
"packetId": 3,
"kv": {"battery": "20", "voltage": "4"}
}
}
List of Status Fields
Type | Name | Key |
---|---|---|
Device Status | Battery | battery |
Voltage | voltage | |
Signal Strength | signal_strength | |
Free Memory Left | memory_free | |
Reference Signal Receiving Power | rsrp | |
Reference Signal Receiving Power Under LTE | rsrq | |
Signal to Interference plus Noise Ratio | snr | |
Module Status | Module Model | type |
Firmware Version | version | |
MCU Version | mcu_version | |
Basestation ID | cell_id | |
ICCID | icc_id | |
Mobile Country Code | mcc | |
Mobile Network Code | mnc | |
Location Area Code | lac | |
Phone Number | phone_num | |
SIM Card Number | sim_num | |
SDK Version | sdk_ver | |
Positioning Support | locator |
Device Response
Reports the status of a command issued to the device: successful sending, or failed sending.
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | REQACK | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID generated by Snowflake algorithm. | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"productKey": "p12345",
"deviceKey": "1234567890",
"type": "REQACK",
"createdAt": 1609316592000,
"ticket": "23924d171977c121325ad1bf",
"gateway": {
"productKey": "p12344",
"deviceKey": "1234567891"
},
"data": {
"sentAt": 1609316592000,
"status": "succ"
}
}
Device Information Change
Operations performed on device: added modified deleted, or reset.
Field | Name | Type | Required | Note | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | Event type | String | Y | Fixed to META_EVENT. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ticket | Message ID | String | N | This field is required if the operation type is activation, authentication or de-registration. Otherwise, it is optional. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
subtype | Type of operation subject | String | Y | Fixed to DEVICE indicating that the operation applies to device. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
operation | Specific operation | String | Y | ADD - Add a device UPDATE - Update device information DELETE - Delete a device RESET - Reset a device AUTH - Authenticate a device ACTIVE - Activate a device LOGOFF - De-register a device | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
productKey | PK of the product | String | Y | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
deviceKey | Unique device code | String | Y | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | Timestamp of the operation | Long | Y | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
gateway | Gateway information | JSON Object | N | Gateway information will be displayed during operations such as resetting/authenticating/logging off gateway devices. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | JSON Object | N | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Adding/Deleting/Activating/Authenticating/Deregistering a Device
|
Example of adding/deleting a device:
json
{
"productKey": "p11376",
"deviceKey": "132456",
"type": "META_EVENT",
"subtype": "DEVICE",
"ticket": "1032330579905388544",
"operation": "ADD/DELETE",
"createdAt": 1616375484482,
"data": {
"deviceName": "123789",
"sn": null
}
}
Example of activating/authenticating/de-registering a device:
json
{
"productKey": "p11376",
"deviceKey": "132456",
"type": "META_EVENT",
"subtype": "DEVICE",
"ticket": "1032330579905388544",
"operation": "AUTH/ACTIVEL/LOGOFF",
"createdAt": 1616375484482,
"gateway": {
"productKey": "p11371",
"deviceKey": "112456"
},
"data": null
}
Example of modifying a device:
json
{
"productKey": "p11376",
"deviceKey": "132456",
"type": "META_EVENT",
"subtype": "DEVICE",
"operation": "UPDATE",
"createdAt": 1616375484482,
"ticket": "1032330579905388544",
"data": {
"deviceName": {
"old": "original device name",
"new": "new device name"
},
"sn": {
"new": "new SN"
},
"timeOffset": {
"old": "+06:00",
"new": "+08:00"
}
}
}
Example of reseting a device:
json
{
"productKey": "p11376",
"deviceKey": "132456",
"type": "META_EVENT",
"subtype": "DEVICE",
"operation": "RESET",
"createdAt": 1616375484482,
"data": null,
"ticket": "1032330579905388544",
"gateway": {
"productKey": "p11371",
"deviceKey": "112456"
}
}
Device Binding Information Change
Data triggered by the changes of device binding information sent by terminal user.
Field | Name | Type | Required | Note | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | PK | String | Y | |||||||||||||||||||||||||
deviceKey | DK | String | Y | |||||||||||||||||||||||||
deviceName | Device name | String | N | |||||||||||||||||||||||||
type | Type | String | Y | Fixed to ENDUSER | ||||||||||||||||||||||||
subtype | Sub-type | String | Y | Fixed to USER-BIND | ||||||||||||||||||||||||
ticket | Message ID | String | Y | |||||||||||||||||||||||||
createdAt | Creation time | Long | Y | Operation timestamp. Unit: ms | ||||||||||||||||||||||||
data | JSON Object | Y | ||||||||||||||||||||||||||
|
Example:
json
{
"type": "ENDUSER",
"subtype": "USER-BIND",
"deviceKey": "132456",
"productKey": "p11376",
"createdAt": 1616375484482,
"deviceName": "device",
"ticket": "23924d171977c121325ad1bf",
"data": {
"endUserId": "11376",
"endUserDomain": "C.DM.5715.1",
"value":1
}
}
Transparent Transmission-Device Uplink Data
Device data reported through the transparent channel when the product data format is set to TSL model or transparent transmission.
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | RAW | Y | |||||||||
subtype | Enum | UPLINK | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
ticket | String | Message ID | Y | |||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "RAW",
"subtype": "UPLINK",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"data": {
"packetId": 3,
"raw": "YSBtZXNzYWdl"
}
}
Transparent Transmission-Device Downlink Data
Downlink control command issued through the transparent channel when the product data format is set to TSL model or transparent transmission.
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | RAW | Y | |||||||||
subtype | Enum | DOWNLINK | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "RAW",
"subtype": "DOWNLINK",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"data": {
"raw": "YSBtZXNzYWdl"
}
}
TSL-Property
Data reported by the device of the product that TSL data format has been selected.
MATTR READ: TSL-Request of Read
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | MATTR | Y | |||||||||
subtype | Enum | READ | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MATTR",
"subtype": "READ",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"data": {
"keys": [
"code1",
"code2"
]
}
}
MATTR READRESP: TSL-Response of Read
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | MATTR | Y | |||||||||
subtype | Enum | READRESP | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MATTR",
"subtype": "READRESP",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"data": {
"packetId": 3,
"kv": {
"numberKey": "0.26",
"boolKey": false,
"enumKey": "1"
}
}
}
Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.
MATTR WRITE: TSL-Request of Write
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | MATTR | Y | |||||||||
subtype | Enum | WRITE | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MATTR",
"subtype": "WRITE",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"data": {
"kv": {
"code1": "1",
"code2": "3"
}
}
}
MATTR REPORT: TSL-Report of Write
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | MATTR | Y | |||||||||
subtype | Enum | REPORT | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
extData | JSON Object | Reserved. Format: Key value pair. | N | |||||||||
| ||||||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MATTR",
"subtype": "REPORT",
"createdAt": 1609316592000,
"ticket": "5f9924d171977c33bc5ad1b1",
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"extData": {
"occurredAt": "1652433712899"
},
"data": {
"packetId": 5,
"kv": {
"numberKey": "0.26",
"boolKey": false,
"enumKey": "1"
}
}
}
Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.
TSL-Uplink Transparent Transmission Data of Device
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | RAW | Y | |||||||||
subtype | Enum | UPLINK | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
ticket | String | Message ID | Y | |||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "RAW",
"subtype": "UPLINK",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"data": {
"packetId": 3,
"raw": "YSBtZXNzYWdl"
}
}
Remark: The raw field is the base64 encoded string of the data.
TSL-Downlink Transparent Transmission Data of Device
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | |||||||||
deviceKey | String | DK | Y | |||||||||
type | Enum | RAW | Y | |||||||||
subtype | Enum | DOWNLINK | Y | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | |||||||||
ticket | String | Message ID | Y | |||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | Y | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "RAW",
"subtype": "DOWNLINK",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"data": {
"raw": "YSBtZXNzYWdl"
}
}
Remark: The raw field is the base64 encoded string of the data.
TSL-Event-Message
Event reported by the device of the product that TSL data format has been selected, with the level defined as INFO.
Field | Type | Note | Required | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | ||||||||||||
deviceKey | String | DK | Y | ||||||||||||
type | Enum | MEVENT | Y | ||||||||||||
subtype | Enum | INFO | Y | ||||||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | ||||||||||||
ticket | String | Message ID | Y | ||||||||||||
gateway | JSON Object | Gateway details. | Y | ||||||||||||
| |||||||||||||||
extData | JSON Object | Reserved. Format: Key value pair. | N | ||||||||||||
| |||||||||||||||
data | JSON Object | Y | |||||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MEVENT",
"subtype": "INFO",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"extData": {
"occurredAt": "1652433712899"
},
"data": {
"packetId": 3,
"code": "event_code3",
"kv": {
"numberKey": "0.26",
"boolKey": false,
"enumKey": "1"
}
}
}
Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.
TSL-Event-Alert
Event reported by the device of the product that TSL data format has been selected, with the level defined as WARN.
Field | Type | Note | Required | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | ||||||||||||
deviceKey | String | DK | Y | ||||||||||||
type | Enum | MEVENT | Y | ||||||||||||
subtype | Enum | WARN | Y | ||||||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | ||||||||||||
ticket | String | Message ID | Y | ||||||||||||
gateway | JSON Object | Gateway details. | N | ||||||||||||
| |||||||||||||||
extData | JSON Object | Reserved. Format: Key value pair. | N | ||||||||||||
| |||||||||||||||
data | JSON Object | Y | |||||||||||||
|
Example
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MEVENT",
"subtype": "WARN",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"extData": {
"occurredAt": "1652433712899"
},
"data": {
"packetId": 3,
"code": "event_code3",
"kv": {
"numberKey": "0.26",
"boolKey": false,
"enumKey": "1"
}
}
}
Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.
TSL-Event-Fault
Event reported by the device of the product that TSL data format has been selected, with the level defined as ERROR.
Field | Type | Note | Required | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | ||||||||||||
deviceKey | String | DK | Y | ||||||||||||
type | Enum | MEVENT | Y | ||||||||||||
subtype | Enum | ERROR | Y | ||||||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | ||||||||||||
ticket | String | Message ID | Y | ||||||||||||
gateway | JSON Object | Gateway details. | N | ||||||||||||
| |||||||||||||||
extData | JSON Object | Reserved. Format: Key value pair. | N | ||||||||||||
| |||||||||||||||
data | JSON Object | Y | |||||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MEVENT",
"subtype": "ERROR",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": " 2345678901234"
},
"extData": {
"occurredAt": "1652433712899"
},
"data": {
"packetId": 3,
"code": "event_code3",
"kv": {
"numberKey": "0.26",
"boolKey": false,
"enumKey": "1"
}
}
}
Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.
TSL-Service-Calling Logs
Service data reported by the device of the product indicating that TSL data format has been selected.
Field | Type | Note | Required | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | Y | ||||||||||||
deviceKey | String | DK | Y | ||||||||||||
type | Enum | MSERV | Y | ||||||||||||
subtype | Enum | INPUT/OUTPUT | Y | ||||||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | Y | ||||||||||||
ticket | String | Message ID | Y | ||||||||||||
gateway | JSON Object | Gateway details. | N | ||||||||||||
| |||||||||||||||
extData | JSON Object | Reserved. Format: Key value pair. | N | ||||||||||||
| |||||||||||||||
data | JSON Object | Y | |||||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "MSERV",
"subtype": "INPUT",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p111KY",
"deviceKey": "2345678901234"
},
"extData": {
"occurredAt": "1652433712899"
},
"data": {
"packetId": 3,
"code": "serv_code",
"kv": {
"numberKey": "0.26",
"boolKey": false,
"enumKey": "1"
}
}
}
Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.
Device Positioning-Query Positioning Data
Device positioning data sent to the device.
Field | Type | Note | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | |||||||||
deviceKey | String | DK | |||||||||
type | Enum | LOCATION | |||||||||
subtype | Enum | QUERY | |||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | |||||||||
ticket | String | Message ID | |||||||||
data | JSON Object | ||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "LOCATION",
"subtype": "QUERY",
"createdAt": 1609316592000,
"data": {
"packetId": 1,
"keys": []
}
}
Device Positioning-Original Data
NMEA protocol-based positioning data reported by the device.
Field | Type | Note | Required | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | ||||||||||
deviceKey | String | DK | ||||||||||
type | Enum | LOCATION | ||||||||||
subtype | Enum | INFO-RAW | ||||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | ||||||||||
ticket | String | Message ID | ||||||||||
gateway | JSON Object | Gateway details. | N | |||||||||
| ||||||||||||
data | JSON Object | |||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "LOCATION",
"subtype": "INFO-RAW",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p12344",
"deviceKey": "1234567891"
},
"data": {
"packetId": 5,
"raw": [
"$GNGGA,095528.000,2318.1133,N,11319.7210,E,1,06,3.7,55.1,M,-5.4,M,,0000*69",
"$BDGGA,062938.00,3110.4700719,N,12123.2657056,E,1,25,0.6,58.9666,M,0.000,M,99,AAAA*4"
]
}
}
Device Positioning Data
NMEA protocol-based positioning data reported by the device. The data is parsed by Developer Center.
Several INFO-KV messages are returned if the return value is an array.
Field | Type | Note | Required | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
productKey | String | PK | ||||||||||||||||
deviceKey | String | DK | ||||||||||||||||
type | Enum | LOCATION | ||||||||||||||||
subtype | Enum | INFO-KV reports original or parsed positioning data | ||||||||||||||||
createdAt | Long | Timestamp indicating the exact time the message was generated. Type: integer. Unit: ms. | ||||||||||||||||
ticket | String | Message ID | ||||||||||||||||
gateway | JSON Object | Gateway details. | N | |||||||||||||||
| ||||||||||||||||||
data | JSON Object | |||||||||||||||||
|
Example:
json
{
"ticket": "5f9924d171977c33bc5ad1b1",
"productKey": "p111KY",
"deviceKey": "1234567890123",
"type": "LOCATION",
"subtype": "INFO-KV",
"createdAt": 1609316592000,
"gateway": {
"productKey": "p12344",
"deviceKey": "1234567891"
},
"data": {
"packetId": 5,
"type": "GP/LBS",
"subType": "BD(GGA)/LBS",
"kv": {
"satellites": "40", //Currently used satellites.
"ggaStatus": "4", //The positioning quality indicator GGA data is unique.
"lat": "3959.6107085", //Latitude (Unit: minute)
"lng": "11619.6423341", //Longitude (Unit: minute)
"wgs_84": {
"lat": 39.99351180833333, //Latitude (Unit: degree)
"lng": 116.32737223500001 //Longitude (Unit: degree)
},
"gcj_02": {
"lat": 39.994825423430167, //Latitude (Unit: degree)
"lng": 116.33351545721269 //Longitude (Unit: degree)
},
"bd_09": {
"lat": 40.00050264255087, //Latitude (Unit: degree)
"lng": 116.340146904483 //Longitude (Unit: degree)
},
"latType": "N/S", //Latitude hemisphere
"lngType": "W/E", //Longitude hemisphere
"hdop": "0.99", //Horizontal dilution of precision, which is available only for GPS.
"accuracy": "550", //Accuracy, which is available only for LBS.
"locateTime": 1609316592000, //Positioning time (UTC time).
"height": "66.7717" //Altitude (in meters)
}
}
}
Product Information Change
Changes in product information: added, modified, or deleted.
Field | Name | Type | Required | Note | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | Event type | String | Y | Fixed to META_EVENT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subtype | Type of operation subject | String | Y | Fixed to PRODUCT indicating that the operation applies to product. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operation | Specific operation | String | Y | ADD - Add a product UPDATE - Update product information DELETE - Delete a product | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
productKey | PK | String | Y | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | Timestamp of the operation | Long | Y | Unit: ms | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | JSON Object | Y | Product details | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Add/Delete a Product
|
Example: Add a product
json
{
"type": "META_EVENT",
"subtype": "PRODUCT",
"operation": "ADD",
"createdAt": 1616375484482,
"operator": 1,
"operatorType": 1,
"productKey": "p00001",
"data": {
"productName": "Product Sample",
"productType": 0,
"accessType": 1,
"netWay": "1",
"dataFmt": 1,
"protocol": 1,
"logoPath": "https://xxxx.com/abcdfg.jpeg",
"moduleType": null,
"moduleName": null,
"moduleId": null,
"allowedLimit": 3,
"productStatus": 0,
"projectId": 1,
"createTime": 1615787274000,
"updateTime": 1615789235000,
"itemCode": "anfang"
}
}
Example of modifying a product:
json
{
"type": "META_EVENT",
"subtype": "PRODUCT",
"operation": "UPDATE",
"createdAt": 1616375484482,
"operator": 1,
"operatorType": 1,
"productKey": "p00001",
"data": {
"productName": {
"old": "Previous product name",
"new": "New product name"
}
}
}
Product Authorization Information
Changes in product authorization information: authorization granted or authorization cancelled.
Field | Name | Type | Required | Note | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | Event type | String | Y | Fixed to META_EVENT | |||||||||||||||||||||||||||||||||||||||||||||||||||
subtype | Type of operation subject | String | Y | Fixed to GRANT_AUTHORIZED, indicating product authorization operations. | |||||||||||||||||||||||||||||||||||||||||||||||||||
operation | Specific operation | String | Y | AUTH - Authorize a product CANCEL_AUTH - Deauthorize a product | |||||||||||||||||||||||||||||||||||||||||||||||||||
ProductKey | PK | String | Y | ||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | Timestamp of the operation | Long | Y | Unit: ms | |||||||||||||||||||||||||||||||||||||||||||||||||||
data | JSON Object | Y | Product authorization details | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Product Authorization/Authorization Cancellation
|
Example:
json
{
"createdAt": 1665280943221,
"data": {
"moduleType": null,
"dataFmt": 3,
"itemCode": "socket",
"logoPath": null,
"moduleName": null,
"netWay": "2",
"productStatus": 0,
"allowedLimit": 100,
"updateTime": 1665286595000,
"productName": "socket",
"accessType": 0,
"protocol": null,
"createTime": 1665285584000,
"moduleId": null,
"projectId": 11338,
"productType": 0
},
"operation": "AUTH",
"productKey": "p119Cx",
"subtype": "GRANT_AUTHORIZED",
"type": "META_EVENT"
}
User domain(App) Authorization Information
Changes in User domain(App) authorization information: authorization granted or authorization cancelled.
Field | Name | Type | Required | Note | ||||||
---|---|---|---|---|---|---|---|---|---|---|
type | Event type | String | Y | Fixed to META_EVENT | ||||||
subtype | Type of operation subject | String | Y | Fixed to GRANT_USER_DOMAIN | ||||||
operation | Specific operation | String | Y | AUTH - Authorize a User domain(App) CANCEL_AUTH - Deauthorize a User domain(App) | ||||||
userDomain | User domain(App) | String | Y | |||||||
userDomainId | User domain ID | Long | Y | |||||||
createdAt | Timestamp of the operation | Long | Y | Unit: ms | ||||||
data | JSON Object | Y | App authorization details | |||||||
|
json
{
"type": "META_EVENT",
"subtype": "GRANT_USER_DOMAIN",
"operation": "AUTH",
"userDomain": "C.DM.5503.34",
"userDomainId": 12345645656456,
"createdAt": 1665280943221,
"data": {
"appName": "test"
}
}
TSL Model Release Information Change
Newly-released TSL model.
Field | Name | Type | Required | Note | ||||||
---|---|---|---|---|---|---|---|---|---|---|
subtype | Type of operation subject | String | Y | Fixed to THING_MODEL indicating that the operation subject applies to a TSL model. | ||||||
operation | Specific operation | String | Y | RELEASE- Release the TSL model | ||||||
ProductKey | PK | String | Y | |||||||
createdAt | Timestamp of the operation | Long | Y | Unit: ms | ||||||
data | String | Y | ||||||||
type | Event type | JSON Object | Y | Fixed to META_EVENT | ||||||
|
Example:
json
{
"type": "META_EVENT",
"subtype": "THING_MODEL",
"operation": "RELEASE",
"productKey": "p11374",
"operator": 26984,
"operatorType": 1,
"createdAt": 1616375484482,
"data": {
"tslJson": {
"profile": {
"version": "20210406093313373",
"productKey": "p1137H"
},
"properties": [
{
"code": "202104011545",
"dataType": "BOOL",
"desc": "",
"id": 1,
"name": "202104011545",
"specs": [
{
"dataType": "BOOL",
"name": "TRUE",
"value": "true"
},
{
"dataType": "BOOL",
"name": "FALSE",
"value": "false"
}
],
"subType": "RW",
"type": "PROPERTY"
},
{
"code": "202104011700",
"dataType": "DOUBLE",
"desc": "",
"id": 2,
"name": "202104011700",
"specs": {
"max": "2",
"min": "1",
"step": "1",
"unit": "°"
},
"subType": "RW",
"type": "PROPERTY"
},
{
"code": "202104011501",
"dataType": "TEXT",
"desc": "",
"id": 3,
"name": "202104011501",
"specs": {
"length": 123
},
"subType": "RW",
"type": "PROPERTY"
}
]
}
}
}
Terminal User Information Change
Changes in terminal user information: created, modified, or deleted.
Field | Name | Type | Required | Note | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | Event type | String | Y | Fixed to ENDUSER | ||||||||||||||||||||||||
subtype | Operation type | String | Y | USER-ADD - Add a terminal user USER-UPDATE - Update terminal user information USER-DELETE - Delete a terminal user | ||||||||||||||||||||||||
ticket | Message ID | String | Y | Unique message code | ||||||||||||||||||||||||
createdAt | Creation time | Long | Y | Timestamp of the operation. Unit: ms. | ||||||||||||||||||||||||
data | String | Y | ||||||||||||||||||||||||||
|
Example:
json
{
"ticket": "b18be821-5045-4467-801d-ca68c302dc3d",
"type": "ENDUSER",
"subtype": "USER-DELETE",
"createdAt": 1642471712433,
"data": {
"endUserId": "C1",
"endUserDomain": "C.DM.1.15"
}
}
Rule Engine Event
Rule Engine Push Information.
Field | Name | Type | Required | Note | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | Event type | String | Y | Fixed to CEP_RULE. | ||||||||||||||||||||||||||||||||||||||||||||
subtype | Subtype | String | Y | Fixed to NOTICE. | ||||||||||||||||||||||||||||||||||||||||||||
traceId | Action trace ID | String | Y | Action trace ID. | ||||||||||||||||||||||||||||||||||||||||||||
createdAt | Creation Time | Long | Y | Timestamp of the operation. Unit: ms. | ||||||||||||||||||||||||||||||||||||||||||||
data | JSON Object | Y | ||||||||||||||||||||||||||||||||||||||||||||||
|
Example:
json
{
"traceId": "1228299096116822016",
"type": "CEP_RULE",
"subtype": "NOTICE",
"createdAt": 1713249972992,
"data": {
"extra": "{\"key\",\"value\"}",
"raw": {
"ticket": "1228217775206039552",
"productKey": "p113C1",
"deviceKey": "8686202300000001",
"type": "MATTR",
"createdAt": 1713249972997,
"attrs": {
"kv": {
"Temperature": 50,
"struct": {
"date": 1690449531456
},
"array_int": [1],
"array_struct": [{
"date": "1690449531456"
}]
}
},
"events": [{
"code": "BatteryWarning",
"kv": {
"Temperature": 50,
"struct": {
"date": 1690449531456
},
"array_int": [1],
"array_struct": [{
"date": "1690449531456"
}]
}
}],
"status": {
"value": 1 // Required. 0: Device offline. 1: Device online
},
"location": {
"GCJ02": "116.4038,39.9148", // Required. Coordinates in GCJ02 (State Bureau of Surveying and Mapping), with signs (negative values indicate south latitude or west longitude). Longitude first, latitude second, separated by a comma.
"BD09": "116.4038,39.9148", // Required. Coordinates in BD09 (Baidu), with signs (negative values indicate south latitude or west longitude). Longitude first, latitude second, separated by a comma.
"WGS84": "116.4038,39.9148" // Required. Coordinates in WGS84 (GPS), with signs (negative values indicate south latitude or west longitude). Longitude first, latitude second, separated by a comma.
}
}
}
}