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
Many many thanks,
Angry Oatmeal.