Skip to main content

Control Zone CCT Light

Control CCT lights in a zone by adjusting their lightness and color temperature.

Description

The zone CCT control allows you to manage multiple tunable white LED lights in a zone by setting:

  • Dimming level (0-100%)
  • Color temperature (0-100%, mapped to 2700K-6500K)

Example

Request Topic

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

Request Payload

Adjust both lightness and temperature:

{
"version": "v1.0",
"type": "cct",
"address": 50646,
"dimming": 10,
"color_temperature": 100
}

Adjust only lightness:

{
"version": "v1.0",
"type": "cct",
"address": 50646,
"dimming": 10
}

Adjust only temperature:

{
"version": "v1.0",
"type": "cct",
"address": 50646,
"color_temperature": 100
}

Field Descriptions

FieldTypeRangeDescription
versionstring"v1.0"API version identifier
typestring"cct"Message type for CCT control
addressnumberzone addressAddress of the target zone
dimmingnumber0-100Brightness level in percentage
color_temperaturenumber0-100Color temperature in percentage where:
- 0% = 2700K (warm white)
- 100% = 6500K (cool white)

Response Topic

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

Response Payload

Success Response

{
"version": "v1.0",
"message": "success",
"type": "cct",
"address": 50646,
"cct": {
"dimming": 40,
"color_temperature": 100
}
}

Error Handling

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

1. Constraint Error (Code: 3005)

a. Temperature Constraint:

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

b. Lightness 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
}

c. Version Constraint:

{
"message": "error",
"message_type": {
"code": 3005,
"message": "version must be one of the following values: v1.0",
"errorCode": "CONSTRAINT_ERROR"
},
"type": "cct",
"address": 50646
}

d. 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": "cct",
"address": 50646
}

e. Address Constraint:

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

Constraint errors occur in the following cases:

  1. Color Temperature Constraints:

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

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

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

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

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

Resolution:

  • Ensure color_temperature is between 0-100
  • Ensure dimming is between 0-100
  • Always use "v1.0" as the version value
  • Use "cct" 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": "cct",
"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