Skip to main content

Get Group

Get details of a group by its address.

Description

This action allows you to retrieve project information including:

  • Group Name
  • Group Address
  • Zone Information

Request Topic

LYT/41e0d6b2-37de-43d8-a348-4ba94853b6cd/GROUP/ACTION

Request Payload

{
"version": "v1.0",
"action": "get",
"data": {
"group_address": 55722
}
}

Request Field Descriptions

FieldTypeRequiredDescription
versionstringYesAPI version identifier (must be "v1.0")
actionstringYesAction to perform (must be "get")
data > group_addressnumberYesGroup Address of group
group_addressnumberYesGroup Address should be like this : data > group_address

Response Topic

LYT/41e0d6b2-37de-43d8-a348-4ba94853b6cd/GROUP/E/ACTION

Response Payload

Success Response

{
"message": "success",
"version": "v1.0",
"action": "get",
"data": {
"group_name": "Test grp 2",
"group_adress": 55722,
"zone_name": "Test 1",
"zone_address": 63035,
"models": [
{ "type": "dimmer", "count": 2 },
{ "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:

  1. Verify the project UUID is correct
  2. Check if you have the necessary permissions
  3. Ensure the project exists

2. Group Not Found Error (Code: 3006)

{
"message": "error",
"message_type": {
"code": 3006,
"message": "Group not found",
"errorCode": "GROUP_NOT_FOUND"
}
}

When it occurs:

  • The group address is invalid
  • The group has been deleted

How to resolve:

  1. Verify the group address is correct
  2. Check if you have the necessary permissions
  3. Ensure the group exists

3. Constraint Error (Code: 3005)

a. Group address Error

{
"message": "error",
"message_type": {
"code": 3005,
"message": "group_address 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",
"errorCode": "CONSTRAINT_ERROR"
}
}

Constraint errors occur in the following cases:

  1. Group Address Constraints:

    • Group Address must be a number
    • Group Address field should not be empty
    • Group Address field has incorrect type
  2. Action Constraints:

    • Action must be "get"
    • Action field is missing
    • Action field has incorrect value
  3. 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 group address is correct
  • Validate all parameters before sending

Error Code Summary

CodeError CodeDescriptionSolution
2002PROJECT_NOT_FOUNDProject doesn't existsCheck project UUID valid or not
3006GROUP_NOT_FOUNDGroup doesn't existsCheck group address is valid or not
3005CONSTRAINT_ERRORParameter validation failedCheck input values