~~~[api]
get:/index/device/variable
*int:device_id#設備ID
int:limit=15#每頁顯示數量
int:page=1#頁碼
<<<
success
{
"code": 0,
"msg": "獲取成功",
"count": 2,
"data": [{
"id": 16,
"device_id": "測試03",
"property_id": "濕度",
"SN": "98428892e146646dc9cc5308e44a4c97",
"name": "濕度傳感01",
"identifier": "Humidity",
"value": "76.2",
"unit": "%",
"desc": "濕度傳感",
"create_time": "2020-04-21 16:07:06",
"class_name": "app\\common\\model\\DeviceVariable"
}, {
"id": 15,
"device_id": "測試03",
"property_id": "溫度",
"SN": "98428892e146646dc9cc5308e44a4c97",
"name": "溫度傳感01",
"identifier": "Temperature",
"value": "22.9",
"unit": "度",
"desc": "溫度傳感",
"create_time": "2020-04-21 16:01:16",
"class_name": "app\\common\\model\\DeviceVariable"
}]
}
<<<
error
{
"code": 1,
"msg": "請先登錄"
}
~~~
| 字段 | 說明 |
| --- | --- |
| id | 變量ID |
| area | 區域分組 |
| device_id | 設備名稱 |
| name | 變量名 |
| value | 當前值 |
| unit | 單位 |