使用设备绑定码绑定对应组织

2022-07-07
暂无评分

设备请求:通过设备绑定码绑定对应组织

Topic:

thing/product/{pid}/requests

参数说明:

参数必填类型说明
tidYstring
bidYstring
methodYstringmessage类型
timestampYint13位时间戳
dataYobject
» bind_devicesYbind_devices<bind_device>
»» device_binding_codeYstring设备绑定码
»» organization_idYstring组织id
»» device_callsignYstring设备呼号
»» snYstring设备序列号
»» device_model_keyYstring产品枚举值

示例:

// topic thing/product/{pid}/requests
{
  "method":"airport_organization_bind",
  "bid":"ab1a23d2-0793-42fb-b9d2-8e4f781713e3",
  "tid":"10c38085-25b2-4192-9d67-9592a6915262",
  "timestamp":1654051026244,
  "data":{
    "bind_devices":[
      {
        "device_binding_code":"device_binding_code",
        "organization_id":"organization_id",
        "device_callsign":"dock-device-callsign",
        "sn":"dock-sn",
        "device_model_key":"3-1-0"
      },
      {
        "device_binding_code":"device_binding_code",
        "organization_id":"organization_id",
        "device_callsign":"drone-device-callsign",
        "sn":"drone-sn",
        "device_model_key":"0-67-0"
      }
    ]
  }
}

云端响应: 通过设备绑定码绑定对应组织

Topic:

thing/product/{pid}/requests_reply

参数说明:

参数必填类型说明
tidYstring
bidYstring
methodYstringmessage类型
timestampYint13位时间戳
dataYobject
» resultYint响应结果0代表正常
» outputYobject输出
»» err_infosYarray<err_info>错误信息
»»» snYstring设备序列号
»»» err_codeYint错误码

示例:

// topic  thing/product/{pid}/requests_reply
{
  "method":"airport_organization_bind",
  "tid":"123",
  "bid":"456",
  "timestamp":"1234567890123",
  "data":{
    "result":0,
    "output":{
      "err_infos":[
        {
          "sn":"dock-sn",
          "err_code":210231
        },
        {
          "sn":"drone-sn",
          "err_code":210231
        }
      ]
    }
  }
}