cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55: IasZone Server did not generate correct notification

DL_Weng
Associate II

Hi,

I am using Zigbee_OnOff_Router_NVM to test the opening and closing function of IasZone Server. I found that by default, the notification generated by modifying the status value is 'Report Attributes'. But according to document 'Zigbee Cluster Library', a 'Zone Status Change Notification Command' should be generated.

I also found that if the following code is commented on, it can generate the 'Zone Status Change Notification Command' notification correctly, but the status value will lose persistence.

 

  /* Allocate the attributes */
//  if (ZbZclAttrAppendList(zigbee_app_info.iaszone_server_1, zcl_iaszone_server_attr_list, ZCL_ATTR_LIST_LEN(zcl_iaszone_server_attr_list))) 
//  {
//        ZbZclClusterFree(zigbee_app_info.iaszone_server_1);
//        return ;
//  }

 

 

I want to know how to generate 'Zone Status Change Notification Command' notifications while enabling data persistence.

I provided the source code I used.

 

Thanks

DL_Weng

1 ACCEPTED SOLUTION

Accepted Solutions
Ouadi
ST Employee

Hi @DL_Weng,

Here is the update about this case :

The Zone Status is only written by the application, and reflects the current zone status from the device.

After reboot, it's expected the application should set this value to the corresponding status from the device itself. There should be no need to persist the value inside the cluster, and the persisted value may not accurately represent the current status of the device after coming back online. This is why the ZCL_ATTR_FLAG_PERSISTABLE flag should not be set using ZbZclAttrAppendList for the ZCL_IAS_ZONE_SVR_ATTR_ZONE_STATUS attribute. 

Notification remains working when no persistable flag set at the application side.

Best regards,

Ouadi

View solution in original post

2 REPLIES 2
Ouadi
ST Employee

Hello @DL_Weng,

When using ZbZclAttrAppendList API from the application side, it overrides the default definition of the attribute already done at the cluster level, this is why the write callback allowing to send Change Status notify is lost.

I have raised an internal ticket N°195832 to analyze this case and hopefully, to add the persistable flag to the attribute without overriding the default configuration.

I will come back to you asap once the ticket is analyzed. 

Best regards,

Ouadi 

Ouadi
ST Employee

Hi @DL_Weng,

Here is the update about this case :

The Zone Status is only written by the application, and reflects the current zone status from the device.

After reboot, it's expected the application should set this value to the corresponding status from the device itself. There should be no need to persist the value inside the cluster, and the persisted value may not accurately represent the current status of the device after coming back online. This is why the ZCL_ATTR_FLAG_PERSISTABLE flag should not be set using ZbZclAttrAppendList for the ZCL_IAS_ZONE_SVR_ATTR_ZONE_STATUS attribute. 

Notification remains working when no persistable flag set at the application side.

Best regards,

Ouadi