While using Home Automation Public Profile, e.g. SampleLight/Switch demo, if I wish to transmit not just ON/OFF or LEVEL_CONTROL commands but also data strings from both (Switch to Light) and (Light to Switch), what is the best way? In HA profile, I can not access the AF_Incoming message directly with customized Clusters(like the SerialApp demo) , since ZCLProcessMessageMSG() will block them. I guess I can add a customized Attribute to the General ON/OFF cluster and use 'Report Attribute' command to send data from the server to client and use 'Write Attribute No Response Command' to send data from client to server. Am I getting it right?
In zcl_general.h, adding a new attribute-
#define ATTRID_ON_OFF_STR_DATA 0x4004
Is there any restriction on the value to be used, e.g. 0x4004?
In zcl_samplesw_data.c,
zclSampleSw_Attrs[SAMPLESW_MAX_ATTRIBUTES]=
{ ZCL_CLUSTER_ID_GEN_ON_OFF,
{ ATTR_ON_OFF,
ZCLDATATYPE_CHAR_STR,
ACCESS_CONTROL_READ | ACCESS_CONTROL_WRITE,
(void *) &zclSampleSW_OnOff_Str_Data
}
}
Where else do I need to use/add the red marked pointer? Will these modifications suffice to send a string?