Switch scene
1. API Description
This API is used to switch scene.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/scene/switch-scene
- V2.5.0 and below: POST [ip]/mwapi/switch-scene
Administrator Rights | Logged-in |
---|---|
No | Yes |
2. Input Parameters
Name | Required | Type | Description |
---|---|---|---|
sceneId | Yes | Int | Scene ID, which can be obtained via Get scene list |
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
message | String | Status description |
4. Example
Switching to scene 3.
Input Example
{
"sceneId": 3
}
Output Example
{
"message": "success",
"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 |
---|---|---|
7 | MW_STATUS_INVALID_ARG | Missing required parameters |
11 | MW_STATUS_DEVICE_BUSY | In scene editing mode, operation is not allowed |
31 | MW_STATUS_NOT_PERMITTED | The App is in pairing mode, and the operation is not allowed |