1.用途
采用Post方式,请求参数为JSON格式
2.URL
http://124.223.60.234:8181/spartan/deviceconfig/updateDeviceConfig
3.请求参数
3.1.参数示例
{
"terminalId":"DE23DFD430F046B5B9683F7593FFF8D7",
"terminalName":"xxxxxxxxxxx",
"terminalColor":"#FFFFFF",
"reportInterval": 1800,
"reTrigger":1800,
"motionSensorStatus": 1,
"motionSensorValue": 50,
"lightSensorStatus": 1,
"lightSensorValue": 1000,
"tempSensorStatus": 1,
"maxTemp": 70.0,
"minTemp": 0.0,
"maxHumidity": 100,
"minHumidity": 0,
"activeStatus": 1
}
3.2.参数说明
字段 | 类型 | 说明 | 是否必须 |
---|---|---|---|
terminalId | String | 设备唯一标识 | Y |
terminalName | String | 自定义设备名称 | Y |
terminalColor | String | 设备颜色 | Y |
reportInterval | int | 上报间隔,单位:秒 | Y |
reTrigger | int | 采样间隔,单位:秒 | Y |
motionSensorStatus | int | motion Sensor 监测状态,0:off;1:Low;2:Medium;3:High;如果是高级设置,传入:4 | Y |
motionSensorValue | int | motion Sensor 的阈值,如果是Base config 则对应(1:Low;2:Medium;3:High;4:on对应的值),范围0~255 | Y |
lightSensorStatus | int | light Sensor 监测状态,0:off;1:Low;2:Medium;3:High;如果是高级设置,传入:4 | Y |
lightSensorValue | int | light Sensor 的阈值,如果是Base config 则对应(1:Low;2:Medium;3:High;4:on对应的值),单位:lux;范围:0~10000 | Y |
tempSensorStatus | int | temp & humidity Sensor监测状态,0:off;1:Low;2:Medium;3:High;如果是高级设置,传入:4 | Y |
maxTemp | double | 最高温阈值,单位:℃,最多小数点后1位,如果是Base config 则对应(1:Low;2:Medium;3:High对应的值) | Y |
minTemp | double | 最低温阈值,单位:℃,最多小数点后1位,如果是Base config 则对应(1:Low;2:Medium;3:High对应的值) | Y |
maxHumidity | int | 最高湿阈值,单位:%;范围0~100,如果是Base config 则对应(1:Low;2:Medium;3:High对应的值) | Y |
minHumidity | int | 最低湿阈值,单位:%;范围0~100,如果是Base config 则对应(1:Low;2:Medium;3:High对应的值) | Y |
activeStatus | int | Active Tracking status;0:disabled;1:enable | Y |
4.返回参数
4.1.返回参数示例
{
"code": 200,
"message": "Operation succeeded",
"data": null
}
4.2.返回参数说明
字段 | 类型 | 说明 |
---|---|---|
code | int | 返回状态,详情参见“返回状态集” |
message | String | 返回结果描述 |
data | Object | 返回结果体 |
5.测试示例
作者:admin 创建时间:2023-11-02 17:48
最后编辑:admin 更新时间:2024-06-13 09:41
最后编辑:admin 更新时间:2024-06-13 09:41