夜视模式设置
https://open.eye4cloud.com/{{open_id}}/open/v1/device/nightVisionMode| 字段名 | 是否必传 | 类型 | 备注 |
|---|---|---|---|
| device_id | 是 | string | 设备id |
| timestamp | 是 | int64 | 时间戳,单位:秒 |
| nonce | 是 | string | 随机字符串,8~20个字符 |
| sign | 是 | string | 具体实现方法,请参考《生成sign的示例代码》 |
| password | 否 | string | 设备密码,如果不传则使用开放平台中注册设备的密码 |
| data | 否 | string | 设备DATA,可传空字符串 |
| imei | 否 | string | 设备IMEI,可传空字符串 |
| mode | 是 | int | 夜视模式:1=黑白模式,2=全彩模式,3=智能夜视,4=星光夜视,5=开启自动夜视,6=关闭自动夜视 |
| fullColorMode | 否 | int | 全彩模式必填: 0=随光线,1=常亮,2=自定义开灯时间 |
| startTime | 否 | int | 自定义开始时间,fullColorMode=2 && mode=2 时必填,取时间点整数,如:21、22 |
| endTime | 否 | int | 自定义结束时间,fullColorMode=2 && mode=2 时必填, 取时间点整数,如:21、22 |
curl 'https://open.eye4cloud.com/{{open_id}}/open/v1/device/nightVisionMode' \
-H 'Content-Type: application/json' \
--data-raw '{
"device_id": "xxxx",
"timestamp": 1758867195,
"nonce": "",
"sign": "",
"password": "",
"mode":1
}'
| 字段名 | 类型 | 备注 |
|---|---|---|
| error_code | int | 状态码:0正常,其他异常 |
| error_message | string | 错误信息:正常为success |
| data | object | {} |
| data.resp | int | 响应结果:1=执行成功,2=执行失败 |
| mode | []int | 夜视设置,全彩模式切换功能数组 :1=定时,2=常量,4=随光线 |
示例:
{
"error_code": 0,
"error_message": "success",
"error_tips": "",
"data": {
"resp": 1
}
}