Hi,
I would like to build an end device that reports attribute data back to a concentrator that is connected to zigbee2mqtt.
I cloned zed_genericapp and added two attributes, ATTRID_BASIC_MODEL_IDENTIFIER (mandantory for zigbee2mqtt) and:
unsigned char zclGenericApp_iov_stateText[256];
...
{
ZCL_CLUSTER_ID_GENERAL_MULTISTATE_VALUE_BASIC,
{ // Attribute record
ATTRID_IOV_BASIC_STATE_TEXT,
ZCL_DATATYPE_CHAR_STR,
(ACCESS_CONTROL_READ | ACCESS_CONTROL_WRITE | ACCESS_REPORTABLE),
(void *)zclGenericApp_iov_stateText,
}
},
Also added ZCL_CLUSTER_ID_GENERAL_MULTISTATE_VALUE_BASIC to zclGenericApp_InClusterList.
With this setup I'm able to set a new value from zigbee2mqtt and request that value back.
Now I want to report that value upon key press. I modified zclGenericApp_processKey to:
if(_btn == gRightButtonHandle)
{
// Zstackapi_bdbResetLocalActionReq(appServiceTaskId);
ZStatus_t status = bdb_RepChangedAttrValue(
GENERICAPP_ENDPOINT,
ZCL_CLUSTER_ID_GENERAL_MULTISTATE_VALUE_BASIC,
ATTRID_IOV_BASIC_STATE_TEXT
);
}
In this function I'm encountering a problem,
if( FLAGS_CHECKFLAG( bdb_reportingClusterEndpointArray[indexClusterEndpoint].flags, BDBREPORTING_HASBINDING_FLAG_MASK ) == BDBREPORTING_FALSE )
is true, so no report will be sent.
What does this mean? No binding? I've done "left button" before and have a nice connection to my concentrator I think. There's Association Request/Response, Key Exchange, Node Descriptor Request/Response, though no Bind Request.
Any help is appreciated...
Regards,
Frithjof