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
| Field | Type | Range | Description |
|---|---|---|---|
| version | string | "v1.0" | API version identifier |
| type | string | "cct" | Message type for CCT control |
| address | number | zone address | Address of the target zone |
| dimming | number | 0-100 | Brightness level in percentage |
| color_temperature | number | 0-100 | Color 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:
-
Color Temperature Constraints:
- Color Temperature value must be between 0 and 100
- Color Temperature field is missing
- Color Temperature field must be a number
-
Dimming Constraints:
- Dimming value must be between 0 and 100
- Dimming field is missing
- Dimming field must be a number
-
Version Constraints:
- Version is not exactly "v1.0"
- Version field is missing
- Version field has incorrect format
-
Type Constraints:
- Type must be "cct"
- Type field is missing
- Type field has incorrect value
-
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:
- Verify the address is correct
- Check if the zone exists in the system
- Ensure the zone is properly configured
- Use zone management API to list available zones
Error Code Summary
| Code | Error Code | Description | Solution |
|---|---|---|---|
| 3005 | CONSTRAINT_ERROR | Parameter validation failed | Check input values |
| 2005 | ZONE_NOT_FOUND | Zone not available | Verify zone exists |
| 2002 | PROJECT_NOT_FOUND | Project doesn't exist | Check project_uuid |
| 3002 | REQUEST_TIMEOUT | Request took too long | Check connectivity |