Delete Group
Delete group of a zone.
Description
This action allows you to delete an existing group from zone by providing the group address.
Request Topic
LYT/f7bdc7e7-1847-4c54-b1d4-64d3d0a833f7/GROUP/ACTION
Request Payload
{
"version":"v1.0",
"action": "delete",
"data": {
"group_address": 53586
}
}
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 "delete") |
| group_address | number | Yes | Group address should be like this : data > group_address |
Response Topic
LYT/f7bdc7e7-1847-4c54-b1d4-64d3d0a833f7/GROUP/E/ACTION
Response Payload
Success Response
{
"message":"success",
"version":"v1.0",
"action":"delete",
"data":{
"group_address": 53586
}
}
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. 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:
- Verify the group address is correct
- Check if the group exists in the project
- Ensure the group hasn't been already deleted
3. Group Already Assigned Error (Code: 3017)
{
"message": "error",
"message_type": {
"code": 3017,
"message": "Group already assigned",
"errorCode": "GROUP_ALREADY_ASSIGNED"
}
}
When it occurs:
- The group is assigned to another entity that needs to be unassigned first
How to resolve:
- Unassign the group from any entities before deleting
4. Node Already Exists in Group Error (Code: 3018)
{
"message": "error",
"message_type": {
"code": 3018,
"message": "Node already exists in group",
"errorCode": "NODE_ALREADY_EXISTS_IN_GROUP"
}
}
When it occurs:
- The group contains devices that need to be removed first
How to resolve:
- Remove all devices from the group before deleting
Note: Group deletion requires the group to be completely empty of all dependencies.
5. 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, create, delete, edit",
"errorCode": "CONSTRAINT_ERROR"
}
}
Constraint errors occur in the following cases:
-
Group Address Constraints:
- Group Address must be a number
- Group Address field should not be empty
- Group Address 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 "delete" as the action value
- Validate all parameters before sending
6. 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 |
| 2034 | GROUP_NOT_FOUND | Group doesn't exists | Check group address valid or not |
| 3005 | CONSTRAINT_ERROR | Parameter validation failed | Check input values |
| 3010 | CLOUD_NOT_ACTIVATED | Cloud not activated | Check cloud connection |
| 3017 | GROUP_ALREADY_ASSIGNED | Group is assigned to another entity | Unassign group from entities first |
| 3018 | DEVICE_ALREADY_EXISTS_IN_GROUP | Group contains devices | Remove all devices from group first |