ncs-zigbee - Configuration issue with custom cluster

Hi,

I write this information for the sake of completeness. I don´t need Zigbee2MQTT support from you. Instead, support with the Zigbee firmware is required.

I´m working on an open-source Zigbee environment sensor, based on an nRF54L14, and I have a problem with a customized cluster for VOC. You can find the complete repo with the firmware here:

https://github.com/Kampi/BeeLight

I use Zigbee2MQTT for the Zigbee network, and I get a configuration error when starting the service. The Zigbee2MQTT team told me that this issue is firmware-based. You can see the ticket for this problem here:

https://github.com/Koenkk/zigbee-herdsman-converters/issues/10831#issuecomment-3568319658

I don´t understand why this issue is related to the VOC cluster only, because the cluster looks basically the same. But I don´t have a deep understanding of ZBOSS and the underlying mechanism, so I need some help to understand the issue and a potential solution. The complete VOC cluster looks like this

#ifndef ZB_ZCL_BEELIGHT_VOC_MEASUREMENT_H_
#define ZB_ZCL_BEELIGHT_VOC_MEASUREMENT_H_

#include <zcl/zb_zcl_common.h>
#include <zcl/zb_zcl_commands.h>

enum zb_zcl_voc_cluster_attr_e
{
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_ID        = 0x0000,
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_ID    = 0x0001,
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_ID    = 0x0002,
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_TOLERANCE_ID    = 0x0003,
};

/** @brief Default value for VOC Measurement cluster revision global attribute */
#define ZB_ZCL_BEELIGHT_VOC_MEASUREMENT_CLUSTER_REVISION_DEFAULT             ((zb_uint16_t)0x0001U)

/** @brief MeasuredValue attribute unknown value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_UNKNOWN                   ((zb_uint16_t)0x8000)

/** @brief MinMeasuredValue attribute minimum value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_MIN_VALUE             ((zb_uint16_t)0x0000)

/** @brief MinMeasuredValue attribute maximum value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_MAX_VALUE             ((zb_uint16_t)0x2710)

/** @brief MinMeasuredValue attribute invalid value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_INVALID               ((zb_uint16_t)0x8000)

/** @brief MaxMeasuredValue attribute minimum value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_MIN_VALUE             ((zb_uint16_t)0x0000)

/** @brief MaxMeasuredValue attribute maximum value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_MAX_VALUE             ((zb_uint16_t)0x2710)

/** @brief MaxMeasuredValue attribute invalid value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_INVALID               ((zb_uint16_t)0x8000)

/** @brief Tolerance attribute minimum value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_TOLERANCE_MIN_VALUE             ((zb_uint16_t)0x0000)

/** @brief Tolerance attribute maximum value */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_TOLERANCE_MAX_VALUE             ((zb_uint16_t)0x000F)

/** @brief Default value for Value attribute */
#define ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_DEFAULT_VALUE             ((zb_uint16_t)0x0000)

#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_ID(data_ptr)          \
{                                                                                               \
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_ID,                                              \
    ZB_ZCL_ATTR_TYPE_U16,                                                                       \
    ZB_ZCL_ATTR_ACCESS_READ_ONLY | ZB_ZCL_ATTR_ACCESS_REPORTING,                                \
    (ZB_ZCL_NON_MANUFACTURER_SPECIFIC),                                                         \
    (void*) data_ptr                                                                            \
}

#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_ID(data_ptr)      \
{                                                                                               \
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_ID,                                          \
    ZB_ZCL_ATTR_TYPE_U16,                                                                       \
    ZB_ZCL_ATTR_ACCESS_READ_ONLY,                                                               \
    (ZB_ZCL_NON_MANUFACTURER_SPECIFIC),                                                         \
    (void*) data_ptr                                                                            \
}

#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_ID(data_ptr)      \
{                                                                                               \
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_ID,                                          \
    ZB_ZCL_ATTR_TYPE_U16,                                                                       \
    ZB_ZCL_ATTR_ACCESS_READ_ONLY,                                                               \
    (ZB_ZCL_NON_MANUFACTURER_SPECIFIC),                                                         \
    (void*) data_ptr                                                                            \
}

