Other Parts Discussed in Thread: SYSCONFIG, Z-STACK, UNIFLASH,
Good morning.
I'm developing a custom router (based on zr_genericapp) firmware acting as a multi-endpoint smart plug
Following Ryan's hints and YK's post about multiple endpoints, i successfully managed to setup 8 endpoints of "Smart plug" type (with Metering and On/Off clusters), with their attributes and callbacks (tested working).
Now i'm trying to configure reporting of the attributes OnOff and CurrentSummationDelivered for the two clusters of each of the 8 endpoints.
I'm using Zigbee2Mqtt software on a ZNP coordinator, and by its frontend i can successfully send the Configure Report messages. But i'm stuck at some kind of memory limitation which i try to explain:
if i configure just 4 endpoints, each attribute is correctly reported, and i can see a total of 8 reportAttribute messages on the frontend (4 OnOff and 4 CurrentSummationDelivered).
If i configure more than 4 endpoints, the report works only for the last endpoints attributes.
I found that i have to act on some defines in Stack/bdb/bdb_interface.h:
//Your JOB: Set this value according to your application
//Maximum size in bytes used by reportable attributes registered in any
//endpoint for the application (for analog attributes)
BDBREPORTING_MAX_ANALOG_ATTR_SIZE 8 - i suspect i have to make it at least 64 (8 (CurrentSummationDelivered attributes) times 8 bytes (uint64)), but the maximum supported is 8, what am i missing?
//Your JOB: Set this value according to your application
//Max num of cluster with reportable attributes in any endpoint
//(eg. 2 endpoints with same cluster with reportable attributes counts as 2,
//regardless of the number of reportable attributes in the cluster)
BDB_MAX_CLUSTERENDPOINTS_REPORTING 16 (8 endpoint times 2 clusters with reportable attributes) default was 5.
In this situation, after the configure report messages by the coordinator, the module only reports the last 4-5 endpoints' attributes (not regular) once, then freezes.
I also increased binding table size to 16, default was 4.
Please, any advice would be very very appreciated.
Thank you in advance.
Roberto


