Night Vision Mode Settings
Production: https://open.eye4cloud.com/{{open_id}}/open/v1/device/nightVisionMode| Field Name | Required | Type | Description |
|---|---|---|---|
| device_id | Yes | string | Device ID |
| timestamp | Yes | int64 | Timestamp in seconds |
| nonce | Yes | string | Random string, 8-20 characters |
| sign | Yes | string | See "Sign Generation Examples" for the implementation details |
| password | No | string | Device password; if omitted, the password registered for the device on the Open Platform is used |
| data | No | string | Device DATA; an empty string can be passed |
| imei | No | string | Device IMEI; an empty string can be passed |
| mode | Yes | int | Night vision mode: 1=black-and-white, 2=full-color, 3=smart night vision, 4=starlight night vision, 5=enable automatic night vision, 6=disable automatic night vision |
| fullColorMode | No | int | Required for full-color mode: 0=light-based, 1=always on, 2=custom light-on time |
| startTime | No | int | Custom start time. Required when fullColorMode=2 && mode=2; use an integer time point such as 21 or 22. |
| endTime | No | int | Custom end time. Required when fullColorMode=2 && mode=2; use an integer time point such as 21 or 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
}'
| Field Name | Type | Description |
|---|---|---|
| error_code | int | Status code: 0 indicates success; other values indicate an error |
| error_message | string | Error message; success indicates a normal response |
| data | object | {} |
| data.resp | int | Response: 1 means execution succeeded; 2 means execution failed |
| mode | []int | Night vision full-color mode options: 1 scheduled, 2 constant, 4 light-based |
Example:
{
"error_code": 0,
"error_message": "success",
"error_tips": "",
"data": {
"resp": 1
}
}