Prevent device from sleeping
1. API Description
This API is used to set to prevent the device from going into sleep mode.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/general/block-goto-sleep
- V2.5.0 and below: POST [ip]/mwapi/block-goto-sleep
| Administrator Rights | Logged-in |
|---|---|
| No | Yes |
2. Input Parameters
| Name | Required | Type | Description |
|---|---|---|---|
| block | Yes | Int | Whether to prevent sleeping 0: No 1: Yes. When Web UI is logged in, and it is set to 1, the device will not go into sleep mode. |
3. Output Parameters
| Name | Type | Description |
|---|---|---|
| status | Int | Status code |
4. Example
Setting to never sleep.
Input Example
{
"block":1
}
Output Example
{
"status": 0
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Status | Definition | Description |
|---|---|---|
| 49 | MW_STATUS_INVALID_DATA | The parameters are missing or incorrect |