多協議接入 產品介紹 快速入門 用戶指南 開發指南
EDP TCP透傳 MQTT Modbus HTTP
常見問題

查詢設備詳情

請求方式:GET

URL: http://api.onenet.hk.chinamobile.com/devices/device_id

device_id:需要替換為設備lD

返回參數

參數名稱 格式 說明
errno int 調用錯誤碼,為0表示調用成功
error string 錯誤描述,為“succ”表示調用成功
data json 介面調用成功之後返回的設備相關信息,見data描述表
data描述表
參數名稱 格式 說明
protocol string 設備接入協議
create_time string 設備創建時間,北京時間
online bool 設備在線狀態
id string 設備ID
auth_info string 設備鑒權信息,對應設備註冊介面中的“sn”或者“mac”參數
title string 設備名
desc string 設備描述
tags array-string 設備標籤
location json 設備位置座標信息,以經緯度鍵值對表示:{“lon”:xx,“lat”:xx}
other json 其他設備自訂信息,以鍵值對格式表示,見示例
datastreams array-json 設備數據流信息的json陣列,見datastreams 描述表
datastreams描述表
參數名稱 格式 說明
id string 數據流名稱
create_time string 數據流創建時間,北京時間
unit string Unit (MW)
unit_symbol string 單位符號

返回示例

{
    "errno": 0,
    "data": {
        "protocol": "DTU",
        "other": {
            "version": "1.0.0",
            "manufacturer": "china mobile"
        },
        "create_time": "2018-07-04 17:43:11",
        "online": false,
        "location": {
            "lat": 23.54,
            "lon": 109
        },
        "id": "35282992",
        "auth_info": "tes01235n82105",
        "datastreams": [{
            "unit": "",
            "id": "1",
            "unit_symbol": "",
            "create_time": "2018-07-04 17:43:11"
        }],
        "title": "test_device",
        "desc": "test_desc",
        "tags": ["china", "mobile"]
    },
    "error": "succ"
}

个搜索结果,搜索内容 “

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