Skip to main content

Control Zone Dimmer

Control dimmers in a zone by adjusting their brightness level.

Description

The zone dimmer control allows you to manage multiple dimmable lights in a zone by setting:

  • Dimming level (0-100%)

Example

Request Topic

LYT/41e0d6b2-37de-43d8-a348-4ba94853b6cd/ZONE/CONTROL

Request Payload

Set brightness level:

{
"version": "v1.0",
"type": "dimmer",
"address": 50646,
"dimming": 75
}

Field Descriptions

FieldTypeRangeDescription
versionstring"v1.0"API version identifier
typestring"dimmer"Message type for dimmer control
addressnumberzone addressAddress of the target zone
dimmingnumber0-100Brightness level in percentage

Response Topic

LYT/41e0d6b2-37de-43d8-a348-4ba94853b6cd/ZONE/E/STATUS

Response Payload

Success Response

{
"version": "v1.0",
"message": "success",
"type": "dimmer",
"address": 50646,
"dimmer": {
"dimming": 75
}
}

Error Handling

The API may return various error responses based on different scenarios:

1. Constraint Error (Code: 3005)

a. dimming Constraint:

{
"message": "error",
"message_type": {
"code": 3005,
"message": "dimming must not be greater than 100",
"errorCode": "CONSTRAINT_ERROR"
},
"type": "cct",
"address": 50646
}
OR
{
"message": "error",
"message_type": {
"code": 3005,
"message": "dimming must not be less than 0",
"errorCode": "CONSTRAINT_ERROR"
},
"type": "cct",
"address": 50646
}

b. Version Constraint:

{
"message": "error",
"message_type": {
"code": 3005,
"message": "version must be equal to v1.0",
"errorCode": "CONSTRAINT_ERROR"
},
"type": "dimmer",
"address": 50646
}

c. Type Constraint:

{
"message": "error",
"message_type": {
"code": 3005,
"message": "type must be one of the following values: cct, dimmer, switch, fan, curtain, rgb",
"errorCode": "CONSTRAINT_ERROR"
},
"type": "dimmer",
"address": 50646
}

d. Address Constraint:

{
"message": "error",
"message_type": {
"code": 3005,
"message": "address must be a number conforming to the specified constraints",
"errorCode": "CONSTRAINT_ERROR"
},
"type": "dimmer",
"address": 50646
}

Constraint errors occur in the following cases:

  1. Dimming Constraints:

    • Dimming value must be between 0 and 100
    • Dimming field is missing
    • Dimming field must be a number
  2. Version Constraints:

    • Version is not exactly "v1.0"
    • Version field is missing
    • Version field has incorrect format
  3. Type Constraints:

    • Type must be "dimmer"
    • Type field is missing
    • Type field has incorrect value
  4. Zone Address Constraints:

    • Zone address must be a number
    • Zone address field is missing
    • Zone address field has incorrect type

Resolution:

  • Ensure dimming is between 0-100
  • Always use "v1.0" as the version value
  • Use "dimmer" as the type value
  • Ensure address is a valid number
  • Validate all parameters before sending

2. Zone Not Found Error (Code: 2005)

{
"message": "error",
"message_type": {
"code": 2005,
"message": "Zone not found",
"errorCode": "ZONE_NOT_FOUND"
},
"type": "dimmer",
"address": 50646
}

When it occurs:

  • The specified address doesn't exist
  • Zone has been deleted
  • Zone is not configured

How to resolve:

  1. Verify the address is correct
  2. Check if the zone exists in the system
  3. Ensure the zone is properly configured
  4. Use zone management API to list available zones

Error Code Summary

CodeError CodeDescriptionSolution
3005CONSTRAINT_ERRORParameter validation failedCheck input values
2005ZONE_NOT_FOUNDZone not availableVerify zone exists
2002PROJECT_NOT_FOUNDProject doesn't existCheck project_uuid
3002REQUEST_TIMEOUTRequest took too longCheck connectivity