NB-IoT Suite Product Introduction QuickStart User Guide Device Development Guide Application Development Guide Best Practices FAQ Service agreement Update Log

Basic Message Format

Directory of this page

1.Device Data Point message

2.Device Lifecycle Event message

The rule engine has defined different fixed basic message formats for different message sources as the SQL processing basis of the rule.

1. Device Data Point message

Device data point message is formatted as follows:

ParameterPropertyTypeDescriptionExample
sysProperty messageTypestringMessage type: fixed as deviceDatapo
productIdstringProduct ID90273
appProperty deviceIdstringDevice ID102839
dataTimestampintproduction time stamp at the device data point, expressed in ms15980987429000
datastreamstringData flow name, objected_instance_resource in NBIoT3303_0_5700
body object/string/...Detailed data pointSee the example below

Json Example 1: Json Data

{
    "sysProperty": {
        "messageType": "deviceDatapoint",
        "productId": "90273",
    },
    "appProperty":{
        "deviceId": "102839",
        "dataTimestamp": 15980987429000,
        "datastream":"weather"
    },
    "body":{
        "temperature": 30,
        "humidity": "47%"
    }
}

Json Example 2: Numeric Data

{
    "sysProperty": {
        "messageType": "deviceDatapoint",
        "productId": "90273",
    },
    "appProperty":{
        "deviceId": "102839",
        "dataTimestamp": 15980987429000,
        "datastream":"temperature"
    },
    "body": 10
}

Json Example 3: String

{
    "sysProperty": {
        "messageType": "deviceDatapoint",
        "productId": "90273",
    },
    "appProperty":{
        "deviceId": "102839",
        "dataTimestamp": 15980987429000,
        "datastream":"weather"
    },
    "body":"sunny with wind"
}

2. Device lifecycle event message

The device lifecycle event message format is as follows:

ParameterPropertyTypeDescription示例
sysProperty messageTypestringMessage type: fixed as deviceLifeCycle
productIdstringProduct ID90273
appProperty deviceIdstringDevice ID102839
dataTimestampintDevice message production time stamp, millisecond15980987429000
body objectCreated, deleted, online, offline created/deleted/online/offline

Json Example

{
    "sysProperty": {
        "messageType": "deviceLifeCycle",
        "productId": "90273",
    },
    "appProperty":{
        "deviceId": "102839",
        "dataTimestamp": 15980987429000,
    },
    "body":{
        "event": "online"
    }
}

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “