light switch binding with light bulb questions

  

        Hello, I can commission bulb and switch pass, then I refer this link(acl and bind) to write ACL and binding both, eventually I can use switch to control bulb!

        But I have some questions and I have not found answer in this link:

        Q1: Can I unbind the bulb and switch that has been bound before?

        Q2: I want to check multi-dev case:

                 e.g., one switch to multi bulbsabove link has mentioned below:

  • If you are using more than one light bulb device, connect all devices to the multicast group by running the following command for each device, including the light switch:

               chip-tool tests TestGroupDemoConfig --nodeId <node_ID>

  • For groupcast binding to bind the light switch with multiple light bulbs:

               chip-tool binding write binding '[{"fabricIndex": 1, "group": 257}]' <light_switch_node_ID> 1

        But how can I test one bulb to multi switches? Besides, does one switch can control different bulb? e.g. press button1 in switch control bulb A, press button2 in the same switch control bulb B

             

Parents
  • Hi,

            Q1: Can I unbind the bulb and switch that has been bound before?

    You can remove bindings by updating the binding attribute in the binding cluster.

    But how can I test one bulb to multi switches? Besides, does one switch can control different bulb? e.g. press button1 in switch control bulb A, press button2 in the same switch control bulb B

    If you want multiple light switches to control the same light bulb, you can add access control and binding for each light switch individually, just as you would for a unicast binding.

    If you want the light switch to control two different light bulbs independently, i.e., button 1 for bulb A and button 2 for bulb B, you can add access control and binding for the light switch on both light bulbs and modify the code to send the command to the different bulbs depending on which button is pressed.

    Best regards,
    Marte

Reply
  • Hi,

            Q1: Can I unbind the bulb and switch that has been bound before?

    You can remove bindings by updating the binding attribute in the binding cluster.

    But how can I test one bulb to multi switches? Besides, does one switch can control different bulb? e.g. press button1 in switch control bulb A, press button2 in the same switch control bulb B

    If you want multiple light switches to control the same light bulb, you can add access control and binding for each light switch individually, just as you would for a unicast binding.

    If you want the light switch to control two different light bulbs independently, i.e., button 1 for bulb A and button 2 for bulb B, you can add access control and binding for the light switch on both light bulbs and modify the code to send the command to the different bulbs depending on which button is pressed.

    Best regards,
    Marte

Children
No Data
Related