#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_TOLERANCE_ID(data_ptr)      \
{                                                                                               \
    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_TOLERANCE_ID,                                          \
    ZB_ZCL_ATTR_TYPE_U8,                                                                        \
    ZB_ZCL_ATTR_ACCESS_READ_ONLY,                                                               \
    (ZB_ZCL_NON_MANUFACTURER_SPECIFIC),                                                         \
    (void*) data_ptr                                                                            \
}

/** @brief Number of attributes mandatory for reporting in BeeLight VOC Measurement cluster */
#define ZB_ZCL_BEELIGHT_VOC_MEASUREMENT_REPORT_ATTR_COUNT 1

/** @brief Declare attribute list for BeeLight VOC Measurement cluster - server side
    @param attr_list - attribute list name
    @param value - pointer to variable to store MeasuredValue attribute
    @param min_value - pointer to variable to store MinMeasuredValue attribute
    @param max_value - pointer to variable to store MAxMeasuredValue attribute
    @param tolerance - pointer to variable to store Tolerance attribute
*/
#define ZB_ZCL_DECLARE_BEELIGHT_VOC_MEASUREMENT_ATTRIB_LIST(attr_list, value, min_value, max_value, tolerance)  \
    ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attr_list, ZB_ZCL_BEELIGHT_VOC_MEASUREMENT)               \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_ID, (value))                                \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_ID, (min_value))                        \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_ID, (max_value))                        \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_TOLERANCE_ID, (tolerance))                        \
    ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

void zb_zcl_beelight_voc_measurement_init_server(void);
void zb_zcl_beelight_voc_measurement_init_client(void);

#define ZB_ZCL_CLUSTER_ID_BEELIGHT_VOC_MEASUREMENT_SERVER_ROLE_INIT zb_zcl_beelight_voc_measurement_init_server
#define ZB_ZCL_CLUSTER_ID_BEELIGHT_VOC_MEASUREMENT_CLIENT_ROLE_INIT zb_zcl_beelight_voc_measurement_init_client

#endif /* ZB_ZCL_BEELIGHT_VOC_MEASUREMENT_H_ */

#include "zb_common.h"

#if defined (ZB_ZCL_SUPPORT_CLUSTER_BEELIGHT_VOC_MEASUREMENT)

#include "zb_zcl.h"
#include "zb_aps.h"
#include "zcl/zb_zcl_common.h"

zb_ret_t check_value_beelight_voc_measurement_server(zb_uint16_t attr_id, zb_uint8_t endpoint, zb_uint8_t *value);
void zb_zcl_beelight_voc_measurement_write_attr_hook_server(zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value, zb_uint16_t manuf_code);

void zb_zcl_beelight_voc_measurement_init_server(void)
{
    zb_zcl_add_cluster_handlers(ZB_ZCL_CLUSTER_ID_BEELIGHT_VOC_MEASUREMENT,
                                ZB_ZCL_CLUSTER_SERVER_ROLE,
                                check_value_beelight_voc_measurement_server,
                                zb_zcl_beelight_voc_measurement_write_attr_hook_server,
                                (zb_zcl_cluster_handler_t)NULL);
}

void zb_zcl_voc_measurement_init_client(void)
{
    zb_zcl_add_cluster_handlers(ZB_ZCL_CLUSTER_ID_BEELIGHT_VOC_MEASUREMENT,
                                ZB_ZCL_CLUSTER_CLIENT_ROLE,
                                (zb_zcl_cluster_check_value_t)NULL,
                                (zb_zcl_cluster_write_attr_hook_t)NULL,
                                (zb_zcl_cluster_handler_t)NULL);
}

