API文档

1. 物模型管理API

2. 物映射管理API

3. 物模型引擎API

4. 设备管理API

3.1 物模型引擎上行数据流:(以Kafka为例)
3.1.1 设备上下线消息

Topic: iotplatform.thing.status 消息体:

{
    "channelId":"数据通道ID,如MQTT的clientId",
    "thingId": "设备在IoT平台的标识符",
    "productBase":"remac-community",
    "productId":"153276300545626112",
    "status":"Online/Offline",
    "time": "1640179312"
    "extras":{
        // 这里放设备上线时厂商上报的信息
        "deviceSn":"xxxx",
        "mac": "94B97EFFEDDF",
        "on_time": "2021-12-18 14:49:28",
        "version": "1.4.1",
        "remoteIp": "xxx.xxx.xxx.xxx",
    }
}
3.1.2 设备属性变动

Topic: iotplatform.thing.property 消息体:

{
    "channelId":"数据通道ID,如MQTT的clientId",
    "thingId": "设备在IoT平台的标识符",
    "productBase":"remac-community",
    "productId":"153276300545626112",
    "time": "1640179312",
    "data":{
        // 这里放属性及其最新值
        "propertyOne":"xxx",
        "propertyTwo": true,
        "propertyThree": 65
    }
}
3.1.3 设备事件消息

Topic: iotplatform.thing.event 消息体:

{
    "channelId":"数据通道ID,如MQTT的clientId",
    "thingId": "设备在IoT平台的标识符",
    "productBase":"remac-community",
    "productId":"153276300545626112",
    "time": "1640179312"
    "event":"openRecordEvent",
    "data":{
        // 这里放事件的具体参数
        "xxx":"xxx",
        "yyy":"yyy"
    }
}
3.1.4 设备上行数据透传

非TD定义的业务数据,使用此Topic透传上报

Topic: iotplatform.thing.passthrough 消息体:

{
    "channelId":"数据通道ID,如MQTT的clientId",
    "thingId": "设备在IoT平台的标识符",
    "productBase":"remac-community",
    "productId":"153276300545626112",
    "time": "1640179312",
    "dataType":"string/base64/object/array"
    "data":{
        // 这里放事件的具体参数
        "xxx":"xxx",
        "yyy":"yyy"
    }
}
Copyright © www.remacsmart.com/ 2021 all right reserved,powered by Gitbook该文件修订时间: 2022-04-26 09:54:42

results matching ""

    No results matching ""