Skip to content

Commit 4cab73f

Browse files
committed
Merge branch 'release/esp-zigbee-sdk-v1.6.7' into 'main'
release/esp-zigbee-sdk-v1.6.7(0166821f) Closes TZ-1938, TZ-1929, TZ-1989, and TZ-1991 See merge request espressif/esp-zigbee-sdk!205
2 parents d2fbe21 + 151ccd7 commit 4cab73f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+495
-27
lines changed

RELEASE_NOTES.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Espressif Zigbee SDK Release Notes
22

3+
## 29-Aug-2025
4+
1.6.7 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.3.2
5+
6+
### Features
7+
- Added support for ZCL Alarms Cluster
8+
- Added support for ZCL Device temperature Configuration Cluster
9+
- Added support for the `ESP_ZB_ZCL_ATTR_COLOR_CONTROL_DRIFT_COMPENSATION_ID` and `ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COMPENSATION_TEXT_ID` attributes in `esp_zb_color_control_cluster_add_attr()`
10+
- Added support for the `ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_POWER_FACTOR_ID` attribute in `esp_zb_electrical_meas_cluster_add_attr()`
11+
- Added `esp_zb_zcl_scenes_table_set_size()` to configure the capacity of scene table in ZCL scenes cluster
12+
13+
### Bug Fixes
14+
- Corrected the document for `ESP_ZB_NLME_STATUS_INDICATION`, `ESP_ZB_BDB_SIGNAL_TC_REJOIN_DONE`, and `ESP_ZB_NWK_SIGNAL_PERMIT_JOIN_STATUS` application signals.
15+
- Corrected the attribute type and access in `esp_zb_xxx_cluster_add_attr()`.
16+
- Fixed the ambiguous definition of `app_cluster_list`, clarifying it as a dynamic array of input and output cluster IDs
17+
- Fixed a link issue when using ZCL multistate input cluster
18+
- Fixed the incorrect check of the `present_value` attribute in the ZCL Multistate Input, Output, and Value clusters when it is written.
19+
- Fixed a crash that occurred when an attribute with an extremely large value was reported via `esp_zb_zcl_report_attr_cmd_req()`.
20+
- Fixed a crash that occurred when the stack handled a manufacturer-specific command with a unrecognized payload.
21+
22+
### Changes
23+
- Updated esp-zigbee-lib to v1.6.7
24+
25+
326
## 25-Jul-2025
427
1.6.6 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.3.2
528