zb_ret_t check_value_beelight_voc_measurement_server(zb_uint16_t attr_id, zb_uint8_t endpoint, zb_uint8_t *value)
{
    zb_ret_t ret = RET_OK;
    zb_int16_t val = ZB_ZCL_ATTR_GET16(value);

    TRACE_MSG(TRACE_ZCL1, "> check_value_beelight_voc_measurement, attr_id %d, val %d", (FMT__D_D, attr_id, val));

    switch (attr_id)
    {
        case ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_ID:
            if (ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_VALUE_UNKNOWN == val)
            {
                ret = RET_OK;
            }
            else
            {
                zb_zcl_attr_t *attr_desc = zb_zcl_get_attr_desc_a(endpoint,
                    ZB_ZCL_CLUSTER_ID_BEELIGHT_VOC_MEASUREMENT,
                    ZB_ZCL_CLUSTER_SERVER_ROLE,
                    ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_ID);
                ZB_ASSERT(attr_desc);

                ret = (ZB_ZCL_GET_ATTRIBUTE_VAL_16(attr_desc) == ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_INVALID ||
                    ZB_ZCL_GET_ATTRIBUTE_VAL_16(attr_desc) <= val)
                    ? RET_OK : RET_ERROR;

                if (ret)
                {
                    attr_desc = zb_zcl_get_attr_desc_a(endpoint,
                        ZB_ZCL_CLUSTER_ID_BEELIGHT_VOC_MEASUREMENT,
                        ZB_ZCL_CLUSTER_SERVER_ROLE,
                        ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_ID);
                    ZB_ASSERT(attr_desc);

                    ret = ZB_ZCL_GET_ATTRIBUTE_VAL_16(attr_desc) == ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_INVALID ||
                            val <= ZB_ZCL_GET_ATTRIBUTE_VAL_16(attr_desc)
                        ? RET_OK : RET_ERROR;
                }
            }
            break;

        case ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_ID:
            ret = ((ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_MIN_VALUE <= val) &&
                    (val <= ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_MAX_VALUE)) ||
                    (ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MIN_VALUE_INVALID == val)
                    ? RET_OK : RET_ERROR;
            break;

        case ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_ID:
            ret = ( (ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_MIN_VALUE <= ZB_ZCL_ATTR_GET16(value)) &&
                    (ZB_ZCL_ATTR_GET16(value) <= ZB_ZCL_ATTR_BEELIGHT_VOC_MEASUREMENT_MAX_VALUE_MAX_VALUE) )
                    ? RET_OK : RET_ERROR;
            break;

        default:
            break;
    }

    TRACE_MSG(TRACE_ZCL1, "< check_value_beelight_voc_measurement ret %hd", (FMT__H, ret));

    return ret;
}

void zb_zcl_beelight_voc_measurement_write_attr_hook_server(zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value, zb_uint16_t manuf_code)
{
    ZVUNUSED(new_value);
    ZVUNUSED(endpoint);
    ZVUNUSED(manuf_code);
    ZVUNUSED(attr_id);

    TRACE_MSG(TRACE_ZCL1, ">> zb_zcl_beelight_voc_measurement_write_attr_hook endpoint %hd, attr_id 0x%x, manuf_code 0x%x",
                (FMT__H_D_D, endpoint, attr_id, manuf_code));

    /* All attributes in this cluster are read-only. Do nothing */

    TRACE_MSG(TRACE_ZCL1, "<< zb_zcl_beelight_voc_measurement_write_attr_hook", (FMT__0));
}

#endif /* ZB_ZCL_SUPPORT_CLUSTER_VOC_MEASUREMENT */

As far as I understand the error message, the error happens somewhere during the configuration of this cluster. Where does this configuration happen and how can I enable debug outputs to see the issue in the firmware? Or is something wrong with the cluster definition (it´s based on the temperature measurement cluster). The current firmware doesn´t output any Zigbee-related errors yet.

Parents Reply
  • Hello,

    The picture you tried to upload didn't load properly. Can you please try to upload it again?

    Is there some way for me to reproduce what you are seeing using some DKs, without a 3rd party Zigbee coordinator? Are you able to reproduce it using the ncs-zigbee\samples\shell, and try to do the same that your zigbee coordinator is doing? 

    Best regards,

    Edvin

