Get Scene
Get details of a scene by its UUID.
Description
This action allows you to retrieve project information including:
- Scene Name
- Scene Number
- Zone Information
Request Topic
LYT/41e0d6b2-37de-43d8-a348-4ba94853b6cd/SCENE/ACTION
Request Payload
{
"version": "v1.0",
"action": "get",
"data": {
"scene_number": 56473
}
}
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 "get") |
| scene_number | number | Yes | Scene Number should be like this : data > scene_number |
Response Topic
LYT/41e0d6b2-37de-43d8-a348-4ba94853b6cd/SCENE/E/ACTION
Response Payload
Success Response
{
"message": "success",
"version": "v1.0",
"action": "get",
"data": {
"scene_name": "Night",
"scene_number": 56473,
"zone_name": "Test 1",
"zone_address": 63035,
"models": [
{ "type": "dimmer", "count": 1 },
{ "type": "switch", "count": 2 }
]
}
}
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
How to resolve:
- Verify the scene number is correct
- Check if you have the necessary permissions
- Ensure the scene exists
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. Version Error
{
"message": "error",
"message_type": {
"code": 3005,
"message": "version must be one of the following values: v1.0",
"errorCode": "CONSTRAINT_ERROR"
}
}
c. Action Error
{
"message": "error",
"message_type": {
"code": 3005,
"message": "action must be one of the following values: get, get-zones, get-nodes, get-scenes, get-groups",
"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
-
Action Constraints:
- Action must be one of: get, get-zones, get-nodes, get-scenes, get-groups
- 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 "get" as the type value
- Ensure scene number is correct
- Validate all parameters before sending
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 is valid or not |
| 3005 | CONSTRAINT_ERROR | Parameter validation failed | Check input values |