Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Zigbee - Power On Behaviour

Hi,

Has SDK V2.3.0 implemented the following ZCL power on behaviour commands? How do I add them to the Zigbee Light Bulb or Zigbee Template examples?

Cluster Command Attribute
On/Off (0x0006) Write Attributes (0x02) StartUpOnOff (0x4003)
Color Control (0x0300) Write Attributes (0x02) Startup Color Temperature (0x4010)
Level Control (0x0008) Write Attributes (0x02) Startup Level (0x4000)

There are other commands I would like to find. If I only know the hex IDs for the clusters and commands, how would I go about finding them in the SDK?

Where would I add missing commands, if any?

Kind regards,
Dan

  • Hi, 

    The attributes are supported in the SDK. You can find them here: 

    We do not have implementations on the local actions the device will take when receiving a write attributes command for these attributes, but this is something the customer can implement themselves.  The light bulb sample is a good example to look at for how to do this. 

    In zcl_device_cb(), device_cb_id (used in the switch expression) is ZB_ZCL_SET_ATTR_VALUE_CB_ID when a device receives a write attributes command. So they can use this, check the cluster ID and attr ID, and then add what they want the device to do when the attributes have changed. 

    ...
    case ZB_ZCL_SET_ATTR_VALUE_CB_ID:
        cluster_id = device_cb_param->cb_param.
                    set_attr_value_param.cluster_id;
        attr_id = device_cb_param->cb_param.
                set_attr_value_param.attr_id;
        if (cluster_id == ZB_ZCL_CLUSTER_ID_ON_OFF) {
            if (attr_id == ZB_ZCL_ATTR_ON_OFF_START_UP_ON_OFF) {
                // Do something        }
        }
    ...

    Regards,
    Amanda H.

Related