Children
  • Hi Edvin,

    I will try it with the NCS Zigbee Shell on my nRF54L15 DK and my sensor. I get this output during the first test of the shell sample:

    uart:~$ bdb start
    Started router
    Done
    [00:00:04.469,697] <inf> zigbee_app_utils: Production configuration is not present or invalid (status: -1)
    [00:00:04.469,918] <inf> zigbee_app_utils: Zigbee stack initialized
    [00:00:04.471,944] <inf> zigbee_app_utils: Device started for the first time
    [00:00:04.471,952] <inf> zigbee_app_utils: Start network steering
    [00:00:04.471,959] <inf> zigbee_app_utils: Started network rejoin procedure.
    [00:00:08.167,488] <inf> zigbee_app_utils: Network steering was not successful (status: -1)
    [00:00:12.831,348] <inf> zigbee_app_utils: Network steering was not successful (status: -1)
    [00:00:19.488,889] <inf> zigbee_app_utils: Network steering was not successful (status: -1)
    [00:00:30.138,843] <inf> zigbee_app_utils: Network steering was not successful (status: -1)
    [00:00:48.788,114] <inf> zigbee_app_utils: Network steering was not successful (status: -1)
    

    And I flashed the Zigbee config before by running

    nrfjprog --program zigbee_config.hex --verify

    With this config

    # Enable channel 11 and 16
    channel_mask: 0x10800
    
    # You can add an installation code here
    # NOTE: This code must be added to the Zigbee network too!
    #install_code: 83FED3407A939723A5C639B26916D505
    
    # The Zigbee device address
    extended_address: 86D79AC5BAE41F11
    
    tx_power: 0
    
    # Use this to pass specific data to the application
    #app_data: 01ABCD
    

    Is there anything special to take care of when using this config file, or why isn´t the MCU using this config?

  • Hi  ,

    I´ve tested a bit further with my nRF54L15 DK because my nRF5340 has the same issue. I must modify my project to support the regular nRF54DK so I decided to play around with the light bulb example with Zigbee2MQTT. The example is working without issues in a basic installation Zigbee2Mqtt and then I added the temperature cluster

    /*
     * Copyright (c) 2024 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
     */
    
    #ifndef ZB_DIMMABLE_LIGHT_H
    #define ZB_DIMMABLE_LIGHT_H 1
    
    /**
     *  @defgroup ZB_DEFINE_DEVICE_DIMMABLE_LIGHT Dimmable Light
     *  @{
     *  @details
     *      - @ref ZB_ZCL_BASIC \n
     *      - @ref ZB_ZCL_IDENTIFY \n
     *      - @ref ZB_ZCL_SCENES \n
     *      - @ref ZB_ZCL_GROUPS \n
     *      - @ref ZB_ZCL_ON_OFF \n
     *      - @ref ZB_ZCL_LEVEL_CONTROL
     */
    
    /** Dimmable Light Device ID */
    #define ZB_DIMMABLE_LIGHT_DEVICE_ID 0x0101
    
    /** Dimmable light device version */
    #define ZB_DEVICE_VER_DIMMABLE_LIGHT 1
    
    /** @cond internals_doc */
    
    /** Dimmable Light IN (server) clusters number */
    #define ZB_DIMMABLE_LIGHT_IN_CLUSTER_NUM 7
    
    /** Dimmable Light OUT (client) clusters number */
    #define ZB_DIMMABLE_LIGHT_OUT_CLUSTER_NUM 0
    
    /** Dimmable light total (IN+OUT) cluster number */
    #define ZB_DIMMABLE_LIGHT_CLUSTER_NUM \
    	(ZB_DIMMABLE_LIGHT_IN_CLUSTER_NUM + ZB_DIMMABLE_LIGHT_OUT_CLUSTER_NUM)
    
    /** Number of attribute for reporting on Dimmable Light device */
    #define ZB_DIMMABLE_LIGHT_REPORT_ATTR_COUNT \
    	(ZB_ZCL_ON_OFF_REPORT_ATTR_COUNT + ZB_ZCL_LEVEL_CONTROL_REPORT_ATTR_COUNT)
    
    /** Continuous value change attribute count */
    #define ZB_DIMMABLE_LIGHT_CVC_ATTR_COUNT 1
    
    /** @endcond */ /* internals_doc */
    
    /**
     * @brief Declare cluster list for Dimmable Light device
     * @param cluster_list_name - cluster list variable name
     * @param basic_attr_list - attribute list for Basic cluster
     * @param identify_attr_list - attribute list for Identify cluster
     * @param groups_attr_list - attribute list for Groups cluster
     * @param scenes_attr_list - attribute list for Scenes cluster
     * @param on_off_attr_list - attribute list for On/Off cluster
     * @param level_control_attr_list - attribute list for Level Control cluster
     */
    #define ZB_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST(					   \
    	cluster_list_name,							   \
    	basic_attr_list,							   \
    	identify_attr_list,							   \
    	groups_attr_list,							   \
    	scenes_attr_list,							   \
    	on_off_attr_list,							   \
    	level_control_attr_list,						   \
        temp_sensor_attr_list)						   \
    	zb_zcl_cluster_desc_t cluster_list_name[] =				   \
    	{									   \
    		ZB_ZCL_CLUSTER_DESC(						   \
    			ZB_ZCL_CLUSTER_ID_IDENTIFY,				   \
    			ZB_ZCL_ARRAY_SIZE(identify_attr_list, zb_zcl_attr_t),	   \
    			(identify_attr_list),					   \
    			ZB_ZCL_CLUSTER_SERVER_ROLE,				   \
    			ZB_ZCL_MANUF_CODE_INVALID				   \
    		),								   \
    		ZB_ZCL_CLUSTER_DESC(						   \
    			ZB_ZCL_CLUSTER_ID_BASIC,				   \
    			ZB_ZCL_ARRAY_SIZE(basic_attr_list, zb_zcl_attr_t),	   \
    			(basic_attr_list),					   \
    			ZB_ZCL_CLUSTER_SERVER_ROLE,				   \
    			ZB_ZCL_MANUF_CODE_INVALID				   \
    		),								   \
    		ZB_ZCL_CLUSTER_DESC(						   \
    			ZB_ZCL_CLUSTER_ID_SCENES,				   \
    			ZB_ZCL_ARRAY_SIZE(scenes_attr_list, zb_zcl_attr_t),	   \
    			(scenes_attr_list),					   \
    			ZB_ZCL_CLUSTER_SERVER_ROLE,				   \
    			ZB_ZCL_MANUF_CODE_INVALID				   \
    		),								   \
    		ZB_ZCL_CLUSTER_DESC(						   \
    			ZB_ZCL_CLUSTER_ID_GROUPS,				   \
    			ZB_ZCL_ARRAY_SIZE(groups_attr_list, zb_zcl_attr_t),	   \
    			(groups_attr_list),					   \
    			ZB_ZCL_CLUSTER_SERVER_ROLE,				   \
    			ZB_ZCL_MANUF_CODE_INVALID				   \
    		),								   \
    		ZB_ZCL_CLUSTER_DESC(						   \
    			ZB_ZCL_CLUSTER_ID_ON_OFF,				   \
    			ZB_ZCL_ARRAY_SIZE(on_off_attr_list, zb_zcl_attr_t),	   \
    			(on_off_attr_list),					   \
    			ZB_ZCL_CLUSTER_SERVER_ROLE,				   \
    			ZB_ZCL_MANUF_CODE_INVALID				   \
    		),								   \
    		ZB_ZCL_CLUSTER_DESC(						   \
    			ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL,			   \
    			ZB_ZCL_ARRAY_SIZE(level_control_attr_list, zb_zcl_attr_t), \
    			(level_control_attr_list),				   \
    			ZB_ZCL_CLUSTER_SERVER_ROLE,				   \
    			ZB_ZCL_MANUF_CODE_INVALID				   \
    		),								   \
        	ZB_ZCL_CLUSTER_DESC( \
    			ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT, \
    			ZB_ZCL_ARRAY_SIZE(temp_sensor_attr_list, zb_zcl_attr_t), \
    			(temp_sensor_attr_list), \
    			ZB_ZCL_CLUSTER_SERVER_ROLE, \
    			ZB_ZCL_MANUF_CODE_INVALID \
        )										\
    }
    
    
    /** @cond internals_doc */
    /**
     * @brief Declare simple descriptor for Dimmable Light device
     * @param ep_name - endpoint variable name
     * @param ep_id - endpoint ID
     * @param in_clust_num - number of supported input clusters
     * @param out_clust_num - number of supported output clusters
     */
    #define ZB_ZCL_DECLARE_HA_DIMMABLE_LIGHT_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
    	ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num);					  \
    	ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name =		  \
    	{											  \
    		ep_id,										  \
    		ZB_AF_HA_PROFILE_ID,								  \
    		ZB_DIMMABLE_LIGHT_DEVICE_ID,							  \
    		ZB_DEVICE_VER_DIMMABLE_LIGHT,							  \
    		0,										  \
    		in_clust_num,									  \
    		out_clust_num,									  \
    		{										  \
    			ZB_ZCL_CLUSTER_ID_BASIC,						  \
    			ZB_ZCL_CLUSTER_ID_IDENTIFY,						  \
    			ZB_ZCL_CLUSTER_ID_SCENES,						  \
    			ZB_ZCL_CLUSTER_ID_GROUPS,						  \
    			ZB_ZCL_CLUSTER_ID_ON_OFF,						  \
    			ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL,					  \
        		ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT, \
    		}										  \
    	}
    
    /** @endcond */ /* internals_doc */
    
    /**
     * @brief Declare endpoint for Dimmable Light device
     * @param ep_name - endpoint variable name
     * @param ep_id - endpoint ID
     * @param cluster_list - endpoint cluster list
     */
    #define ZB_DECLARE_DIMMABLE_LIGHT_EP(ep_name, ep_id, cluster_list)		      \
    	ZB_ZCL_DECLARE_HA_DIMMABLE_LIGHT_SIMPLE_DESC(ep_name, ep_id,		      \
    		ZB_DIMMABLE_LIGHT_IN_CLUSTER_NUM, ZB_DIMMABLE_LIGHT_OUT_CLUSTER_NUM); \
    	ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## ep_name,		      \
    		ZB_DIMMABLE_LIGHT_REPORT_ATTR_COUNT);				      \
    	ZBOSS_DEVICE_DECLARE_LEVEL_CONTROL_CTX(cvc_alarm_info## ep_name,	      \
    		ZB_DIMMABLE_LIGHT_CVC_ATTR_COUNT);				      \
    	ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID,	      \
    		0,								      \
    		NULL,								      \
    		ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
    			(zb_af_simple_desc_1_1_t *)&simple_desc_## ep_name,	      \
    			ZB_DIMMABLE_LIGHT_REPORT_ATTR_COUNT,			      \
    			reporting_info## ep_name,				      \
    			ZB_DIMMABLE_LIGHT_CVC_ATTR_COUNT,			      \
    			cvc_alarm_info## ep_name)
    
    /** @} */
    
    #endif /* ZB_DIMMABLE_LIGHT_H */
    

    ZB_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST(
    	dimmable_light_clusters,
    	basic_attr_list,
    	identify_attr_list,
    	groups_attr_list,
    	scenes_attr_list,
    	on_off_attr_list,
    	level_control_attr_list,
        temp_sensor_attr_list);

    I get the same error when adding a report interval:

    [3.3.2026, 10:43:56] z2m: Request 'zigbee2mqtt/bridge/request/device/reporting/configure' failed with error: 'ZCL command 0x86d79ac5bae41fa3/10 msTemperatureMeasurement.configReport([{"attribute":"measuredValue","minimumReportInterval":60,"maximumReportInterval":3600,"reportableChange":0}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Status 'FAILURE')'

    So I guess it´s the same reason.

    Additional question:
    How should the firmware handle a periodic update when not using the report intervals? Just waiting x second and then publishing the new value?

    Additional informations:
    I´ve checked the Zigbee Weather Station example:

    https://github.com/nrfconnect/sdk-nrf/blob/v2.9.2/applications/zigbee_weather_station/src/main.c
    https://docs.nordicsemi.com/bundle/ncs-2.6.3/page/nrf/applications/zigbee_weather_station/README.html

    I´m a bit more confused because this project uses the same temperature cluster as I use in my modified light bulb but the documentation says that it´s possible to add a binding for periodic notifications.

    So I have to test my sensor with the nRF54L15DK and the Shell application to make sure to fix everything in my project. This leads back to the question why the shell example is complaining about a missing configuration, even if I upload it.

  • Hello,

    Please check how to use the zigbee shell sample here:

    https://docs.nordicsemi.com/bundle/addon-zigbee-r23-latest/page/lib/shell.html#lib-zigbee-shell

    The reason it failed was because you didn't specify what role it was supposed to use.

    Run these commands first:

    bdb role zc (this means "zigbee coordinator". Use bdb role zr for "zigbee router")

    bdb channel 21 (or whatever channel you want to use)

    bdb start.

    See if you can replicate the behavior using the zigbee shell as the coordinator. Then it is easier to say what it is that the Z2M integration tries to do, that is not supported. 

    Initially, we don't support Z2M, but perhaps I can understand what is failing if I can reproduce the issue you are seeing using something that we do support.

    Best regards,

    Edvin

  • Hi Edvin,

    thanks. I found this article already, but I missed the channel command for some reason. I also figured out that the shell example doesn´t work well on the nRF54 because the UART drops characters, etc. I fixed it by using a slower baud rate. Maybe you want to take the issue with you for one of your collegues.

  • Hi  

    I got the shell running and tested my application.

    Shell:

    Runs on nRF5340DK with the following commands

    nvram disable
    -> Done
    bdb role zc
    -> Done
    bdb channel 11
    -> Done
    bdb start
    -> Done
    
    [01:00:26.796,112] <inf> zigbee_app_utils: Device update received (short: 0x98e5, long: 86d79ac5bae41fa3, status: 1)
    

    Then I created a binding for the IAQ, VOC and CO2 clusters without issue

    zdo bind on 86d79ac5bae41fa3 10 f4ce36b2d4c06ca0 64 0x1A0A 0x98e5
    -> Done
    zdo bind on 86d79ac5bae41fa3 10 f4ce36b2d4c06ca0 64 0x1A0B 0x98e5
    -> Done
    zdo bind on 86d79ac5bae41fa3 10 f4ce36b2d4c06ca0 64 0x1A0C 0x98e5
    -> Done

    And I can also read the clusters

    uart:~$ zcl attr read 0x98e5 10 0x1A0A 0x0104 0x0000
    ID: 0 Type: 21 Value: 50
    Done
    [01:10:50.024,078] <inf> zigbee.eprxzcl: Received ZCL command (3): src_addr=0x98e5(short) src_ep=10 dst_ep=64 cluster_id=0x1a0a profile_id=0x0104 cmd_dir=1 common_cmd=1 cmd_id=0x01 cmd_seq=3 disable_def_resp=1 manuf_code=void payload=[000000213200] (3)
    uart:~$ zcl attr read 0x98e5 10 0x1A0B 0x0104 0x0000
    ID: 0 Type: 21 Value: 0
    Done
    [01:10:55.334,350] <inf> zigbee.eprxzcl: Received ZCL command (4): src_addr=0x98e5(short) src_ep=10 dst_ep=64 cluster_id=0x1a0b profile_id=0x0104 cmd_dir=1 common_cmd=1 cmd_id=0x01 cmd_seq=4 disable_def_resp=1 manuf_code=void payload=[000000210000] (4)
    uart:~$ zcl attr read 0x98e5 10 0x1A0C 0x0104 0x0000
    ID: 0 Type: 21 Value: 500
    Done
    [01:11:00.429,870] <inf> zigbee.eprxzcl: Received ZCL command (5): src_addr=0x98e5(short) src_ep=10 dst_ep=64 cluster_id=0x1a0c profile_id=0x0104 cmd_dir=1 common_cmd=1 cmd_id=0x01 cmd_seq=5 disable_def_resp=1 manuf_code=void payload=[00000021f401] (5)
    uart:~$

    But I can´t create reporting for the VOC cluster (33 for uint16_t)

    uart:~$ zcl subscribe on 0x98e5 10 0x1A0B 0x0104 0x00 16 5 20
    Error: Unable to configure attribute 0 reporting. Status: 141
    
    Error: One or more attributes reporting were not configured successfully[01:32:32.295,776] <inf> zigbee.eprxzcl: Received ZCL command (9): src_addr=0x98e5(short) src_ep=10 dst_ep=64 cluster_id=0x1a0b profile_id=0x0104 cmd_dir=1 common_cmd=1 cmd_id=0x07 cmd_seq=9 disable_def_resp=1 manuf_code=void payload=[8d000000] (9)
    uart:~$ zcl subscribe on 0x98e5 10 0x1A0B 0x0104 0x00 33 5 20
    Error: Unable to configure attribute 0 reporting. Status: 1
    

Related