components/esp-zigbee-console/src/zb_data/zcl.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,28 @@ typedef struct esp_zcl_cluster_fn_s {
7474
const static esp_zcl_cluster_fn_t s_cluster_fn_table[] = {
7575
CLUSTER_FN_ENTRY(basic, ESP_ZB_ZCL_CLUSTER_ID_BASIC),
7676
CLUSTER_FN_ENTRY(power_config, ESP_ZB_ZCL_CLUSTER_ID_POWER_CONFIG),
77-
CLUSTER_NON_SUPPORT_FN_ENTRY(device_temp_config, ESP_ZB_ZCL_CLUSTER_ID_DEVICE_TEMP_CONFIG),
77+
CLUSTER_FN_ENTRY(device_temp_config, ESP_ZB_ZCL_CLUSTER_ID_DEVICE_TEMP_CONFIG),
7878
CLUSTER_FN_ENTRY(identify, ESP_ZB_ZCL_CLUSTER_ID_IDENTIFY),
7979
CLUSTER_FN_ENTRY(groups, ESP_ZB_ZCL_CLUSTER_ID_GROUPS),
8080
CLUSTER_FN_ENTRY(scenes, ESP_ZB_ZCL_CLUSTER_ID_SCENES),
8181
CLUSTER_FN_ENTRY(on_off, ESP_ZB_ZCL_CLUSTER_ID_ON_OFF),
8282
CLUSTER_FN_ENTRY(on_off_switch_config, ESP_ZB_ZCL_CLUSTER_ID_ON_OFF_SWITCH_CONFIG),
8383
CLUSTER_FN_ENTRY(level, ESP_ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL),
84-
CLUSTER_NON_SUPPORT_FN_ENTRY(alarms, ESP_ZB_ZCL_CLUSTER_ID_ALARMS),
84+
CLUSTER_FN_ENTRY(alarms, ESP_ZB_ZCL_CLUSTER_ID_ALARMS),
8585
CLUSTER_FN_ENTRY(time, ESP_ZB_ZCL_CLUSTER_ID_TIME),
8686
CLUSTER_NON_SUPPORT_FN_ENTRY(rssi_location, ESP_ZB_ZCL_CLUSTER_ID_RSSI_LOCATION),
8787
CLUSTER_FN_ENTRY(analog_input, ESP_ZB_ZCL_CLUSTER_ID_ANALOG_INPUT),
8888
CLUSTER_FN_ENTRY(analog_output, ESP_ZB_ZCL_CLUSTER_ID_ANALOG_OUTPUT),
8989
CLUSTER_FN_ENTRY(analog_value, ESP_ZB_ZCL_CLUSTER_ID_ANALOG_VALUE),
9090
CLUSTER_FN_ENTRY(binary_input, ESP_ZB_ZCL_CLUSTER_ID_BINARY_INPUT),
91-
CLUSTER_NON_SUPPORT_FN_ENTRY(binary_output, ESP_ZB_ZCL_CLUSTER_ID_BINARY_OUTPUT),
92-
CLUSTER_NON_SUPPORT_FN_ENTRY(binary_value, ESP_ZB_ZCL_CLUSTER_ID_BINARY_VALUE),
93-
CLUSTER_NON_SUPPORT_FN_ENTRY(multistate_input, ESP_ZB_ZCL_CLUSTER_ID_MULTI_INPUT),
94-
CLUSTER_NON_SUPPORT_FN_ENTRY(multistate_output, ESP_ZB_ZCL_CLUSTER_ID_MULTI_OUTPUT),
91+
CLUSTER_FN_ENTRY(binary_output, ESP_ZB_ZCL_CLUSTER_ID_BINARY_OUTPUT),
92+
CLUSTER_FN_ENTRY(binary_value, ESP_ZB_ZCL_CLUSTER_ID_BINARY_VALUE),
93+
CLUSTER_FN_ENTRY(multistate_input, ESP_ZB_ZCL_CLUSTER_ID_MULTI_INPUT),
94+
CLUSTER_FN_ENTRY(multistate_output, ESP_ZB_ZCL_CLUSTER_ID_MULTI_OUTPUT),
9595
CLUSTER_FN_ENTRY(multistate_value, ESP_ZB_ZCL_CLUSTER_ID_MULTI_VALUE),
9696
CLUSTER_FN_ENTRY(commissioning, ESP_ZB_ZCL_CLUSTER_ID_COMMISSIONING),
9797
CLUSTER_FN_ENTRY(ota, ESP_ZB_ZCL_CLUSTER_ID_OTA_UPGRADE),
98-
CLUSTER_NON_SUPPORT_FN_ENTRY(poll_control, ESP_ZB_ZCL_CLUSTER_ID_POLL_CONTROL),
98+
CLUSTER_FN_ENTRY(poll_control, ESP_ZB_ZCL_CLUSTER_ID_POLL_CONTROL),
9999
CLUSTER_NON_SUPPORT_FN_ENTRY(green_power, ESP_ZB_ZCL_CLUSTER_ID_GREEN_POWER), /* No API provided */
100100
CLUSTER_NON_SUPPORT_FN_ENTRY(keep_alive, ESP_ZB_ZCL_CLUSTER_ID_KEEP_ALIVE),
101101
CLUSTER_FN_ENTRY(shade_config, ESP_ZB_ZCL_CLUSTER_ID_SHADE_CONFIG),

components/esp-zigbee-lib/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.6.6"
1+
version: "1.6.7"
22
description: esp-zigbee library component
33
url: https://github.com/espressif/esp-zigbee-sdk
44
dependencies:

components/esp-zigbee-lib/include/esp_zigbee_attribute.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,34 @@ esp_err_t esp_zb_binary_value_cluster_add_attr(esp_zb_attribute_list_t *attr_lis
834834
*/
835835
esp_err_t esp_zb_poll_control_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
836836

837+
/**
838+
* @brief Add an attribute in device temperature configuration cluster.
839+
*
840+
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
841+
* @param[in] attr_id An attribute id to be added
842+
* @param[in] value_p A pointer to attribute value wants to add
843+
*
844+
* @return
845+
* - ESP_OK on success
846+
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
847+
*
848+
*/
849+
esp_err_t esp_zb_device_temp_config_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
850+
851+
/**
852+
* @brief Add an attribute in alarms cluster.
853+
*
854+
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
855+
* @param[in] attr_id An attribute id to be added
856+
* @param[in] value_p A pointer to attribute value wants to add
857+
*
858+
* @return
859+
* - ESP_OK on success
860+
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
861+
*
862+
*/
863+
esp_err_t esp_zb_alarms_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
864+
837865
#ifdef __cplusplus
838866
}
839867
#endif

components/esp-zigbee-lib/include/esp_zigbee_cluster.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,28 @@ esp_zb_attribute_list_t *esp_zb_binary_value_cluster_create(esp_zb_binary_value_
565565
*/
566566
esp_zb_attribute_list_t *esp_zb_poll_control_cluster_create(esp_zb_poll_control_cluster_cfg_t *poll_control_cfg);
567567

568+
/**
569+
* @brief Create a standard device temperature configuration attribute list
570+
*
571+
* @param[in] cfg Configuration parameters for this cluster defined by @ref esp_zb_device_temp_config_cluster_cfg_s
572+
*
573+
* @return pointer to attribute list @ref esp_zb_attribute_list_s
574+
*
575+
*/
576+
esp_zb_attribute_list_t *esp_zb_device_temp_config_cluster_create(esp_zb_device_temp_config_cluster_cfg_t *cfg);
577+
578+
/**
579+
* @brief Create a standard alarms attribute list
580+
*
581+
* If the alarm_table_size is not zero, the alarm_count attribute will be added by this function
582+
*
583+
* @param[in] cfg Configuration parameters for this cluster defined by @ref esp_zb_alarms_cluster_cfg_s
584+
*
585+
* @return pointer to attribute list @ref esp_zb_attribute_list_s
586+
*
587+
*/
588+
esp_zb_attribute_list_t *esp_zb_alarms_cluster_create(esp_zb_alarms_cluster_cfg_t *cfg);
589+
568590
/**************************************** ADD CLUSTER ***********************************/
569591
/**
570592
* @brief Add basic cluster (attribute list) in a cluster list.
@@ -1285,6 +1307,34 @@ esp_err_t esp_zb_cluster_list_add_custom_cluster(esp_zb_cluster_list_t *cluster_
12851307
*/
12861308
esp_err_t esp_zb_cluster_list_add_poll_control_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask);
12871309

1310+
/**
1311+
* @brief Add device temperature configuration cluster (attribute list) in a cluster list.
1312+
*
1313+
* @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s
1314+
* @param[in] attr_list An attribute list which wants to add
1315+
* @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t
1316+
*
1317+
* @return
1318+
* - ESP_OK on success
1319+
* - ESP_ERR_INVALID_ARG if cluster list not initialized
1320+
*
1321+
*/
1322+
esp_err_t esp_zb_cluster_list_add_device_temp_config_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask);
1323+
1324+
/**
1325+
* @brief Add device alarms (attribute list) in a cluster list.
1326+
*
1327+
* @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s
1328+
* @param[in] attr_list An attribute list which wants to add
1329+
* @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t
1330+
*
1331+
* @return
1332+
* - ESP_OK on success
1333+
* - ESP_ERR_INVALID_ARG if cluster list not initialized
1334+
*
1335+
*/
1336+
esp_err_t esp_zb_cluster_list_add_alarms_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask);
1337+
12881338
/**
12891339
* @brief Get cluster (attribute list) from a cluster list.
12901340
*

components/esp-zigbee-lib/include/esp_zigbee_type.h

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,10 @@ typedef struct esp_zb_af_simple_desc_1_1_s {
337337
uint32_t reserved: 4; /*!< Reserved */
338338
uint8_t app_input_cluster_count; /*!< Application input cluster count */
339339
uint8_t app_output_cluster_count; /*!< Application output cluster count */
340-
uint16_t app_cluster_list[2]; /*!< Application input and output cluster list */
340+
uint16_t *app_cluster_list; /*!< Pointer to an array of uint16_t cluster IDs whose total length is
341+
(app_input_cluster_count + app_output_cluster_count).
342+
Input cluster IDs start from index 0.
343+
Output cluster IDs start from index app_input_cluster_count. */
341344
} ESP_ZB_PACKED_STRUCT
342345
esp_zb_af_simple_desc_1_1_t;
343346

