亮度调节
调用说明
- 请求参数
参数 | 类型 | 说明 | 备注 |
---|---|---|---|
fun | 字符串 | /shortcut/switch/bril | 请求功能名 |
id | 字符串 | 设备id | 多个设备用逗号隔开 |
state | 浮点数 | 亮度值 | 大于0小于1 |
outtime | 布尔值 | 超时时间 | 返回数据的超时时间,单位毫秒,默认15秒 |
- httpGet请求示例
curl --request GET \
--url 'http://192.168.9.9:9911/api/shortcut/switch/bril?id=6C:8D:C1:67:04:29&state=0.1'
- httpPost请求示例
curl --request POST \
--url http://192.168.9.9:9911/api \
--header "content-type: multipart/form-data" \
--form "fun=/shortcut/switch/bril" \
--form "id=6C:8D:C1:67:04:29" \
--form "state=0.1"
- httpPost json请求示例【websocket也可发送同样json请求】
curl --request POST \
--url http://192.168.9.9:9911/api \
--header 'Content-Type: application/json' \
--data '{
"fun": "/shortcut/switch/bril",
"data": {
"id": "6C:8D:C1:67:04:29",
"state":0.1
}
}'
响应结果
{
"data": {
"code": 0,
"id": "6C:8D:C1:67:04:29",
"message": "成功"
},
"status": 200,
"message": "成功",
"msgid": 38,
"fun": "/shortcut/switch/bril"
}
- 响应data数据字段说明
无