Skip to content

消息源格式

消息源格式

设备生命周期

参数 参数类型 描述
deviceIdString设备ID。
messageTypeString固定为DEVICE_STATUS。
productIdString产品ID。
tInteger毫秒时间戳。
dataObject设备生命周期数据。
data.statusString设备状态 online-上线 offline-离线。
json
{
  "deviceId": "36035863",
  "messageType": "DEVICE_STATUS",
  "productId": "11096917",
  "t": 1748758132079,
  "data": {
    "status": "offline"
  }
}

设备数据点

属性上报

参数 参数类型 描述
msgIdString消息ID。
messageTypeString固定为PROPERTY_REPORT。
deviceIdString设备ID。
productIdString产品ID。
tInteger毫秒时间戳。
dataObject设备属性上报数据。
data.CurrentTemperatureIntegerInteger。
json
{
  "msgId": "ea2d8a36-844c-4d49-8102-5e6ce7d90b",
  "messageType": "PROPERTY_REPORT",
  "deviceId": "41759677",
  "productId": "32900518",
  "t": 1748676704000,
  "data": {
    "CurrentTemperature": 30.6
  }
}

事件上报

参数 参数类型 描述
msgIdString消息ID。
messageTypeString固定为EVENT_REPORT。
deviceIdString设备ID。
productIdString产品ID。
tInteger毫秒时间戳。
dataObject设备事件上报数据。
data.ErrorObject物模型事件标识符。
data.Error.aString输出参数。
data.Error.bString输出参数。
json
{
  "t": 1748676704000,
  "msgId": "ea2d8a36-844c-4d49-8102-5e6ce7d90b",
  "deviceId": "41759677",
  "productId": "32900518",
  "messageType": "EVENT_REPORT",
  "data": {
    "Error": {
      "a": 1,
      "b": "2"
    }
  }
}