Skip to main content

Edit Group

Edit group of a zone.

Description

This action allows you to edit an existing group from zone by providing the group address and new group name.

Request Topic

LYT/f7bdc7e7-1847-4c54-b1d4-64d3d0a833f7/GROUP/ACTION

Request Payload

{
"version":"v1.0",
"action": "edit",
"data": {
"group_address": 56850,
"group_name": "Updated Living Room Lights"
}
}

Request Field Descriptions

FieldTypeRequiredDescription
versionstringYesAPI version identifier (must be "v1.0")
actionstringYesAction to perform (must be "edit")
group_addressnumberYesGroup address should be like this : data > group_address
group_namestringYesNew group name should be like this : data > group_name

Response Topic

LYT/f7bdc7e7-1847-4c54-b1d4-64d3d0a833f7/GROUP/E/ACTION

Response Payload

Success Response

{
"message":"success",
"version":"v1.0",
"action":"edit",
"data":{
"group_address": 56850,
"group_name": "Updated Living Room Lights",
"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:

  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: 2034)

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

When it occurs:

  • The group address is invalid
  • The group has been deleted
  • The group doesn't belong to the specified project

How to resolve:

  1. Verify the group address is correct
  2. Check if the group exists in the project
  3. Ensure the group hasn't been already deleted

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. Group Name Error

{
"message": "error",
"message_type": {
"code": 3005,
"message": "group_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:

  1. Group Address Constraints:

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

    • Group Name must be a string
    • Group Name field should not be empty
    • Group Name field has incorrect type
  3. Action Constraints:

    • Action must be one of: get, create, delete, edit
    • Action field is missing
    • Action field has incorrect value
  4. 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:

  1. Verify the cloud is connected / activated.
  2. Enable cloud connection.
  3. Connect to the cloud.

Error Code Summary

CodeError CodeDescriptionSolution
2002PROJECT_NOT_FOUNDProject doesn't existsCheck project UUID valid or not
2034GROUP_NOT_FOUNDGroup doesn't existsCheck group address valid or not
3005CONSTRAINT_ERRORParameter validation failedCheck input values
3010CLOUD_NOT_ACTIVATEDCloud not activatedCheck cloud connection