@@ -666,9 +669,9 @@ typedef struct esp_zb_pressure_meas_cluster_cfg_s {
666669
*
667670
*/
668671
typedef struct esp_zb_flow_meas_cluster_cfg_s {
669-
int16_t measured_value; /*!< The attribute indicates the flow from 0x0000 to 0xffff */
670-
int16_t min_value; /*!< The attribute indicates minimum value of the measured value */
671-
int16_t max_value; /*!< The attribute indicates maximum value of the measured value */
672+
uint16_t measured_value; /*!< The attribute indicates the flow from 0x0000 to 0xffff */
673+
uint16_t min_value; /*!< The attribute indicates minimum value of the measured value */
674+
uint16_t max_value; /*!< The attribute indicates maximum value of the measured value */
672675
} esp_zb_flow_meas_cluster_cfg_t;
673676

674677
/**
@@ -927,6 +930,22 @@ typedef struct esp_zb_poll_control_cluster_cfg_s {
927930
uint16_t fast_poll_timeout_max; /*!< The Poll Control Server MAY optionally provide its own maximum value for the FastPollTimeout*/
928931
} esp_zb_poll_control_cluster_cfg_t;
929932

933+
/**
934+
* @brief Zigbee standard mandatory attribute for device temperature configuration cluster
935+
*
936+
*/
937+
typedef struct esp_zb_device_temp_config_cluster_cfg_s {
938+
int16_t current_temperature; /*!< The CurrentTemperature attribute specifies the current internal temperature, in degrees Celsius. */
939+
} esp_zb_device_temp_config_cluster_cfg_t;
940+
941+
/**
942+
* @brief Zigbee standard mandatory attribute for device temperature configuration cluster
943+
*
944+
*/
945+
typedef struct esp_zb_alarms_cluster_cfg_s {
946+
uint16_t alarm_table_size; /*!< The AlarmTableSize attribute specifies the maximum number of entries that can be stored in the alarm table. */
947+
} esp_zb_alarms_cluster_cfg_t;
948+
930949
/****************** standard device config *********************/
931950
/**
932951
* @brief Zigbee HA standard on-off light device clusters.

components/esp-zigbee-lib/include/esp_zigbee_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
#endif
1616

1717
#ifndef ESP_ZB_VER_PATCH
18-
#define ESP_ZB_VER_PATCH 6
18+
#define ESP_ZB_VER_PATCH 7
1919
#endif
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
9+
#include "esp_err.h"
10+
#include "esp_zigbee_type.h"
11+
12+
#ifdef __cplusplus
13+
extern "C" {
14+
#endif
15+
16+
/** @brief Alarms cluster attribute identifiers */
17+
typedef enum esp_zb_zcl_alarms_attr_e {
18+
ESP_ZB_ZCL_ATTR_ALARMS_ALARM_COUNT_ID = 0x0000, /*!< AlarmCount attribute */
19+
ESP_ZB_ZCL_ATTR_ALARMS_ALARM_TABLE_SIZE_ID = 0xEFFE, /*!< Internal AlarmTable size attribute */
20+
ESP_ZB_ZCL_ATTR_ALARMS_ALARM_TABLE_ID = 0xEFFF, /*!< Internal AlarmTable attribute */
21+
} esp_zb_zcl_alarms_attr_t;
22+
23+
/** @brief Minimum value for AlarmCount attribute */
24+
#define ESP_ZB_ZCL_ALARMS_ALARM_COUNT_MIN_VALUE (0x0000)
25+
/** @brief Maximum value for AlarmCount attribute */
26+
#define ESP_ZB_ZCL_ALARMS_ALARM_COUNT_MAX_VALUE (0x00FF)
27+
/** @brief Default value for AlarmCount attribute */
28+
#define ESP_ZB_ZCL_ALARMS_ALARM_COUNT_DEFAULT_VALUE (0x0000)
29+
30+
/** @brief Default value for AlarmTableSize attribute */
31+
#define ESP_ZB_ZCL_ALARMS_ALARM_TABLE_SIZE_DEFAULT_VALUE (0x000F)
32+
33+
/** @brief Alarms cluster command identifiers */
34+
typedef enum esp_zb_zcl_alarms_cmd_req_e {
35+
ESP_ZB_ZCL_CMD_ALARMS_RESET_ALARM_ID = 0x00, /*!< Reset alarm command. */
36+
ESP_ZB_ZCL_CMD_ALARMS_RESET_ALL_ALARMS_ID = 0x01, /*!< Reset all alarms command. */
37+
ESP_ZB_ZCL_CMD_ALARMS_GET_ALARM_ID = 0x02, /*!< Get alarms command. */
38+
ESP_ZB_ZCL_CMD_ALARMS_RESET_ALARM_LOG_ID = 0x03 /*!< Reset alarm log command. */
39+
} esp_zb_zcl_alarms_cmd_req_t;
40+
41+
/** @brief Alarms cluster command identifiers */
42+
typedef enum esp_zb_zcl_alarms_cmd_resp_e {
43+
ESP_ZB_ZCL_CMD_ALARMS_ALARM_ID = 0x00, /*!< Alarm command. */
44+
ESP_ZB_ZCL_CMD_ALARMS_GET_ALARM_RESP_ID = 0x01, /*!< Get alarm response command. */
45+
} esp_zb_zcl_alarms_cmd_resp_t;
46+
47+
/**
48+
* @brief Alarm cluster server initialization
49+
*
50+
*/
51+
void esp_zb_zcl_alarms_init_server(void);
52+
53+
/**
54+
* @brief Alarm cluster client initialization
55+
*
56+
*/
57+
void esp_zb_zcl_alarms_init_client(void);
58+
59+
#define ESP_ZB_ZCL_CLUSTER_ID_ALARMS_SERVER_ROLE_INIT esp_zb_zcl_alarms_init_server
60+
#define ESP_ZB_ZCL_CLUSTER_ID_ALARMS_CLIENT_ROLE_INIT esp_zb_zcl_alarms_init_client
61+
62+
#ifdef __cplusplus
63+
}
64+
#endif

0 commit comments

Comments
 (0)