Edit scene
Edit scene of a zone.
Description
This action allows you to edit an existing scene from zone by providing the scene number and new scene name.
Request Topic
LYT/f7bdc7e7-1847-4c54-b1d4-64d3d0a833f7/SCENE/ACTION
Request Payload
{
"version":"v1.0",
"action": "edit",
"data": {
"scene_number": 56850,
"scene_name": "Good Night"
}
}
Request Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
| version | string | Yes | API version identifier (must be "v1.0") |
| action | string | Yes | Action to perform (must be "edit") |
| scene_number | number | Yes | scene number should be like this : data > scene_number |
| scene_name | string | Yes | New scene name should be like this : data > scene_name |
Response Topic
LYT/f7bdc7e7-1847-4c54-b1d4-64d3d0a833f7/SCENE/E/ACTION
Response Payload
Success Response
{
"message":"success",
"version":"v1.0",
"action":"edit",
"data":{
"scene_number": 56850,
"scene_name": "Good Night",
"zone_name": "103",
"zone_address": 65184,
"models": []
}
}
Error Handling
1. Project Not Found Error (Code: 2002)
{
"message": "error",
"message_type": {
"code": 2002,
"message": "Project not found",
"errorCode": "PROJECT_NOT_FOUND"
}
}
When it occurs:
- The project UUID is invalid
- The project has been deleted
How to resolve:
- Verify the project UUID is correct
- Check if you have the necessary permissions
- Ensure the project exists
2. Scene_NOT_FOUND Error (Code: 3007)
{
"message": "error",
"message_type": {
"code": 3007,
"message": "Scene not found",
"errorCode": "SCENE_NOT_FOUND"
}
}
When it occurs:
- The scene number is invalid
- The scene has been deleted
- The scene doesn't belong to the specified project
How to resolve:
- Verify the scene number is correct
- Check if the scene exists in the project
- Ensure the scene hasn't been already deleted
3. Constraint Error (Code: 3005)
a. Scene number Error
{
"message": "error",
"message_type": {
"code": 3005,
"message": "scene_number must be a number",
"errorCode": "CONSTRAINT_ERROR"
}
}
b. Scene Name Error
{
"message": "error",
"message_type": {
"code": 3005,
"message": "scene_name must be a string",
"errorCode": "CONSTRAINT_ERROR"
}
}
c. Version Error
{
"message": "error",
"message_type": {
"code": 3005,
"message": "version must be one of the following values: v1.0",
"errorCode": "CONSTRAINT_ERROR"
}
}
d. Action Error
{
"message": "error",
"message_type": {
"code": 3005,
"message": "action must be one of the following values: get, create, delete, edit",
"errorCode": "CONSTRAINT_ERROR"
}
}
Constraint errors occur in the following cases:
-
Scene Number Constraints:
- Scene Number must be a number
- Scene Number field should not be empty
- Scene Number field has incorrect type
-
Scene Name Constraints:
- Scene Name must be a string
- Scene Name field should not be empty
- Scene Name field has incorrect type
-
Action Constraints:
- Action must be one of: get, create, delete, edit
- Action field is missing
- Action field has incorrect value
-
Version Constraints:
- Version must be exactly "v1.0"
- Version field is missing
- Version field has incorrect format
Resolution:
- Always use "v1.0" as the version value
- Use "edit" as the action value
- Validate all parameters before sending
4. Cloud Not Activated Error (Code: 3010)
{
"message":"error",
"message_type":
{
"code":3010,
"message":"Cloud not activated",
"errorCode":"CLOUD_NOT_ACTIVATED"
}
}
When it occurs:
- The Cloud connection is deactivated
- The Cloud connection is disconnected
How to resolve:
- Verify the cloud is connected / activated.
- Enable cloud connection.
- Connect to the cloud.
Error Code Summary
| Code | Error Code | Description | Solution |
|---|---|---|---|
| 2002 | PROJECT_NOT_FOUND | Project doesn't exists | Check project UUID valid or not |
| 3007 | SCENE_NOT_FOUND | scene doesn't exists | Check scene number valid or not |
| 3005 | CONSTRAINT_ERROR | Parameter validation failed | Check input values |
| 3010 | CLOUD_NOT_ACTIVATED | Cloud not activated | Check cloud connection |