电池与 RSSI 状态
报告 the RSSI 状态 and/or Battery Level of a Device
This method does not store a history of the status; it only takes the last reported value and displays it on the platform. That is, if 3 batteries were reported in the first request and only one is reported in the second request, then it is assumed that the device now has only one battery. The same applies to RSSI. If empty arrays are sent, it will be assumed that t此处 is no battery level or RSSI record and previously reported data will be cleared.
HTTP 集成 for RSSI status and battery level使用以下结构:
POST /services/gear/DeviceIntegrationService.svc/UpdateDeviceStatus HTTP/1.1
Host: gear-dev.cloud.studio
Content-Type: application/json
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"deviceID": 1,
"battery": [
{
"type": 2,
"percentage": 30,
"voltage": 3.5
},
{
"type": 3,
"percentage": 100,
"voltage": 5
}
],
"rssi": [
{
"type": 2,
"quality": 100,
"strength": -40
}
]
}参数
| 名称 | 说明 | 数据类型 |
|---|---|---|
| accessToken | 具有更新端点信息权限的访问令牌。更多信息请参见该页面。 | text |
| deviceID | 唯一设备标识符或设备地址(格式为 [deviceAddress],例如:[device-1234])。这些值可以在设备管理页面找到。 | number |
| battery | List of statuses for the device's different batteries. One or more can be sent. Property descriptions for this parameter can be found 下方. | array |
| rssi | List of statuses for the device's different wireless connections. One or more can be sent. Property descriptions for this parameter can be found 下方. | array |
"battery" Array Parameter
In each element of this array, at least "percentage" or "voltage" must be reported. Type is mandatory.
| 名称 | 说明 | 数据类型 |
|---|---|---|
| type | Type of battery being reported. Allowed types are: 0: Unknown. If this value is sent, it will automatically be changed to 1. 1: Default. 2: Primary. 3: Secondary. 4: Backup. Types cannot be repeated in the same array. | number |
| percentage | Numeric value of the remaining battery percentage. | number |
| voltage | Numeric value of the current battery voltage. | number |
"rssi" Array Parameter
In each element of this array, at least "quality" or "strength" must be reported. Type is mandatory.
| 名称 | 说明 | 数据类型 |
|---|---|---|
| type | Represents a type of wireless technology w此处 RSSI can be measured. Allowed values are: 0: Unknown. If this value is sent, it will automatically be changed to 1. 1: Default. 2: WiFi. 3: LoRaWAN. 4: Cellular (2G/3G/4G/5G/Cat-M/NB-IoT/etc). 5: ZigBee. 6: Custom RF. Types cannot be repeated in the same array. | number |
| quality | Numeric value representing signal quality. From 0 to 100. If this value is not provided but the "strength" parameter is, this parameter's value will be auto-calculated. | number |
| strength | Numeric value representing signal strength in dBm (negative). If the provided value is positive, its sign will be changed. If this value is not provided but the "quality" parameter is, this parameter's value will be auto-calculated. | number |