How to operate on multiple Zigbee devices simultaneously

Hello, I have a question about how to operate on multiple Zigbee devices simultaneously. I am currently developing a hub to control and retrieve data from home appliances that support the Zigbee protocol. This hub is equipped with nRF5340 and has Flash firmware built with nRF Connect SDK. 

I am now trying to figure out how to operate multiple devices as simultaneously as possible. (The reason is to improve the UX).
For example, let's say I have 10 Hue lights in a room and I want to turn on some or all of these lights as simultaneously as possible.
Also, suppose that which lights are turned on is variable.

The first solution would be to send commands one at a time to each of the lights you want to manipulate (execute "zcl cmd" one at a time). However, this method will cause a time lag before all the lights to be operated are turned on.
The second solution is to assign the same Group ID to the devices and use Group cast, which does not cause a time lag compared to the first solution but complicates Group management because which lights to turn on is variable.

Is there any other way other than the above two?
For example, "zcl cmd" can only send one command for one device, but is it possible to define a shell that sends multiple commands for multiple devices?

I may be asking a strange question as I have little experience in development using the nRF5340, but any information you can give me would be appreciated.

  • Hi,

    I will have to look closer into this, but I'm sure we have some guides/documentation that illustrates this.

    I will get back to you when I have done so (hopefully within the 4th)

    Kind regards,
    Andreas

  • Hi,

    The first solution would be to send commands one at a time to each of the lights you want to manipulate (execute "zcl cmd" one at a time). However, this method will cause a time lag before all the lights to be operated are turned on.

    If you end up with doing this, you could attempt to implement some sort of routine that acks back to the coordinator when every bulb has received their on/off command and sync the execution, but this will, as you also state, come with a time lag between press and action.

    The second solution is to assign the same Group ID to the devices and use Group cast, which does not cause a time lag compared to the first solution but complicates Group management because which lights to turn on is variable.

    IMO assigning groups would be the way to go here. The Adding Zigbee Clusters documentation goes through how to create a general on/off device, which includes the Groups cluster

    For example, "zcl cmd" can only send one command for one device, but is it possible to define a shell that sends multiple commands for multiple devices?

    You can create groups using shell commands such as the groups add https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/zigbee/shell.html#zcl_groups_add and together with the scene selector https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/zigbee/zigbee_zcl_scenes.html create scenes that all listen to the same messages

    I'm not too familiar with the details here, but it should be relatively straight forward when using these libraries

    I know it's not a too concrete answer but I hope it helps you getting started anyways

    Kind regards,
    Andreas

Related