Forums - Zigbee custom attribute definition for zigbee color cluster

1 post / 0 new
Zigbee custom attribute definition for zigbee color cluster
akshay.b
Join Date: 2 Aug 19
Posts: 62
Posted: Thu, 2020-07-02 08:59

Hello,

We want to define a custom attribute for cluster QAPI_ZB_CL_CLUSTER_ID_COLOR_CONTROL.

we have performed following steps:

1)  Defined custom attribute in zcl_colorcontrol_demo.h file
#define QAPI_ZB_CL_COLORCONTROL_ATTR_ID_CUSTOM_XYZ 0xFFFE

2) Added this attribute list with capabilities to attribute list as below

static const qapi_ZB_CL_Attribute_t ColorControlDemoCustomAttrList[] =
{
{ QAPI_ZB_CL_COLORCONTROL_ATTR_ID_CURRENT_HUE, QAPI_ZB_CL_ATTRIBUTE_FLAG_REPORTABLE | QAPI_ZB_CL_ATTRIBUTE_FLAG_CUSTOM_READ_WRITE, QAPI_ZB_CL_DATA_TYPE_UNSIGNED_8BIT_INTEGER_E, sizeof(uint8_t), 0, 0, 0, 0xFE },
{ QAPI_ZB_CL_COLORCONTROL_ATTR_ID_CURRENT_SATURATION, QAPI_ZB_CL_ATTRIBUTE_FLAG_REPORTABLE | QAPI_ZB_CL_ATTRIBUTE_FLAG_CUSTOM_READ_WRITE, QAPI_ZB_CL_DATA_TYPE_UNSIGNED_8BIT_INTEGER_E, sizeof(uint8_t), 0, 0, 0, 0xFE },
{ QAPI_ZB_CL_COLORCONTROL_ATTR_ID_ENHANCED_CURRENT_HUE, QAPI_ZB_CL_ATTRIBUTE_FLAG_REPORTABLE | QAPI_ZB_CL_ATTRIBUTE_FLAG_CUSTOM_READ_WRITE, QAPI_ZB_CL_DATA_TYPE_UNSIGNED_16BIT_INTEGER_E, sizeof(uint16_t), 0, 0, 0, 0xFFFF },
{ QAPI_ZB_CL_COLORCONTROL_ATTR_ID_CURRENT_X, QAPI_ZB_CL_ATTRIBUTE_FLAG_REPORTABLE | QAPI_ZB_CL_ATTRIBUTE_FLAG_CUSTOM_READ_WRITE, QAPI_ZB_CL_DATA_TYPE_UNSIGNED_16BIT_INTEGER_E, sizeof(uint16_t), 0, 0, 0, 0xFEFF },
{ QAPI_ZB_CL_COLORCONTROL_ATTR_ID_CURRENT_Y, QAPI_ZB_CL_ATTRIBUTE_FLAG_REPORTABLE | QAPI_ZB_CL_ATTRIBUTE_FLAG_CUSTOM_READ_WRITE, QAPI_ZB_CL_DATA_TYPE_UNSIGNED_16BIT_INTEGER_E, sizeof(uint16_t), 0, 0, 0, 0xFEFF },
{ QAPI_ZB_CL_COLORCONTROL_ATTR_ID_COLOR_TEMP_MIREDS, QAPI_ZB_CL_ATTRIBUTE_FLAG_REPORTABLE | QAPI_ZB_CL_ATTRIBUTE_FLAG_CUSTOM_READ_WRITE, QAPI_ZB_CL_DATA_TYPE_UNSIGNED_16BIT_INTEGER_E, sizeof(uint16_t), 0, 0, 0, 0xFEFF },
QAPI_ZB_CL_COLORCONTROL_ATTR_ID_CUSTOM_XYZ , QAPI_ZB_CL_ATTRIBUTE_FLAG_REPORTABLE | QAPI_ZB_CL_ATTRIBUTE_FLAG_CUSTOM_READ_WRITE, QAPI_ZB_CL_DATA_TYPE_UNSIGNED_8BIT_INTEGER_E, sizeof(uint8_t), 0, 0, 0, 0xFE }};
 
 
 
 
Now the problem we are facing is if we send command to change hue and sat its working. 
If we send command 0xFB for QAPI_ZB_CL_COLORCONTROL_ATTR_ID_CUSTOM_XYZ attribute it shows unsupported cluster on sniffer as default response. and no callback is hit for color control.
 
What additional step i need to perform to make it work?
 
Thank you,
 
Akshaay
  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.