This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Questions regarding Group List.

Hello, 

I am experimenting with setting up a network via grouping in the following manner.

Bulb_1 will be put into identification mode, and Switch_1 will detect Bulb_1 through the zb_bdb_finding_binding_initiator() function, which will return Bulb_1's short address among other things. At that point Switch_1 will call ZB_ZCL_GROUPS_GET_ADD_GROUP_REQ() Using Bulb_1's short address as the Group ID. This works perfectly and does not cause any issues, and allows Bulb_1 to be controlled by Switch_1 through the ZB_ZCL_ON_OFF_SEND_TOGGLE_REQ() Macro when sent to the Group ID (Bulb_1's short address). This also lets other devices to be added to his group using Bulb_1's short address as the group ID, allowing multiple devices to be controlled at the same time.

In the above scenario, the Group ID (Bulb_1's short address) has been added to Bulb_1's grouping table, which it checks upon receiving a groupcast message to decide if it should act on the message or not.

Let's say that a Switch_2 comes along and goes through the exact same process of identifying and detecting Bulb_1, and then adding Bulb_1's own short address to Bulb_1's grouping table, just as before. In this scenario, I have a few questions.

1. Is the bulb intelligent enough to know if it already contains the Group ID from the previous interaction with Switch_1 and thus ignore adding it again, OR will it just add it to the grouping table anyway, leading to two duplicate Group ID's in Bulb_1's grouping table?

2. Upon Bulb_1 receiving a groupcast message that contains a Group ID that is contained in the bulb's grouping table, does the bulb iterate over the list of Group IDs in the table and respond to the first match only, or does it continue to iterate over its grouping table in order to find any more possible matches to respond to?

3. I have found a useful command ZB_ZCL_GROUPS_INIT_GET_GROUP_MEMBERSHIP_REQ(). Can this command be used in the bulb itself to query its own grouping table (if yes, then how would one go about doing this?), OR can this command only be sent from an external device (e.g. Switch_1 sending it to Bulb_1).

I understand these are somewhat esoteric questions, but I would greatly appreciate any help in the matter Slight smile

Many many thanks, 
Angry Oatmeal.

  • Hi,

    If you check the Zigbee Cluster Library specification, you will find the groups cluster in chapter 3.6. In 3.6.2.4.1 you can find information about the response that is generated and sent in response to an add group command. There it states that the command has a status field that is set to one of the following: SUCCESS, DUPLICATE_EXISTS, or INSUFFICIENT_SPACE. Therefore, it should be able to see that the Group ID already exists in the Group table, and should respond with DUPLICATE_EXISTS.

    As for your other questions, I'm afraid I'm not sure, but I've asked our Zigbee team and will come back to you when I hear from them.

    Best regards,

    Marte

  • Hello,

    Thank you so much, that is very helpful and I look forward to hearing from you again.

    Thanks,
    Angry Oatmeal

  • Hi,

    I am sorry for the late response, and thank you for your patience. I heard back from the Zigbee team now:

    1. Adding the device to to the group will not create duplicated entry in the group entry.
    2. I am not sure if I understand the question correctly. There must be no entry duplicates in the Group Table, hence iterating over all of the Group Table entries is not required. See Zigbee Specification,, Table 2-25 Group Table Entry Format for more details.
    3. Does the customer want the device to read its own Group Table? Should be possible to send request to itself.
      Get buffer to put data into, use ZB_ZCL_GROUPS_INIT_GET_GROUP_MEMBERSHIP_REQ() to put initial data, then for each group call ZB_ZCL_GROUPS_ADD_ID_GET_GROUP_MEMBERSHIP_REQ() with correct Group_ID and send the packet by calling ZB_ZCL_GROUPS_SEND_GET_GROUP_MEMBERSHIP_REQ(). To parse the response command, use ZB_ZCL_GROUPS_GET_GROUP_MEMBERSHIP_RES().

    Best regards,

    Marte

  • Hi Marte, 

    Apologies for the late response on my behalf too, I was away and forgot this question had been asked. 

    Thank you very much for the response, they answer our immediate questions and allow us to move forward in that particular area. If I have any further questions, I'll open up a new post.

    Thank you,
    Angry Oatmeal

Related