Working zigbee generic, connected to network and HA
This commit is contained in:
@@ -0,0 +1,237 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/**
|
||||
* @brief Enumeration for APSDE-DATA address mode
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT = 0x0, /*!< DstAddress and DstEndpoint not present,
|
||||
only for APSDE-DATA request and confirm */
|
||||
ESP_ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT = 0x1, /*!< 16-bit group address for DstAddress; DstEndpoint not present */
|
||||
ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT = 0x2, /*!< 16-bit address for DstAddress and DstEndpoint present */
|
||||
ESP_ZB_APS_ADDR_MODE_64_ENDP_PRESENT = 0x3, /*!< 64-bit extended address for DstAddress and DstEndpoint present */
|
||||
ESP_ZB_APS_ADDR_MODE_64_PRESENT_ENDP_NOT_PRESENT = 0x4, /*!< 64-bit extended address for DstAddress, but DstEndpoint NOT present,
|
||||
only for APSDE indication */
|
||||
} esp_zb_aps_address_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration for APSDE-DATA Request TX options
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zb_apsde_tx_opt_e {
|
||||
ESP_ZB_APSDE_TX_OPT_SECURITY_ENABLED = 0x01U, /*!< Security enabled transmission */
|
||||
ESP_ZB_APSDE_TX_OPT_USE_NWK_KEY_R21OBSOLETE = 0x02U, /*!< Use NWK key (obsolete) */
|
||||
ESP_ZB_APSDE_TX_OPT_NO_LONG_ADDR = 0x02U, /*!< Extension: do not include long src/dst addresses into NWK hdr */
|
||||
ESP_ZB_APSDE_TX_OPT_ACK_TX = 0x04U, /*!< Acknowledged transmission */
|
||||
ESP_ZB_APSDE_TX_OPT_FRAG_PERMITTED = 0x08U, /*!< Fragmentation permitted */
|
||||
ESP_ZB_APSDE_TX_OPT_INC_EXT_NONCE = 0x10U, /*!< Include extended nonce in APS security frame */
|
||||
} esp_zb_apsde_tx_opt_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration the standard key type of the Transport-Key, Verify-Key and Confirm-Key
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zb_apsme_key_type_s {
|
||||
ESP_ZB_APSME_STANDARD_NETWORK_KEY = 1U, /*!< NWK key */
|
||||
ESP_ZB_APSME_APP_LINK_KEY = 3U, /*!< Application link key */
|
||||
ESP_ZB_APSME_TC_LINK_KEY = 4U, /*!< Trust-center link key */
|
||||
} esp_zb_apsme_key_type_t;
|
||||
|
||||
/**
|
||||
* @brief APSDE-DATA.request Parameters
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_apsde_data_req_s {
|
||||
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred,
|
||||
refer to esp_zb_aps_address_mode_t */
|
||||
esp_zb_addr_u dst_addr; /*!< The individual device address or group address of the entity to which the ASDU is being transferred*/
|
||||
uint8_t dst_endpoint; /*!< The number of the individual endpoint of the entity to which the ASDU is being transferred or the broadcast endpoint (0xff).*/
|
||||
uint16_t profile_id; /*!< The identifier of the profile for which this frame is intended. */
|
||||
uint16_t cluster_id; /*!< The identifier of the object for which this frame is intended. */
|
||||
uint8_t src_endpoint; /*!< The individual endpoint of the entity from which the ASDU is being transferred.*/
|
||||
uint32_t asdu_length; /*!< The number of octets comprising the ASDU to be transferred */
|
||||
uint8_t *asdu; /*!< The set of octets comprising the ASDU to be transferred. */
|
||||
uint8_t tx_options; /*!< The transmission options for the ASDU to be transferred, refer to esp_zb_apsde_tx_opt_t */
|
||||
bool use_alias; /*!< The next higher layer may use the UseAlias parameter to request alias usage by NWK layer for the current frame.*/
|
||||
uint16_t alias_src_addr; /*!< The source address to be used for this NSDU. If the use_alias is true */
|
||||
int alias_seq_num; /*!< The sequence number to be used for this NSDU. If the use_alias is true */
|
||||
uint8_t radius; /*!< The distance, in hops, that a transmitted frame will be allowed to travel through the network.*/
|
||||
} esp_zb_apsde_data_req_t;
|
||||
|
||||
/**
|
||||
* @brief APSDE-DATA.confirm Parameters
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_apsde_data_confirm_s {
|
||||
uint8_t status; /*!< The status of data confirm. 0: success, otherwise failed */
|
||||
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred,
|
||||
refer to esp_zb_aps_address_mode_t */
|
||||
esp_zb_addr_u dst_addr; /*!< The individual device address or group address of the entity to which the ASDU is being transferred.*/
|
||||
uint8_t dst_endpoint; /*!< The number of the individual endpoint of the entity to which the ASDU is being transferred or the broadcast endpoint (0xff).*/
|
||||
uint8_t src_endpoint; /*!< The individual endpoint of the entity from which the ASDU is being transferred.*/
|
||||
int tx_time; /*!< Reserved */
|
||||
uint32_t asdu_length; /*!< The length of ASDU*/
|
||||
uint8_t *asdu; /*!< Payload */
|
||||
} esp_zb_apsde_data_confirm_t;
|
||||
|
||||
/**
|
||||
* @brief APSDE-DATA.indication Parameters
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_apsde_data_ind_s {
|
||||
uint8_t status; /*!< The status of the incoming frame processing, 0: on success */
|
||||
uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU that has been received,
|
||||
refer to esp_zb_aps_address_mode_t */
|
||||
uint16_t dst_short_addr; /*!< The individual device address or group address to which the ASDU is directed.*/
|
||||
uint8_t dst_endpoint; /*!< The target endpoint on the local entity to which the ASDU is directed.*/
|
||||
uint8_t src_addr_mode; /*!< Reserved, The addressing mode for the source address used in this primitive and of the APDU that has been received.*/
|
||||
uint16_t src_short_addr; /*!< The individual device address of the entity from which the ASDU has been received.*/
|
||||
uint8_t src_endpoint; /*!< The number of the individual endpoint of the entity from which the ASDU has been received.*/
|
||||
uint16_t profile_id; /*!< The identifier of the profile from which this frame originated.*/
|
||||
uint16_t cluster_id; /*!< The identifier of the received object.*/
|
||||
uint32_t asdu_length; /*!< The number of octets comprising the ASDU being indicated by the APSDE.*/
|
||||
uint8_t *asdu; /*!< The set of octets comprising the ASDU being indicated by the APSDE. */
|
||||
uint8_t security_status; /*!< UNSECURED if the ASDU was received without any security. SECURED_NWK_KEY if the received ASDU was secured with the NWK key. */
|
||||
int lqi; /*!< The link quality indication delivered by the NLDE.*/
|
||||
int rx_time; /*!< Reserved, a time indication for the received packet based on the local clock */
|
||||
} esp_zb_apsde_data_ind_t;
|
||||
|
||||
/**
|
||||
* @brief APSME-TRANSPORT-KEY Request Parameters
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_apsme_transport_key_req_s {
|
||||
esp_zb_ieee_addr_t dst_address; /*!< The extended 64-bit address of the destination device, if the DestinationAddress parameter is all
|
||||
zeros, this request will be broadcasted */
|
||||
uint8_t key_type; /*!< Identifies the type of key material that should be transported, refer to esp_zb_apsme_key_type_t */
|
||||
union {
|
||||
struct {
|
||||
uint8_t key[ESP_ZB_CCM_KEY_SIZE]; /*!< The network key */
|
||||
esp_zb_ieee_addr_t parent_address; /*!< Indicates the address of parent when the use_parent is TRUE */
|
||||
uint8_t key_seq_number; /*!< A sequence number assigned to a network key by the Trust Center and used to distinguish
|
||||
network keys for purposes of key updates and incoming frame security operations.*/
|
||||
bool use_parent; /*!< Indicates if the destination device’s parent shall be used to forward the key to the
|
||||
destination device: */
|
||||
} nwk; /*!< TransportKeyData Parameter for a Network Key */
|
||||
struct {
|
||||
uint8_t key[ESP_ZB_CCM_KEY_SIZE]; /*!< The application link key */
|
||||
esp_zb_ieee_addr_t partner_address; /*!< The extended 64-bit address of the device that was also sent this link key. */
|
||||
uint8_t initiator; /*!< Indicates if the destination device of this application link key requested it */
|
||||
} app; /*!< TransportKeyData Parameter for an Application Link Key */
|
||||
struct {
|
||||
uint8_t key[ESP_ZB_CCM_KEY_SIZE]; /*!< The Trust Center link key */
|
||||
} tc; /*!< TransportKeyData Parameter for a Trust Center Link Key */
|
||||
} key_data; /*!< TransportKeyData */
|
||||
} esp_zb_apsme_transport_key_req_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief APSME-SWITCH-KEY Request Parameters
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_apsme_switch_key_req_s {
|
||||
esp_zb_ieee_addr_t dst_address; /*!< The extended 64-bit address of the device to which the switch-key command is sent. */
|
||||
uint8_t key_seq_number; /*!< A sequence number assigned to a network key by the Trust Center and used to distinguish network keys.*/
|
||||
} esp_zb_apsme_switch_key_req_t;
|
||||
|
||||
/**
|
||||
* @brief APSDE data indication application callback
|
||||
*
|
||||
* @param[in] ind APSDE-DATA.indication
|
||||
* @return
|
||||
* - true: The indication has already been handled
|
||||
* - false: The indication has not been handled; it will be processed by the stack.
|
||||
*
|
||||
*/
|
||||
typedef bool (* esp_zb_apsde_data_indication_callback_t)(esp_zb_apsde_data_ind_t ind);
|
||||
|
||||
/**
|
||||
* @brief APSDE data confirm application callback
|
||||
*
|
||||
* @param[in] confirm APSDE-DATA.confirm
|
||||
*/
|
||||
typedef void (* esp_zb_apsde_data_confirm_callback_t)(esp_zb_apsde_data_confirm_t confirm);
|
||||
|
||||
/**
|
||||
* @brief Register the callback for retrieving the aps data indication
|
||||
*
|
||||
* @param[in] cb A function pointer for esp_zb_apsde_data_indication_callback_t
|
||||
*/
|
||||
void esp_zb_aps_data_indication_handler_register(esp_zb_apsde_data_indication_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief APS data request
|
||||
*
|
||||
* @param[in] req A pointer for apsde data request, @ref esp_zb_apsde_data_req_s
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_INVALID_ARG: invalid arguments
|
||||
* - ESP_ERR_NO_MEM: not memory
|
||||
* - ESP_FAIL: on failed
|
||||
*/
|
||||
esp_err_t esp_zb_aps_data_request(esp_zb_apsde_data_req_t *req);
|
||||
|
||||
/**
|
||||
* @brief Register the callback for retrieving the aps data confirm
|
||||
*
|
||||
* @note If the callback is registered by the application, the application is responsible for handling APSDE confirm.
|
||||
* @param[in] cb A function pointer for esp_zb_apsde_data_confirm_callback_t
|
||||
*/
|
||||
void esp_zb_aps_data_confirm_handler_register(esp_zb_apsde_data_confirm_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Set the APS trust center address
|
||||
*
|
||||
* @param[in] address A 64-bit value is expected to be set to trust center address
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_INVALID_STATE: Device is already on a network
|
||||
*/
|
||||
esp_err_t esp_zb_aps_set_trust_center_address(esp_zb_ieee_addr_t address);
|
||||
|
||||
/**
|
||||
* @brief Get the APS trust center address
|
||||
*
|
||||
* @param[out] address A 64-bit value will be assigned from the trust center address
|
||||
*/
|
||||
void esp_zb_aps_get_trust_center_address(esp_zb_ieee_addr_t address);
|
||||
|
||||
/**
|
||||
* @brief APSME-TRANSPORT-KEY Request
|
||||
*
|
||||
* @param[in] req A pointer to the service parameters. See esp_zb_apsme_transport_key_req_t.
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_NO_MEM: Insufficient memory for the request
|
||||
* - ESP_ERR_NOT_SUPPORTED: Unsupported key or role type
|
||||
* - Otherwise: Failure
|
||||
*/
|
||||
esp_err_t esp_zb_apsme_transport_key_request(const esp_zb_apsme_transport_key_req_t *req);
|
||||
|
||||
/**
|
||||
* @brief APSME-SWITCH-KEY Request
|
||||
*
|
||||
* @param[in] req A pointer to the service parameters. See esp_zb_apsme_switch_key_req_t.
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_NO_MEM: Insufficient memory for the request
|
||||
* - ESP_ERR_NOT_SUPPORTED: Unsupported role type
|
||||
* - Otherwise: Failure
|
||||
*/
|
||||
esp_err_t esp_zb_apsme_switch_key_request(const esp_zb_apsme_switch_key_req_t *req);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/**
|
||||
* @brief BDB commissioning status
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zb_bdb_commissioning_status_s
|
||||
{
|
||||
ESP_ZB_BDB_STATUS_SUCCESS = 0, /*!< The commissioning sub-procedure was successful. */
|
||||
ESP_ZB_BDB_STATUS_IN_PROGRESS, /*!< One of the commissioning sub-procedures has started but is not yet complete. */
|
||||
ESP_ZB_BDB_STATUS_NOT_AA_CAPABLE, /*!< The initiator is not address assignment capable during touchlink. */
|
||||
ESP_ZB_BDB_STATUS_NO_NETWORK, /*!< A network has not been found during network steering or touchlink. */
|
||||
ESP_ZB_BDB_STATUS_TARGET_FAILURE, /*!< A node has not joined a network when requested during touchlink. */
|
||||
ESP_ZB_BDB_STATUS_FORMATION_FAILURE, /*!< A network could not be formed during network formation. */
|
||||
ESP_ZB_BDB_STATUS_NO_IDENTIFY_QUERY_RESPONSE, /*!< No response to an identify query command has been received during finding and binding. */
|
||||
ESP_ZB_BDB_STATUS_BINDING_TABLE_FULL, /*!< A binding table entry could not be created due to insufficient space in the binding table during finding and binding. */
|
||||
ESP_ZB_BDB_STATUS_NO_SCAN_RESPONSE, /*!< No response to a scan request inter-PAN command has been received during touchlink. */
|
||||
ESP_ZB_BDB_STATUS_NOT_PERMITTED, /*!< A touchlink (steal) attempt was made when a node is already connected to a centralized security network.
|
||||
A node was instructed to form a network when it did not have a logical type of either Zigbee coordinator or Zigbee router. */
|
||||
ESP_ZB_BDB_STATUS_TCLK_EX_FAILURE, /*!< The Trust Center link key exchange procedure has failed attempting to join a centralized security network. */
|
||||
ESP_ZB_BDB_STATUS_NOT_ON_A_NETWORK, /*!< A commissioning procedure was forbidden since the node was not currently on a network. */
|
||||
ESP_ZB_BDB_STATUS_ON_A_NETWORK, /*!< A commissioning procedure was forbidden since the node was currently on a network. */
|
||||
ESP_ZB_BDB_STATUS_CANCELLED, /*!< The current operation (steering or formation) was cancelled by an app */
|
||||
ESP_ZB_BDB_STATUS_DEV_ANNCE_SEND_FAILURE /*!< A device announce sending has been failed (e.g. device announce haven't acked by parent router). */
|
||||
} esp_zb_bdb_commissioning_status_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "esp_err.h"
|
||||
#include <stdint.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/**
|
||||
* @brief BDB commissioning mode mask bits
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zb_bdb_commissioning_mode_mask_s {
|
||||
ESP_ZB_BDB_TOUCHLINK_COMMISSIONING = 0x01, /*!< if bit is set, attempt Touchlink commissioning */
|
||||
ESP_ZB_BDB_NETWORK_STEERING = 0x02, /*!< if bit is set, attempt network steering */
|
||||
ESP_ZB_BDB_NETWORK_FORMATION = 0x04, /*!< if bit is set, attempt to form a network, according to device type */
|
||||
ESP_ZB_BDB_FINDING_N_BINDING = 0x08, /*!< if bit is set, attempt finding and binding */
|
||||
ESP_ZB_BDB_TOUCHLINK_TARGET = 0x40, /*!< if bit is set, attempt become touchlink target */
|
||||
} esp_zb_bdb_commissioning_mode_mask_t;
|
||||
|
||||
/** @brief Enumeration of touchlink actions, that should be approved by end user application.
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zb_touchlink_action_s {
|
||||
ESP_ZB_TOUCHLINK_ACTION_START_NEW_NETWORK,
|
||||
ESP_ZB_TOUCHLINK_ACTION_JOIN_ROUTER,
|
||||
ESP_ZB_TOUCHLINK_ACTION_JOIN_ED
|
||||
} esp_zb_touchlink_action_t;
|
||||
|
||||
/** @brief Enumeration of touchlink key bitmask
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zb_touchlink_key_bitmask_s {
|
||||
ESP_ZB_TOUCHLINK_MASTER_KEY = (1U << 4), /*!< Master key is a secret shared by all certified touchlink devices */
|
||||
ESP_ZB_TOUCHLINK_CERTIFICATION_KEY = (1U << 15), /*!< Certification key is is used to allow testing of the security mechanisms */
|
||||
} esp_zb_touchlink_key_bitmask_t;
|
||||
|
||||
/** Touchlink action callback
|
||||
*
|
||||
* @brief Touchlink action
|
||||
*
|
||||
* @param[in] action action of the touchlink, refer to esp_zb_touchlink_action_t
|
||||
* @return
|
||||
* - True: allow
|
||||
* - False: reject
|
||||
*
|
||||
*/
|
||||
typedef bool (*esp_zb_touchlink_action_allowed_callback_t)(uint8_t action);
|
||||
|
||||
/**
|
||||
* @brief Zll identify callback
|
||||
*
|
||||
* @param[in] identify_on An indication that needs start or stop identify
|
||||
*/
|
||||
typedef void (*esp_zb_zll_identify_req_callback_t)(bool identify_on);
|
||||
|
||||
/**
|
||||
* @brief Register the Zigbee touchlink action check handler
|
||||
*
|
||||
* @param[in] callback A callback that allow the user to determine whether the touchlink device
|
||||
* can start a network or join as a router/end device, refer to esp_zb_touchlink_action_allowed_callback_t.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_touchlink_action_check_register(esp_zb_touchlink_action_allowed_callback_t callback);
|
||||
/**
|
||||
* @brief BDB touchlink network parameter information
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_bdb_signal_touchlink_nwk_params_s {
|
||||
esp_zb_ieee_addr_t device_ieee_addr; /*!< address of device that started the network */
|
||||
uint8_t endpoint; /*!< endpoint of device that started the network */
|
||||
uint16_t profile_id; /*!< profile_id of device that started the network */
|
||||
} esp_zb_bdb_signal_touchlink_nwk_params_t;
|
||||
|
||||
/** Touchlink clear factory new
|
||||
*
|
||||
* @brief Clear the factory new state
|
||||
*
|
||||
*/
|
||||
void esp_zb_touchlink_clear_factory_new(void);
|
||||
|
||||
/**
|
||||
* @brief Set the timeout for Touchlink target
|
||||
*
|
||||
* @param[in] timeout The waiting time for the device to exit the Touchlink target mode
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_touchlink_target_set_timeout(uint32_t timeout);
|
||||
|
||||
/**
|
||||
* @brief Set the key bitmask for Touchlink commissioning
|
||||
*
|
||||
* Configures the key bitmask used for Touchlink commissioning. The network key will be encrypted
|
||||
* using one of the key types specified in the bitmask. Higher priority is given to keys with higher
|
||||
* bits. By default, the certification and master keys are included in the bitmask.
|
||||
*
|
||||
* @param[in] bitmask The bitmask to be applied for Touchlink commissioning
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_touchlink_set_key_bitmask(esp_zb_touchlink_key_bitmask_t bitmask);
|
||||
|
||||
/**
|
||||
* @brief Set the master key for Touchlink
|
||||
*
|
||||
* @param[in] key The master key that will be utilized for the Touchlink network
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_touchlink_set_master_key(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set the RSSI threshold for the Touchlink target
|
||||
*
|
||||
* @note The default value for the RSSI threshold is set to -64
|
||||
* @param[in] rssi_threshold The RSSI threshold determines whether the Touchlink target responds to the initiator
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_touchlink_set_rssi_threshold(int8_t rssi_threshold);
|
||||
|
||||
/**
|
||||
* @brief Get the RSSI threshold of Touchlink target
|
||||
*
|
||||
* @return The value of RSSI threshold
|
||||
*
|
||||
*/
|
||||
int8_t esp_zb_zdo_touchlink_get_rssi_threshold(void);
|
||||
|
||||
/**
|
||||
* @brief Schedule to cancel touchlink target commissioning procedure
|
||||
*
|
||||
* @return
|
||||
* - RET_OK: On success
|
||||
* - RET_ERROR: Not in touchlink target procedure
|
||||
*/
|
||||
esp_err_t esp_zb_bdb_cancel_touchlink_target(void);
|
||||
|
||||
/**
|
||||
* @brief Register ZLL identify request handler
|
||||
*
|
||||
* @param[in] cb A callback for zll identify notificaion, refer to esp_zb_zll_identify_req_callback_t
|
||||
*/
|
||||
void esp_zb_zll_identify_req_handler_register(esp_zb_zll_identify_req_callback_t cb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Espressif Systems
|
||||
* integrated circuit in a product or a software update for such product,
|
||||
* must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* 4. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief ESP Zigbee cli console initialization.
|
||||
*/
|
||||
void zb_cli_console_init(void);
|
||||
|
||||
/**
|
||||
* @brief ESP Zigbee cli console task.
|
||||
*
|
||||
* @param[in] argv Pointer to the command.
|
||||
*/
|
||||
void zb_cli_console_task(void *arg);
|
||||
|
||||
/**
|
||||
* @brief Set ESP Zigbee cli endpoint.
|
||||
*
|
||||
* @param[in] ep ESP Zigbee cli endpoint.
|
||||
*/
|
||||
void zb_cli_set_endpoint(uint8_t ep);
|
||||
|
||||
/**
|
||||
* @brief Get ESP Zigbee cli endpoint.
|
||||
*
|
||||
* @return ESP Zigbee cli endpoint value.
|
||||
*/
|
||||
uint8_t zb_cli_get_endpoint(void);
|
||||
|
||||
/**
|
||||
* @brief Get ESP Zigbee cli endpoint.
|
||||
*
|
||||
* @return
|
||||
* - ZB_TRUE Zigbee commissioning is started.
|
||||
* - ZB_FALSE Zigbee commissioning is not started.
|
||||
*/
|
||||
bool zb_cli_is_stack_started(void);
|
||||
|
||||
/**
|
||||
* @brief The Handler to process zcl general command coming from the ESP Zigbee cli endpoint.
|
||||
*
|
||||
* @param[in] bufid Reference to a Zigbee stack buffer.
|
||||
*
|
||||
* @return
|
||||
* - ZB_TRUE ESP Zigbee zcl general command process successfully.
|
||||
* - ZB_FALSE ESP Zigbee zcl general command process failed.
|
||||
*/
|
||||
bool esp_zb_cli_agent_ep_handler_general_cmd(uint8_t bufid);
|
||||
|
||||
/**
|
||||
* @brief The Handler to process attribute write/read command coming from the ESP Zigbee cli endpoint.
|
||||
*
|
||||
* @param[in] bufid Reference to a Zigbee stack buffer.
|
||||
*
|
||||
* @return
|
||||
* - ZB_TRUE ESP Zigbee zcl attribute command process successfully.
|
||||
* - ZB_FALSE ESP Zigbee zcl attribute command process failed.
|
||||
*/
|
||||
bool esp_zb_cli_agent_ep_handler_attr(uint8_t bufid);
|
||||
|
||||
/**
|
||||
* @brief The Handler to process attribute report command coming from the ESP Zigbee cli endpoint.
|
||||
*
|
||||
* @param[in] bufid Reference to a Zigbee stack buffer.
|
||||
*
|
||||
* @return
|
||||
* - ZB_TRUE ESP Zigbee zcl attribute report command process successfully.
|
||||
* - ZB_FALSE ESP Zigbee zcl attribute report command process failed.
|
||||
*/
|
||||
bool esp_zb_cli_agent_ep_handler_report(uint8_t bufid);
|
||||
|
||||
/**
|
||||
* @brief The Handler to process ping command coming from the ESP Zigbee cli endpoint.
|
||||
*
|
||||
* @param[in] bufid Reference to a Zigbee stack buffer.
|
||||
*
|
||||
* @return
|
||||
* - ZB_TRUE ESP Zigbee zcl ping command process successfully.
|
||||
* - ZB_FALSE ESP Zigbee zcl ping command process failed.
|
||||
*/
|
||||
bool esp_zb_cli_agent_ep_handler_ping(uint8_t bufid);
|
||||
|
||||
/**
|
||||
* @brief Register the esp zigbee cli command
|
||||
*
|
||||
*/
|
||||
void zb_cli_register_command(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,769 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
#include "zcl/esp_zigbee_zcl_common.h"
|
||||
|
||||
/**
|
||||
* @brief Create an empty attribute list.
|
||||
*
|
||||
* @note This attribute list is ready for certain cluster id to add / update attribute refer to esp_zb_xx_cluster_add_attr() and esp_zb_cluster_update_attr().
|
||||
* @note Attribute list groups up a cluster.
|
||||
*
|
||||
* @param[in] cluster_id The cluster id for attribute list refer to esp_zb_zcl_cluster_id
|
||||
*
|
||||
* @return pointer to @ref esp_zb_attribute_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_attribute_list_t *esp_zb_zcl_attr_list_create(uint16_t cluster_id);
|
||||
|
||||
/**
|
||||
* @brief Get ZCL attribute descriptor.
|
||||
*
|
||||
* @note Getting the local attribute from the specific endpoint and cluster.
|
||||
*
|
||||
* @param[in] endpoint The endpoint
|
||||
* @param[in] cluster_id Cluster id for attribute list refer to esp_zb_zcl_cluster_id
|
||||
* @param[in] cluster_role Cluster role of this cluster, either server or client role refer to esp_zb_zcl_cluster_role
|
||||
* @param[in] attr_id Attribute id
|
||||
*
|
||||
* @return pointer to @ref esp_zb_zcl_attr_s
|
||||
*
|
||||
*/
|
||||
esp_zb_zcl_attr_t *esp_zb_zcl_get_attribute(uint8_t endpoint, uint16_t cluster_id, uint8_t cluster_role, uint16_t attr_id);
|
||||
|
||||
/**
|
||||
* @brief Set ZCL attribute value.
|
||||
*
|
||||
* @note Set the local attribute from the specific endpoint, cluster and attribute.
|
||||
*
|
||||
* @param[in] endpoint The endpoint
|
||||
* @param[in] cluster_id Cluster id for attribute list refer to esp_zb_zcl_cluster_id
|
||||
* @param[in] cluster_role Cluster role of this cluster, either server or client role refer to esp_zb_zcl_cluster_role
|
||||
* @param[in] attr_id Attribute id
|
||||
* @param[in] value_p pointer to new value
|
||||
* @param[in] check The access method of attribute whether is required to check or not
|
||||
*
|
||||
* @note Please look up the Zigbee Cluster Library for the access method of attribute
|
||||
* @return zcl status refer to esp_zb_zcl_status_t
|
||||
*
|
||||
*/
|
||||
esp_zb_zcl_status_t esp_zb_zcl_set_attribute_val(uint8_t endpoint, uint16_t cluster_id, uint8_t cluster_role,
|
||||
uint16_t attr_id, void *value_p, bool check);
|
||||
|
||||
/**
|
||||
* @brief Get the manufacturer attribute descriptor
|
||||
*
|
||||
* @param endpoint The endpoint identifier where the attribute is located
|
||||
* @param cluster_id The cluster identifier where the attribute is located
|
||||
* @param cluster_role The role of cluster
|
||||
* @param attr_id The attribute identifier
|
||||
* @param manuf_code The manufacturer code
|
||||
* @return A pointer to @ref esp_zb_zcl_attr_s for attribute descriptor
|
||||
*/
|
||||
esp_zb_zcl_attr_t *esp_zb_zcl_get_manufacturer_attribute(uint8_t endpoint, uint16_t cluster_id, uint8_t cluster_role, uint16_t attr_id,
|
||||
uint16_t manuf_code);
|
||||
|
||||
/**
|
||||
* @brief Set the manufacturer attribute value
|
||||
*
|
||||
* @param endpoint The endpoint identifier where the attribute is located
|
||||
* @param cluster_id The cluster identifier where the attribute is located
|
||||
* @param cluster_role The role of cluster
|
||||
* @param manuf_code The manufacturer code
|
||||
* @param attr_id The attribute identifier
|
||||
* @param value_p The value of attribute expected to set
|
||||
* @param check The access method of attribute whether is required to check or not
|
||||
* @return The zcl status refer to esp_zb_zcl_status_t
|
||||
*/
|
||||
esp_zb_zcl_status_t esp_zb_zcl_set_manufacturer_attribute_val(uint8_t endpoint, uint16_t cluster_id, uint8_t cluster_role, uint16_t manuf_code,
|
||||
uint16_t attr_id, void *value_p, bool check);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in basic cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_basic_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in power config cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
* @note Attribute for battery information, battery settings 2 and 3 sets haven't supported yet.
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_power_config_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in identify cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_identify_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in groups cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_groups_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in scenes cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_scenes_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in on_off cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_on_off_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in on_off switch config cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_on_off_switch_config_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in level cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_level_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in color control cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_color_control_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in time cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_time_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in binary input cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_binary_input_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in Commissioning cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_commissioning_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in shade config cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_shade_config_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in door lock cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_door_lock_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in IAS zone cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ias_zone_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Set the IAS zone CIE address for IAS zone server
|
||||
*
|
||||
* @param[in] endpoint A 8-bit endpoint ID which the IAS zone cluster attach
|
||||
* @param[in] cie_ieee_addr The 8-byte IEEE address will be regarded as the IAS message destination address
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_FAIL The CIE address has been set, invalid argument or IAS zone cluster does not exist
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ias_zone_cluster_set_cie_address(uint8_t endpoint, esp_zb_ieee_addr_t cie_ieee_addr);
|
||||
|
||||
/**
|
||||
* @brief Get the zone table size of the IAS ACE cluster
|
||||
*
|
||||
* @param[in] endpoint A 8-bit endpoint ID which the IAS ACE cluster attach
|
||||
* @param[out] table_size The zone table size of IAS ACE cluster on the given endpoint.
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_NOT_FOUND The IAS ACE cluster is not founded on the given endpoint.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ias_ace_get_zone_table_length(uint8_t endpoint, uint8_t *table_size);
|
||||
|
||||
/**
|
||||
* @brief Get the zone table of the IAS ACE cluster
|
||||
*
|
||||
* @param[in] endpoint A 8-bit endpoint ID which the IAS ACE cluster attach
|
||||
* @param[out] table_p The address of the zone table of IAS ACE cluster on the given endpoint.
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_NOT_FOUND The IAS ACE cluster is not founded on the given endpoint.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ias_ace_get_zone_table(uint8_t endpoint, esp_zb_zcl_ias_ace_zone_table_t** table_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in IAS_WD cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ias_wd_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in temperature measurement cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_temperature_meas_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in humidity measurement cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_humidity_meas_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute and variables in OTA client cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ota_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in illuminance measurement cluster
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_illuminance_meas_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in pressure measurement cluster
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_pressure_meas_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in flow measurement cluster
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_flow_meas_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in electrical measurement cluster
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_electrical_meas_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in window covering cluster
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_window_covering_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in occupancy sensor cluster
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_occupancy_sensing_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in thermostat cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_thermostat_cluster_add_attr(esp_zb_attribute_list_t* attr_list, uint16_t attr_id, void* value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in fan control cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_fan_control_cluster_add_attr(esp_zb_attribute_list_t* attr_list, uint16_t attr_id, void* value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in thermostat ui configuration cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_thermostat_ui_config_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in analog input cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_analog_input_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in analog output cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_analog_output_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in analog value cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_analog_value_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in electrical conductivity measurement cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ec_measurement_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in pH measurement cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ph_measurement_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in wind speed measurement cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_wind_speed_measurement_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in carbon dioxide measurement cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_carbon_dioxide_measurement_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in pm2.5 measurement cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_pm2_5_measurement_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in multistate value cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_multistate_value_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in diagnostics cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_diagnostics_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in meter identification cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_meter_identification_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in demand response and load control cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_drlc_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in dehumidification control cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_dehumidification_control_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in a specified cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] cluster_id The cluster ID to which the attribute will be added, refer to esp_zb_zcl_cluster_id_t
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] attr_type Type of attribute to be added, refer to esp_zb_zcl_attr_type_t
|
||||
* @param[in] attr_access Access type of attribute to be added, refer to esp_zb_zcl_attr_access_t
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or attribute type is unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t cluster_id, uint16_t attr_id, uint8_t attr_type, uint8_t attr_access, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add an attribute in a specified cluster, with manufacturer code.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] cluster_id The cluster ID to which the attribute will be added, refer to esp_zb_zcl_cluster_id_t
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] manuf_code Manufacturer code of the attribute
|
||||
* @param[in] attr_type Type of attribute to be added, refer to esp_zb_zcl_attr_type_t
|
||||
* @param[in] attr_access Access type of attribute to be added, refer to esp_zb_zcl_attr_access_t
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or attribute type is unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_cluster_add_manufacturer_attr(esp_zb_attribute_list_t *attr_list, uint16_t cluster_id, uint16_t attr_id, uint16_t manuf_code, uint8_t attr_type, uint8_t attr_access, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Add customized attribute in customized cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id to be added
|
||||
* @param[in] attr_type Type of attribute to be added, refer to esp_zb_zcl_attr_type_t
|
||||
* @param[in] attr_access Access type of attribute to be added, refer to esp_zb_zcl_attr_access_t
|
||||
* @param[in] value_p A pointer to attribute value wants to add
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute is existed or unsupported
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_custom_cluster_add_custom_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, uint8_t attr_type, uint8_t attr_access, void *value_p);
|
||||
|
||||
/**
|
||||
* @brief Update an attribute in a specific cluster.
|
||||
*
|
||||
* @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s
|
||||
* @param[in] attr_id An attribute id which wants to update
|
||||
* @param[in] value_p A pointer to attribute value wants to update
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if attribute list not initialized
|
||||
* - ESP_ERR_NOT_FOUND the request update attribute is not found
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_cluster_update_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,965 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp_err.h"
|
||||
#include "zb_vendor.h"
|
||||
#include "platform/esp_zigbee_platform.h"
|
||||
#include "esp_zigbee_version.h"
|
||||
#include "esp_zigbee_trace.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
#include "esp_zigbee_attribute.h"
|
||||
#include "esp_zigbee_cluster.h"
|
||||
#include "esp_zigbee_endpoint.h"
|
||||
#include "nwk/esp_zigbee_nwk.h"
|
||||
#include "zcl/esp_zigbee_zcl_command.h"
|
||||
#include "zdo/esp_zigbee_zdo_command.h"
|
||||
#include "bdb/esp_zigbee_bdb_touchlink.h"
|
||||
#include "bdb/esp_zigbee_bdb_commissioning.h"
|
||||
#include "esp_zigbee_secur.h"
|
||||
#include "esp_zigbee_ota.h"
|
||||
|
||||
#define ESP_ZB_TRANSCEIVER_ALL_CHANNELS_MASK 0x07FFF800U /*!< channel 11-26 for compatibility with 2.4GHZ*/
|
||||
|
||||
#ifdef CONFIG_ZB_ZED
|
||||
#define ESP_ZB_SLEEP_MAXIMUM_THRESHOLD_MS 86400000U /*! Maximum sleep threshold*/
|
||||
#endif /** CONFIG_ZB_ZED */
|
||||
|
||||
#ifdef CONFIG_ZB_GP_ENABLED
|
||||
#define ESP_ZGP_GPPB_DEFAULT_FUNCTIONALITY 0x9ac2f /*!< GPP functionality, refer to esp_zgp_gpp_functionality_t */
|
||||
#define ESP_ZGP_GPS_DEFAULT_FUNCTIONALITY 0x9ac2f /*!< GPS functionality, refer to esp_zgp_gps_functionality_t */
|
||||
#endif /* CONFIG_ZB_GP_ENABLED */
|
||||
|
||||
/**
|
||||
* @name End Device (ED) timeout request
|
||||
* @anchor nwk_requested_timeout
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ED_AGING_TIMEOUT_10SEC = 0U, /*!< 10 second timeout */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_2MIN = 1U, /*!< 2 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_4MIN = 2U, /*!< 4 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_8MIN = 3U, /*!< 8 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_16MIN = 4U, /*!< 16 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_32MIN = 5U, /*!< 32 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_64MIN = 6U, /*!< 64 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_128MIN = 7U, /*!< 128 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_256MIN = 8U, /*!< 256 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_512MIN = 9U, /*!< 512 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_1024MIN = 10U, /*!< 1024 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_2048MIN = 11U, /*!< 2048 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_4096MIN = 12U, /*!< 4096 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_8192MIN = 13U, /*!< 8192 minutes */
|
||||
ESP_ZB_ED_AGING_TIMEOUT_16384MIN = 14U, /*!< 16384 minutes */
|
||||
} esp_zb_aging_timeout_t;
|
||||
|
||||
/**
|
||||
* @brief Enum of the Zigbee core action callback id
|
||||
*
|
||||
* @note
|
||||
* 1. If one endpoint possesses the same custom cluster identifier in both client and server roles,
|
||||
* any request or response command for the custom cluster will only trigger the
|
||||
* ``ESP_ZB_CORE_CMD_CUSTOM_CLUSTER_REQ_CB_ID`` callback.
|
||||
* 2. The callback ids without ``CMD`` in their names would provide messages of the following structure:
|
||||
* @code{c}
|
||||
* typedef struct xxx_message_s {
|
||||
* esp_zb_device_cb_common_info_t info;
|
||||
* ...
|
||||
* } xxx_message_t;
|
||||
* @endcode
|
||||
* While the callback ids with ``CMD`` in their names would provide messages of the following structure:
|
||||
* @code{c}
|
||||
* typedef struct xxx_message_s {
|
||||
* esp_zb_zcl_cmd_info_t info;
|
||||
* ...
|
||||
* } xxx_message_t;
|
||||
* @endcode
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zb_core_action_callback_id_s {
|
||||
ESP_ZB_CORE_SET_ATTR_VALUE_CB_ID = 0x0000, /*!< Set attribute value, refer to esp_zb_zcl_set_attr_value_message_t */
|
||||
ESP_ZB_CORE_SCENES_STORE_SCENE_CB_ID = 0x0001, /*!< Store scene, refer to esp_zb_zcl_store_scene_message_t */
|
||||
ESP_ZB_CORE_SCENES_RECALL_SCENE_CB_ID = 0x0002, /*!< Recall scene, refer to esp_zb_zcl_recall_scene_message_t */
|
||||
ESP_ZB_CORE_IAS_ZONE_ENROLL_RESPONSE_VALUE_CB_ID = 0x0003, /*!< IAS Zone enroll response, refer to esp_zb_zcl_ias_zone_enroll_response_message_t */
|
||||
ESP_ZB_CORE_OTA_UPGRADE_VALUE_CB_ID = 0x0004, /*!< Upgrade OTA, refer to esp_zb_zcl_ota_upgrade_value_message_t */
|
||||
ESP_ZB_CORE_OTA_UPGRADE_SRV_STATUS_CB_ID = 0x0005, /*!< OTA Server status, refer to esp_zb_zcl_ota_upgrade_server_status_message_t */
|
||||
ESP_ZB_CORE_OTA_UPGRADE_SRV_QUERY_IMAGE_CB_ID = 0x0006, /*!< OTA Server query image, refer to esp_zb_zcl_ota_upgrade_server_query_image_message_t */
|
||||
ESP_ZB_CORE_THERMOSTAT_VALUE_CB_ID = 0x0007, /*!< Thermostat value, refer to esp_zb_zcl_thermostat_value_message_t */
|
||||
ESP_ZB_CORE_METERING_GET_PROFILE_CB_ID = 0x0008, /*!< Metering get profile, refer to esp_zb_zcl_metering_get_profile_message_t */
|
||||
ESP_ZB_CORE_METERING_GET_PROFILE_RESP_CB_ID = 0x0009, /*!< Metering get profile response, refer to esp_zb_zcl_metering_get_profile_resp_message_t */
|
||||
ESP_ZB_CORE_METERING_REQ_FAST_POLL_MODE_CB_ID = 0x000a, /*!< Metering request fast poll mode, refer to esp_zb_zcl_metering_request_fast_poll_mode_message_t */
|
||||
ESP_ZB_CORE_METERING_REQ_FAST_POLL_MODE_RESP_CB_ID = 0x000b, /*!< Metering request fast poll mode response, refer to esp_zb_zcl_metering_request_fast_poll_mode_resp_message_t */
|
||||
ESP_ZB_CORE_METERING_GET_SNAPSHOT_CB_ID = 0x000c, /*!< Metering get snapshot, refer to esp_zb_zcl_metering_get_snapshot_message_t */
|
||||
ESP_ZB_CORE_METERING_PUBLISH_SNAPSHOT_CB_ID = 0x000d, /*!< Metering publish snapshot, refer to esp_zb_zcl_metering_publish_snapshot_message_t */
|
||||
ESP_ZB_CORE_METERING_GET_SAMPLED_DATA_CB_ID = 0x000e, /*!< Metering get sampled data, refer to esp_zb_zcl_metering_get_sampled_data_message_t */
|
||||
ESP_ZB_CORE_METERING_GET_SAMPLED_DATA_RESP_CB_ID = 0x000f, /*!< Metering get sampled data response, refer to esp_zb_zcl_metering_get_sampled_data_resp_message_t */
|
||||
ESP_ZB_CORE_DOOR_LOCK_LOCK_DOOR_CB_ID = 0x0010, /*!< Lock/unlock door request, refer to esp_zb_zcl_door_lock_lock_door_message_t */
|
||||
ESP_ZB_CORE_DOOR_LOCK_LOCK_DOOR_RESP_CB_ID = 0x0011, /*!< Lock/unlock door response, refer to esp_zb_zcl_door_lock_lock_door_resp_message_t */
|
||||
ESP_ZB_CORE_IDENTIFY_EFFECT_CB_ID = 0x0012, /*!< Identify triggers effect request, refer to esp_zb_zcl_identify_effect_message_t */
|
||||
ESP_ZB_CORE_BASIC_RESET_TO_FACTORY_RESET_CB_ID = 0x0013, /*!< Reset all clusters of endpoint to factory default, refer to esp_zb_zcl_basic_reset_factory_default_message_t */
|
||||
ESP_ZB_CORE_PRICE_GET_CURRENT_PRICE_CB_ID = 0x0014, /*!< Price get current price, refer to esp_zb_zcl_price_get_current_price_message_t */
|
||||
ESP_ZB_CORE_PRICE_GET_SCHEDULED_PRICES_CB_ID = 0x0015, /*!< Price get scheduled prices, refer to esp_zb_zcl_price_get_scheduled_prices_message_t */
|
||||
ESP_ZB_CORE_PRICE_GET_TIER_LABELS_CB_ID = 0x0016, /*!< Price get tier labels, refer to esp_zb_zcl_price_get_tier_labels_message_t */
|
||||
ESP_ZB_CORE_PRICE_PUBLISH_PRICE_CB_ID = 0x0017, /*!< Price publish price, refer to esp_zb_zcl_price_publish_price_message_t */
|
||||
ESP_ZB_CORE_PRICE_PUBLISH_TIER_LABELS_CB_ID = 0x0018, /*!< Price publish tier labels, refer to esp_zb_zcl_price_publish_tier_labels_message_t */
|
||||
ESP_ZB_CORE_PRICE_PRICE_ACK_CB_ID = 0x0019, /*!< Price price acknowledgement, refer to esp_zb_zcl_price_ack_message_t */
|
||||
ESP_ZB_CORE_COMM_RESTART_DEVICE_CB_ID = 0x001a, /*!< Commissioning restart device, refer to esp_zigbee_zcl_commissioning_restart_device_message_t */
|
||||
ESP_ZB_CORE_COMM_OPERATE_STARTUP_PARAMS_CB_ID = 0x001b, /*!< Commissioning operate startup parameters, refer to esp_zigbee_zcl_commissioning_operate_startup_parameters_message_t */
|
||||
ESP_ZB_CORE_COMM_COMMAND_RESP_CB_ID = 0x001c, /*!< Commissioning command response, refer to esp_zigbee_zcl_commissioning_command_response_message_t */
|
||||
ESP_ZB_CORE_IAS_WD_START_WARNING_CB_ID = 0x001d, /*!< IAS WD cluster Start Warning command, refer to esp_zb_zcl_ias_wd_start_warning_message_t */
|
||||
ESP_ZB_CORE_IAS_WD_SQUAWK_CB_ID = 0x001e, /*!< IAS WD cluster Squawk command, refer to esp_zb_zcl_ias_wd_squawk_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_ARM_CB_ID = 0x001f, /*!< IAS ACE cluster Arm command, refer to esp_zb_zcl_ias_ace_arm_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_BYPASS_CB_ID = 0x0020, /*!< IAS ACE cluster Bypass command, refer to esp_zb_zcl_ias_ace_bypass_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_EMERGENCY_CB_ID = 0x0021, /*!< IAS ACE cluster Emergency command, refer to esp_zb_zcl_ias_ace_emergency_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_FIRE_CB_ID = 0x0022, /*!< IAS ACE cluster Fire command, refer to esp_zb_zcl_ias_ace_fire_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_PANIC_CB_ID = 0x0023, /*!< IAS ACE cluster Panic command, refer to esp_zb_zcl_ias_ace_panic_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_GET_PANEL_STATUS_CB_ID = 0x0024, /*!< IAS ACE cluster Get Panel Status command, refer to esp_zb_zcl_ias_ace_get_panel_status_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_GET_BYPASSED_ZONE_LIST_CB_ID = 0x0025, /*!< IAS ACE cluster Get Bypass Zone List command, refer to esp_zb_zcl_ias_ace_get_bypassed_zone_list_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_GET_ZONE_STATUS_CB_ID = 0x0026, /*!< IAS ACE cluster Get Zone Status command, refer to esp_zb_zcl_ias_ace_get_zone_status_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_ARM_RESP_CB_ID = 0x0027, /*!< IAS ACE cluster Arm command response, refer to esp_zb_zcl_ias_ace_arm_response_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_GET_ZONE_ID_MAP_RESP_CB_ID = 0x0028, /*!< IAS ACE cluster Get Zone ID MAP command response, refer to esp_zb_zcl_ias_ace_get_zone_id_map_response_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_GET_ZONE_INFO_RESP_CB_ID = 0x0029, /*!< IAS ACE cluster Get Zone Information command response, refer to esp_zb_zcl_ias_ace_get_zone_info_response_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_ZONE_STATUS_CHANGED_CB_ID = 0x002a, /*!< IAS ACE cluster Zone Status Changed command, refer to esp_zb_zcl_ias_ace_zone_status_changed_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_PANEL_STATUS_CHANGED_CB_ID = 0x002b, /*!< IAS ACE cluster Panel Status Changed command, refer to esp_zb_zcl_ias_ace_panel_status_changed_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_GET_PANEL_STATUS_RESP_CB_ID = 0x002c, /*!< IAS ACE cluster Get Panel Status command response, refer to esp_zb_zcl_ias_ace_get_panel_status_response_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_SET_BYPASSED_ZONE_LIST_CB_ID = 0x002d, /*!< IAS ACE cluster Set Bypassed Zone List command, refer to esp_zb_zcl_ias_ace_set_bypassed_zone_list_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_BYPASS_RESP_CB_ID = 0x002e, /*!< IAS ACE cluster Bypass command response, refer to esp_zb_zcl_ias_ace_bypass_response_message_t */
|
||||
ESP_ZB_CORE_IAS_ACE_GET_ZONE_STATUS_RESP_CB_ID = 0x002f, /*!< IAS ACE cluster Get Zone Status command response, refer to esp_zb_zcl_ias_ace_get_zone_status_response_message_t */
|
||||
ESP_ZB_CORE_WINDOW_COVERING_MOVEMENT_CB_ID = 0x0030, /*!< Window covering movement command, refer to esp_zb_zcl_window_covering_movement_message_t */
|
||||
ESP_ZB_CORE_OTA_UPGRADE_QUERY_IMAGE_RESP_CB_ID = 0x0031, /*!< OTA upgrade query image response message, refer to esp_zb_zcl_ota_upgrade_query_image_resp_message_t */
|
||||
ESP_ZB_CORE_THERMOSTAT_WEEKLY_SCHEDULE_SET_CB_ID = 0x0032, /*!< Thermostat weekly schedule stable set, refer to esp_zb_zcl_thermostat_weekly_schedule_set_message_t */
|
||||
ESP_ZB_CORE_DRLC_LOAD_CONTORL_EVENT_CB_ID = 0x0040, /*!< Demand response and load control cluster LoadControlEvent message, refer to esp_zb_zcl_drlc_load_control_event_message_t */
|
||||
ESP_ZB_CORE_DRLC_CANCEL_LOAD_CONTROL_EVENT_CB_ID = 0x0041, /*!< Demand response and load control cluster CancelLoadControlEvent message, refer to esp_zb_zcl_drlc_cancel_load_control_event_message_t */
|
||||
ESP_ZB_CORE_DRLC_CANCEL_ALL_LOAD_CONTROL_EVENTS_CB_ID = 0x0042, /*!< Demand response and load control cluster CancelAllLoadControlEvents message, refer to esp_zb_zcl_drlc_cancel_all_load_control_events_message_t */
|
||||
ESP_ZB_CORE_DRLC_REPORT_EVENT_STATUS_CB_ID = 0x0043, /*!< Demand response and load control cluster ReportEventStatus message, refer to esp_zb_zcl_drlc_report_event_status_message_t */
|
||||
ESP_ZB_CORE_DRLC_GET_SCHEDULED_EVENTS_CB_ID = 0x0044, /*!< Demand response and load control cluster GetScheduledEvents message, refer to esp_zb_zcl_drlc_get_scheduled_events_message_t */
|
||||
ESP_ZB_CORE_CMD_READ_ATTR_RESP_CB_ID = 0x1000, /*!< Read attribute response, refer to esp_zb_zcl_cmd_read_attr_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_WRITE_ATTR_RESP_CB_ID = 0x1001, /*!< Write attribute response, refer to esp_zb_zcl_cmd_write_attr_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_REPORT_CONFIG_RESP_CB_ID = 0x1002, /*!< Configure report response, refer to esp_zb_zcl_cmd_config_report_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_READ_REPORT_CFG_RESP_CB_ID = 0x1003, /*!< Read report configuration response, refer to esp_zb_zcl_cmd_read_report_config_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_DISC_ATTR_RESP_CB_ID = 0x1004, /*!< Discover attributes response, refer to esp_zb_zcl_cmd_discover_attributes_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_DEFAULT_RESP_CB_ID = 0x1005, /*!< Default response, refer to esp_zb_zcl_cmd_default_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_OPERATE_GROUP_RESP_CB_ID = 0x1010, /*!< Group add group response, refer to esp_zb_zcl_groups_operate_group_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_VIEW_GROUP_RESP_CB_ID = 0x1011, /*!< Group view response, refer to esp_zb_zcl_groups_view_group_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_GET_GROUP_MEMBERSHIP_RESP_CB_ID = 0x1012, /*!< Group get membership response, refer to esp_zb_zcl_groups_get_group_membership_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_OPERATE_SCENE_RESP_CB_ID = 0x1020, /*!< Scenes operate response, refer to esp_zb_zcl_scenes_operate_scene_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_VIEW_SCENE_RESP_CB_ID = 0x1021, /*!< Scenes view response, refer to esp_zb_zcl_scenes_view_scene_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_GET_SCENE_MEMBERSHIP_RESP_CB_ID = 0x1022, /*!< Scenes get membership response, refer to esp_zb_zcl_scenes_get_scene_membership_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_IAS_ZONE_ZONE_ENROLL_REQUEST_ID = 0x1030, /*!< IAS Zone enroll request, refer to esp_zb_zcl_ias_zone_enroll_request_message_t */
|
||||
ESP_ZB_CORE_CMD_IAS_ZONE_ZONE_STATUS_CHANGE_NOT_ID = 0x1031, /*!< IAS Zone status change notification, refer to esp_zb_zcl_ias_zone_status_change_notification_message_t */
|
||||
ESP_ZB_CORE_CMD_CUSTOM_CLUSTER_REQ_CB_ID = 0x1040, /*!< Custom Cluster request, refer to esp_zb_zcl_custom_cluster_command_message_t */
|
||||
ESP_ZB_CORE_CMD_CUSTOM_CLUSTER_RESP_CB_ID = 0x1041, /*!< Custom Cluster response, refer to esp_zb_zcl_custom_cluster_command_message_t */
|
||||
ESP_ZB_CORE_CMD_PRIVILEGE_COMMAND_REQ_CB_ID = 0x1050, /*!< Custom Cluster request, refer to esp_zb_zcl_privilege_command_message_t */
|
||||
ESP_ZB_CORE_CMD_PRIVILEGE_COMMAND_RESP_CB_ID = 0x1051, /*!< Custom Cluster response, refer to esp_zb_zcl_privilege_command_message_t */
|
||||
ESP_ZB_CORE_CMD_TOUCHLINK_GET_GROUP_ID_RESP_CB_ID = 0x1060, /*!< Touchlink commissioning cluster get group id response, refer to esp_zb_touchlink_get_group_identifiers_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_TOUCHLINK_GET_ENDPOINT_LIST_RESP_CB_ID = 0x1061, /*!< Touchlink commissioning cluster get endpoint list response, refer to esp_zb_zcl_touchlink_get_endpoint_list_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_THERMOSTAT_GET_WEEKLY_SCHEDULE_RESP_CB_ID = 0x1070, /*!< Thermostat cluster get weekly schedule response, refer to esp_zb_zcl_thermostat_get_weekly_schedule_resp_message_t */
|
||||
ESP_ZB_CORE_CMD_GREEN_POWER_RECV_CB_ID = 0x1F00, /*!< Green power cluster command receiving, refer to esp_zb_zcl_cmd_green_power_recv_message_t */
|
||||
ESP_ZB_CORE_REPORT_ATTR_CB_ID = 0x2000, /*!< Attribute Report, refer to esp_zb_zcl_report_attr_message_t */
|
||||
} esp_zb_core_action_callback_id_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee Coordinator/ Router device configuration.
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t max_children; /*!< Max number of the children */
|
||||
} esp_zb_zczr_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee End device configuration.
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t ed_timeout; /*!< Set End Device Timeout, refer to esp_zb_aging_timeout_t */
|
||||
uint32_t keep_alive; /*!< Set Keep alive Timeout, in milliseconds, with a maximum value of 65,000,000,000.*/
|
||||
} esp_zb_zed_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee device configuration.
|
||||
* @note For esp_zb_role please refer defined by esp_zb_nwk_device_type_t.
|
||||
*/
|
||||
typedef struct esp_zb_cfg_s {
|
||||
esp_zb_nwk_device_type_t esp_zb_role; /*!< The nwk device type */
|
||||
bool install_code_policy; /*!< Allow install code security policy or not */
|
||||
union {
|
||||
esp_zb_zczr_cfg_t zczr_cfg; /*!< The Zigbee zc/zr device configuration */
|
||||
esp_zb_zed_cfg_t zed_cfg; /*!< The Zigbee zed device configuration */
|
||||
} nwk_cfg; /*!< Union of the network configuration */
|
||||
} esp_zb_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief The application signal struct for esp_zb_app_signal_handler
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_app_signal_s {
|
||||
uint32_t *p_app_signal; /*!< Application pointer signal type, refer to esp_zb_app_signal_type_t */
|
||||
esp_err_t esp_err_status; /*!< The error status of the each signal event, refer to esp_err_t */
|
||||
} esp_zb_app_signal_t;
|
||||
|
||||
/**
|
||||
* @brief A callback for user to obtain interesting Zigbee message
|
||||
*
|
||||
* @note The returned value will be utilized by the stack for post-processing
|
||||
* @param[in] callback_id The id of Zigbee core action, refer to esp_zb_core_action_callback_id_t
|
||||
* @param[in] message The information of Zigbee core action that bind with the @p callback_id
|
||||
*
|
||||
* @return ESP_OK The action is handled successfully, others on failure
|
||||
*/
|
||||
typedef esp_err_t (*esp_zb_core_action_callback_t)(esp_zb_core_action_callback_id_t callback_id, const void *message);
|
||||
|
||||
/**
|
||||
* @brief A callback for user to obtain device_cb_id buffer id of ZBoss stack
|
||||
*
|
||||
* @return
|
||||
* - True: processed
|
||||
* - False: unprocessed
|
||||
*/
|
||||
typedef bool (*esp_zb_zcl_device_cb_id_callback_t)(uint8_t bufid);
|
||||
|
||||
/**
|
||||
* @brief A callback for user to obtain raw command bufid of ZBoss stack
|
||||
*
|
||||
* @note If the @p bufid has been processed in the callback, it should be freed using the zb_zcl_send_default_handler().
|
||||
*
|
||||
* @return
|
||||
* - True: processed
|
||||
* - False: unprocessed
|
||||
*/
|
||||
typedef bool (*esp_zb_zcl_raw_command_callback_t)(uint8_t bufid);
|
||||
|
||||
/** CLI response callback
|
||||
*
|
||||
* @param[in] bufid index of buffer with ZCL command
|
||||
*
|
||||
*/
|
||||
typedef uint8_t (*esp_zb_cli_resp_callback_t)(uint8_t bufid);
|
||||
|
||||
/** Identify callback
|
||||
*
|
||||
* @param[in] identify_on A indication that need start identify or stop
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_identify_notify_callback_t)(uint8_t identify_on);
|
||||
|
||||
/**
|
||||
* @brief ZCL reset default attribute callback
|
||||
*
|
||||
* @param[in] endpoint The Endpoint identifier
|
||||
* @param[in] cluster_id The cluster identifier
|
||||
* @param[in] curr_attr The current attribute information
|
||||
*
|
||||
* @return The default attribute value will be set to
|
||||
*/
|
||||
typedef void *(*esp_zb_zcl_reset_default_attr_callback_t)(uint8_t endpoint, uint16_t cluster_id, esp_zb_zcl_attribute_t curr_attr);
|
||||
|
||||
/**
|
||||
* @brief Register the Zigbee core action handler
|
||||
*
|
||||
* @param[in] cb A callback that user can handle the Zigbee action, refer to esp_zb_core_callback_t
|
||||
*
|
||||
*/
|
||||
void esp_zb_core_action_handler_register(esp_zb_core_action_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Register the Zigbee device_cb_id handler
|
||||
*
|
||||
* @param[in] cb A callback that user can handle the Zigbee raw device_cb_id buffer id, refer to esp_zb_core_callback_t
|
||||
*
|
||||
*/
|
||||
void esp_zb_device_cb_id_handler_register(esp_zb_zcl_device_cb_id_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Register the raw Zigbee command handler
|
||||
*
|
||||
* @param[in] cb A callback that user can handle the Zigbee raw command buffer id, refer to esp_zb_zcl_raw_command_callback_t
|
||||
*
|
||||
*/
|
||||
void esp_zb_raw_command_handler_register(esp_zb_zcl_raw_command_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Set the Command line interface (CLI) handler callback.
|
||||
*
|
||||
* @note Set a command handler callback for handle response from other device to CLI device.
|
||||
* @param[in] cb A CLI command handler callback that user used refer to esp_zb_cli_resp_callback_t
|
||||
*
|
||||
*/
|
||||
void esp_zb_cli_resp_handler_register(esp_zb_cli_resp_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Register the callback for the ZCL command send status
|
||||
*
|
||||
* @param[in] cb The ZCL command send status callback, refer to esp_zb_zcl_command_send_status_callback_t
|
||||
*/
|
||||
void esp_zb_zcl_command_send_status_handler_register(esp_zb_zcl_command_send_status_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Set the ZCL identify notify callback for specific endpoint.
|
||||
*
|
||||
* @note Set a callback for user to handle identify command.
|
||||
*
|
||||
* @param[in] endpoint A specific endpoint
|
||||
* @param[in] cb A identify notify callback that user used
|
||||
*
|
||||
*/
|
||||
void esp_zb_identify_notify_handler_register(uint8_t endpoint, esp_zb_identify_notify_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Add a callback and the privilege command the Zigbee cluster in endpoint.
|
||||
*
|
||||
* @note The privilege command will skip the Zigbee stack and be exposed to users by the callback indirectly.
|
||||
* Allowing different commands to use the same callback.
|
||||
*
|
||||
* @param[in] endpoint The specific endpoint for @p cluster
|
||||
* @param[in] cluster The specific cluster for @p command
|
||||
* @param[in] command The specific command ID is required to handle for users.
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failure
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_add_privilege_command(uint8_t endpoint, uint16_t cluster, uint16_t command);
|
||||
|
||||
/**
|
||||
* @brief Delete the privilege command from the @p cluster of @p endpoint
|
||||
*
|
||||
* @param[in] endpoint The specific endpoint for @p cluster
|
||||
* @param[in] cluster The specific cluster for @p command
|
||||
* @param[in] command The specific command ID will be deleted so that the stack will handle the command rather than user.
|
||||
* @return
|
||||
* - True: On success
|
||||
* - False: Nothing to delete
|
||||
*/
|
||||
bool esp_zb_zcl_delete_privilege_command(uint8_t endpoint, uint16_t cluster, uint16_t command);
|
||||
|
||||
/**
|
||||
* @brief Set the ZCL scenes cluster scene table for users.
|
||||
*
|
||||
* @param[in] endpoint The endpoint identifier
|
||||
* @param[in] group_id The group id of scene, which will be used to find scenes table record
|
||||
* @param[in] scene_id The scene id of scene, which will be used to find scenes table record
|
||||
* @param[in] transition_time The transition time of scene, whose unit is 100 milliseconds
|
||||
* @param[in] field The pointer to zcl sense extension field list
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: the group id or scene id is invalid
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_scenes_table_store(uint8_t endpoint, uint16_t group_id, uint8_t scene_id, uint16_t transition_time, esp_zb_zcl_scenes_extension_field_t *field);
|
||||
|
||||
/**
|
||||
* @brief View the zcl scene table
|
||||
*
|
||||
* @param[in] endpoint The specific endpoint identifier
|
||||
*/
|
||||
void esp_zb_zcl_scenes_table_show(uint8_t endpoint);
|
||||
|
||||
/**
|
||||
* @brief Clear zcl scenes table by index
|
||||
*
|
||||
* @param[in] index The index of scenes table
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_INVALID: id out of range
|
||||
* - ESP_FAILED: failed to clear scene table
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_scenes_table_clear_by_index(uint16_t index);
|
||||
|
||||
/**
|
||||
* @brief Set the maximum number of devices in a Zigbee network
|
||||
*
|
||||
* @note The function will only take effect when called before esp_zb_init(), it determins
|
||||
* several table size such as the neighbor table and routing table, 64 by default
|
||||
* @param[in] size The overall network size is expected to be set
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failure
|
||||
*/
|
||||
esp_err_t esp_zb_overall_network_size_set(uint16_t size);
|
||||
|
||||
/**
|
||||
* @brief Set Zigbee stack I/O buffer size
|
||||
*
|
||||
* @note The function will only take effect when called before esp_zb_init(), 80 by default.
|
||||
* @param[in] size The I/O buffer size is expected to be set
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failure
|
||||
*/
|
||||
esp_err_t esp_zb_io_buffer_size_set(uint16_t size);
|
||||
|
||||
/**
|
||||
* @brief Set Zigbee stack scheduler queue size
|
||||
*
|
||||
* @note The function will only take effect when called before esp_zb_init(), 80 by default.
|
||||
* @param[in] size The scheduler queue size is expected to be set
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failure
|
||||
*/
|
||||
esp_err_t esp_zb_scheduler_queue_size_set(uint16_t size);
|
||||
|
||||
/**
|
||||
* @brief Set APS source binding table size
|
||||
*
|
||||
* @note The function will only take effect when called before esp_zb_init(), 16 by default
|
||||
* @param[in] size The source binding table size is expected to be set
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failure
|
||||
*/
|
||||
esp_err_t esp_zb_aps_src_binding_table_size_set(uint16_t size);
|
||||
|
||||
/**
|
||||
* @brief Set APS destination binding table size
|
||||
*
|
||||
* @note The function will only take effect when called before esp_zb_init(), 16 by default
|
||||
* @param[in] size The destination binding table size is expected to be set
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failure
|
||||
*/
|
||||
esp_err_t esp_zb_aps_dst_binding_table_size_set(uint16_t size);
|
||||
|
||||
/**
|
||||
* @brief Zigbee stack initialization.
|
||||
*
|
||||
* @note To be called inside the application's main cycle at start.
|
||||
* @note Default is no NVRAM erase from start up, user could call factory reset for erase NVRAM and other action please refer esp_zb_factory_reset().
|
||||
* @note Make sure to use correct corresponding nwk_cfg with your device type @ref esp_zb_cfg_s.
|
||||
* @anchor esp_zb_init
|
||||
* @param[in] nwk_cfg The pointer to the initialization Zigbee configuration
|
||||
*
|
||||
*/
|
||||
void esp_zb_init(esp_zb_cfg_t *nwk_cfg);
|
||||
|
||||
/**
|
||||
* @brief Set the BDB primary channel mask.
|
||||
*
|
||||
* Beacon request will be sent on these channels for the BDB energy scan.
|
||||
*
|
||||
* @note This function should be run AFTER @ref esp_zb_init is called and before @ref esp_zb_start. These masks define the allowable channels on which the device may attempt to
|
||||
* form or join a network at startup time. If function is not called, by default it will scan all channels or read from `zb_fct` NVRAM zone if available. Please refer to tools/mfg_tool.
|
||||
* @param[in] channel_mask Valid channel mask is from 0x00000800 (only channel 11) to 0x07FFF800 (all channels from 11 to 26)
|
||||
* @return - ESP_OK on success
|
||||
- ESP_ERR_INVALID_ARG if the channel mask is out of range
|
||||
*/
|
||||
esp_err_t esp_zb_set_primary_network_channel_set(uint32_t channel_mask);
|
||||
|
||||
/**
|
||||
* @brief Get the BDB primary channel mask
|
||||
*
|
||||
* @return A 32-bit channel mask
|
||||
*/
|
||||
uint32_t esp_zb_get_primary_network_channel_set(void);
|
||||
|
||||
/**
|
||||
* @brief Set the BDB secondary channel mask.
|
||||
*
|
||||
* Beacon request will be sent on these channels for the BDB energy scan, if no network found after energy scan on the primary channels.
|
||||
*
|
||||
* @param[in] channel_mask Valid channel mask is from 0x00000800 (only channel 11) to 0x07FFF800 (all channels from 11 to 26)
|
||||
* @return - ESP_OK on success
|
||||
- ESP_ERR_INVALID_ARG if the channel mask is out of range
|
||||
*/
|
||||
esp_err_t esp_zb_set_secondary_network_channel_set(uint32_t channel_mask);
|
||||
|
||||
/**
|
||||
* @brief Get the BDB secondary channel mask
|
||||
*
|
||||
* @return A 32-bit channel mask
|
||||
*/
|
||||
uint32_t esp_zb_get_secondary_network_channel_set(void);
|
||||
|
||||
/**
|
||||
* @brief Set the 2.4G channel mask.
|
||||
*
|
||||
* @param[in] channel_mask Valid channel mask is from 0x00000800 (only channel 11) to 0x07FFF800 (all channels from 11 to 26)
|
||||
* @return - ESP_OK on success
|
||||
- ESP_ERR_INVALID_ARG if the channel mask is out of range
|
||||
*/
|
||||
esp_err_t esp_zb_set_channel_mask(uint32_t channel_mask);
|
||||
|
||||
/**
|
||||
* @brief Get the 2.4 channel mask
|
||||
*
|
||||
* @return A 32-bit channel mask
|
||||
*/
|
||||
uint32_t esp_zb_get_channel_mask(void);
|
||||
|
||||
/**
|
||||
* @brief Check if device is factory new.
|
||||
*
|
||||
* @return - True factory new.
|
||||
*
|
||||
*/
|
||||
bool esp_zb_bdb_is_factory_new(void);
|
||||
|
||||
/**
|
||||
* @brief Get the scan duration time
|
||||
*
|
||||
* @return Scan duration is in beacon intervals (15.36 ms)
|
||||
*/
|
||||
uint8_t esp_zb_bdb_get_scan_duration(void);
|
||||
|
||||
/**
|
||||
* @brief Set the scan duration time
|
||||
*
|
||||
* @param[in] duration The scan duration time is in beacon intervals, defined as ((1 << duration) + 1) * 15.36 ms
|
||||
*/
|
||||
void esp_zb_bdb_set_scan_duration(uint8_t duration);
|
||||
|
||||
/**
|
||||
* @brief Open Zigbee network
|
||||
*
|
||||
* @param[in] permit_duration Zigbee network open time
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_NO_MEM: not memory
|
||||
* - ESP_FAILED: on failed
|
||||
*/
|
||||
esp_err_t esp_zb_bdb_open_network(uint8_t permit_duration);
|
||||
|
||||
/**
|
||||
* @brief Close Zigbee network
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failure
|
||||
*/
|
||||
esp_err_t esp_zb_bdb_close_network(void);
|
||||
|
||||
/**
|
||||
* @brief Check if device has joined network or not
|
||||
*
|
||||
* @return
|
||||
* - true: device is joined
|
||||
* - false: device is not joined
|
||||
*/
|
||||
bool esp_zb_bdb_dev_joined(void);
|
||||
|
||||
/**
|
||||
* @brief Set Touchlink NWK channel
|
||||
*
|
||||
* @param[in] channel Touchlink NWK channel value
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_touchlink_set_nwk_channel(uint8_t channel);
|
||||
|
||||
/**
|
||||
* @brief Set the tx power.
|
||||
* @param[in] power 8-bit of power value in dB, ranging from IEEE802154_TXPOWER_VALUE_MIN to IEEE802154_TXPOWER_VALUE_MAX
|
||||
*/
|
||||
void esp_zb_set_tx_power(int8_t power);
|
||||
|
||||
/**
|
||||
* @brief Get the tx power.
|
||||
* @param[in] power 8-bit of power pointer value in dB
|
||||
*/
|
||||
void esp_zb_get_tx_power(int8_t *power);
|
||||
|
||||
/**
|
||||
* @brief Start top level commissioning procedure with specified mode mask.
|
||||
*
|
||||
* @param[in] mode_mask commissioning modes refer to esp_zb_bdb_commissioning_mode
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_bdb_start_top_level_commissioning(uint8_t mode_mask);
|
||||
|
||||
/**
|
||||
* @brief Perform `local reset` procedure
|
||||
* @note This only takes effect when the device is on a network. The device will leave the current network and
|
||||
* clear all Zigbee persistent data, except the outgoing NWK frame counter. It will be in nearly the same
|
||||
* state as when it left the factory. A `ZB_ZDO_SIGNAL_LEAVE` signal with `ESP_ZB_NWK_LEAVE_TYPE_RESET`
|
||||
* will be triggered to indicate the end of the procedure.
|
||||
*/
|
||||
void esp_zb_bdb_reset_via_local_action(void);
|
||||
|
||||
/**
|
||||
* @brief Perform "factory reset" procedure
|
||||
* @note The device will completely erase the `zb_storage` partition and then restart
|
||||
*/
|
||||
void esp_zb_factory_reset(void);
|
||||
|
||||
/**
|
||||
* @brief Reset all endpoints to factory default
|
||||
*
|
||||
* @note If @p cb is not set or @p cb return NULL, the default attribute value will be set to zero
|
||||
* @param[in] reset_report Whether reset report of clusters or not
|
||||
* @param[in] cb The user can utilize the callback to set default attribute value
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failed
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_reset_all_endpoints_to_factory_default(bool reset_report, esp_zb_zcl_reset_default_attr_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Reset endpoint to factory default
|
||||
*
|
||||
* @note If @p cb is not set or @p cb return NULL, the default attribute value will be set to zero
|
||||
* @param[in] endpoint The endpoint identifier which will be reset
|
||||
* @param[in] reset_report Whether reset report of clusters or not
|
||||
* @param[in] cb The user can utilize the callback to set default attribute value
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failed
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_reset_endpoint_to_factory_default(uint8_t endpoint, bool reset_report, esp_zb_zcl_reset_default_attr_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Reset the NVRAM and ZCL data to factory default
|
||||
*
|
||||
*/
|
||||
void esp_zb_zcl_reset_nvram_to_factory_default(void);
|
||||
|
||||
/**
|
||||
* @brief Start Zigbee function.
|
||||
*
|
||||
* @param[in] autostart - true autostart mode
|
||||
* - false no-autostart mode
|
||||
*
|
||||
* @note Autostart mode: It initializes, load some parameters from NVRAM and proceed with startup.
|
||||
* Startup means either Formation (for ZC), rejoin or discovery/association join. After startup
|
||||
* complete, @ref esp_zb_app_signal_handler is called, so application will know when to do
|
||||
* some useful things.
|
||||
*
|
||||
* @note No-autostart mode: It initializes scheduler and buffers pool, but not MAC and upper layers.
|
||||
* Notifies the application that Zigbee framework (scheduler, buffer pool, etc.) has started, but no
|
||||
* join/rejoin/formation/BDB initialization has been done yet.
|
||||
* Typically esp_zb_start with no_autostart mode is used when application wants to do something before
|
||||
* starting joining the network.
|
||||
*
|
||||
* For example, you can use this function if it is needed to enable leds, timers
|
||||
* or any other devices on periphery to work with them before starting working in a network. It's
|
||||
* also useful if you want to run something locally during joining.
|
||||
*
|
||||
* @note Precondition: stack must be initialized by @ref esp_zb_init call. @ref esp_zb_init sets default IB
|
||||
* parameters, so caller has a chance to change some of them. Note that NVRAM and product config will be
|
||||
* loaded after esp_zb_start() call.
|
||||
*
|
||||
* @note Zigbee stack is not looped in this routine. Instead, it schedules callback and returns. Caller
|
||||
* must run esp_zb_stack_main_loop() after this routine.
|
||||
*
|
||||
* @note Application should later call Zigbee commissioning initiation - for instance,
|
||||
* esp_zb_bdb_start_top_level_commissioning().
|
||||
* @anchor esp_zb_start
|
||||
* @return - ESP_OK on success
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_start(bool autostart);
|
||||
|
||||
/**
|
||||
* @brief Get the stack is started or not.
|
||||
*
|
||||
* @return true if the stack has been started, false otherwise.
|
||||
*
|
||||
*/
|
||||
bool esp_zb_is_started(void);
|
||||
|
||||
/**
|
||||
* @brief Acquire Zigbee lock.
|
||||
*
|
||||
* @note It's mandatory to acquire the lock before calling any Zigbee SDK APIs, except that the call site is in Zigbee callbacks.
|
||||
* @return
|
||||
* - true: on success
|
||||
*
|
||||
*/
|
||||
bool esp_zb_lock_acquire(TickType_t block_ticks);
|
||||
|
||||
/**
|
||||
* @brief Release Zigbee lock.
|
||||
*
|
||||
*/
|
||||
void esp_zb_lock_release(void);
|
||||
|
||||
/**
|
||||
* @brief Zigbee main loop iteration.
|
||||
*
|
||||
* @deprecated Please use esp_zb_stack_main_loop() instead
|
||||
* @note Must be called after esp_zb_init() and esp_zb_start()
|
||||
inside the application's main cycle.
|
||||
*
|
||||
*/
|
||||
ESP_ZB_DEPRECATED
|
||||
void esp_zb_main_loop_iteration(void);
|
||||
|
||||
/**
|
||||
* @brief Zigbee stack main loop iteration once.
|
||||
*
|
||||
* @note Must be called after esp_zb_init() and esp_zb_start().
|
||||
*/
|
||||
void esp_zb_stack_main_loop_iteration(void);
|
||||
|
||||
/**
|
||||
* @brief Zigbee stack main loop.
|
||||
*
|
||||
* @note Must be called after esp_zb_init() and esp_zb_start(), it’s an infinite main loop.
|
||||
*/
|
||||
void esp_zb_stack_main_loop(void);
|
||||
|
||||
/**
|
||||
* @brief Zigbee CLI example main loop iteration.
|
||||
*
|
||||
* @note It is ONLY for cli specific example loop iteration.
|
||||
*
|
||||
*/
|
||||
void esp_zb_cli_main_loop_iteration(void);
|
||||
|
||||
/**
|
||||
* @brief Enable/Disable erasing the zb_storage field before the stack runs
|
||||
*
|
||||
* @note Enable or disable NVRAM erasing on every application startup. Erasing is disabled by default.
|
||||
* @param erase - 1 to enable erasing; 0 - disable.
|
||||
*
|
||||
*/
|
||||
void esp_zb_nvram_erase_at_start(bool erase);
|
||||
|
||||
/**
|
||||
* @brief Zigbee stack application signal handler.
|
||||
* @anchor esp_zb_app_signal_handler
|
||||
*
|
||||
* @param[in] signal_s pointer of Zigbee zdo app signal struct @ref esp_zb_app_signal_s.
|
||||
* @note After esp_zb_start, user shall based on the corresponding signal type refer to esp_zdo_app_signal_type from struct pointer signal_s to do certain actions.
|
||||
* User could also use refer to esp_zb_bdb_start_top_level_commissioning to change BDB mode.
|
||||
* @warning This function has to be defined by user in each example.
|
||||
*/
|
||||
void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_s);
|
||||
|
||||
/**
|
||||
* @brief Obtains pointer to parameters passed with application signal.
|
||||
*
|
||||
* @param[in] signal_p pointer to the application signal type @ref esp_zb_app_signal_s of p_app_signal
|
||||
* @return void pointer to certain signal param content
|
||||
*/
|
||||
void *esp_zb_app_signal_get_params(uint32_t *signal_p);
|
||||
|
||||
/**
|
||||
* @brief Schedule alarm - callback to be executed after timeout.
|
||||
*
|
||||
* @note Function will be called via scheduler after timeout expired in millisecond. Timer resolution depends on implementation. Same callback can be scheduled for execution more then once.
|
||||
*
|
||||
* @param[in] cb - function to call via scheduler
|
||||
* @param[in] param - parameter to pass to the function
|
||||
* @param[in] time - timeout, in millisecond
|
||||
*/
|
||||
void esp_zb_scheduler_alarm(esp_zb_callback_t cb, uint8_t param, uint32_t time);
|
||||
|
||||
/**
|
||||
* @brief Cancel scheduled alarm.
|
||||
*
|
||||
* @note This function cancel previously scheduled alarm.
|
||||
*
|
||||
* @param[in] cb - function to cancel
|
||||
* @param[in] param - parameter to pass to the function to cancel
|
||||
*/
|
||||
void esp_zb_scheduler_alarm_cancel(esp_zb_callback_t cb, uint8_t param);
|
||||
|
||||
/**
|
||||
* @brief Schedule user alarm - callback to be executed after timeout.
|
||||
*
|
||||
* @note Function will be called via scheduler after timeout expired in millisecond. Timer resolution depends on implementation. Same callback can be scheduled for execution more then once.
|
||||
*
|
||||
* @param[in] cb - function to call via scheduler
|
||||
* @param[in] param - parameter to pass to the function
|
||||
* @param[in] time - timeout, in millisecond
|
||||
*
|
||||
* @return
|
||||
* - the handle used to cancel the user alarm
|
||||
*/
|
||||
esp_zb_user_cb_handle_t esp_zb_scheduler_user_alarm(esp_zb_user_callback_t cb, void *param, uint32_t time);
|
||||
|
||||
/**
|
||||
* @brief Cancel scheduled user alarm.
|
||||
*
|
||||
* @note This function cancel previously scheduled user alarm.
|
||||
*
|
||||
* @param[in] handle - the handle returned by esp_zb_scheduler_user_alarm
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_NOT_FOUND: not found the user alarm
|
||||
*/
|
||||
esp_err_t esp_zb_scheduler_user_alarm_cancel(esp_zb_user_cb_handle_t handle);
|
||||
|
||||
/**
|
||||
* @brief Set BDB commissioning mode.
|
||||
*
|
||||
* @param[in] commissioning_mode commissioning mode that refer to esp_zb_bdb_commissioning_mode_mask_t.
|
||||
*
|
||||
*/
|
||||
void esp_zb_set_bdb_commissioning_mode(esp_zb_bdb_commissioning_mode_mask_t commissioning_mode);
|
||||
|
||||
/**
|
||||
* @brief Set BDB commissioning mode
|
||||
*
|
||||
* @return commissioning mode, refer to esp_zb_bdb_commissioning_mode_mask_t
|
||||
*/
|
||||
esp_zb_bdb_commissioning_mode_mask_t esp_zb_get_bdb_commissioning_mode(void);
|
||||
|
||||
/**
|
||||
* @brief Schedule to cancel Steering procedure for a node not on a network
|
||||
*
|
||||
* @note The signal ESP_ZB_BDB_SIGNAL_STEERING_CANCELLED with the status of this operation will be raised.
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failed
|
||||
*/
|
||||
esp_err_t esp_zb_bdb_cancel_steering(void);
|
||||
|
||||
/**
|
||||
* @brief Schedule to cancel Formation procedure
|
||||
*
|
||||
* @note The signal ESP_ZB_BDB_SIGNAL_FORMATION_CANCELLED with the status of the operation will be raised.
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failed
|
||||
*/
|
||||
esp_err_t esp_zb_bdb_cancel_formation(void);
|
||||
|
||||
/* ZCL attribute, cluster, endpoint, device related */
|
||||
|
||||
/**
|
||||
* @brief Register a Zigbee device.
|
||||
*
|
||||
* @note
|
||||
* 1. After successful registration, the SDK will retain a copy of the whole data model,
|
||||
* the \p ep_list will be freed.
|
||||
* 2. For any lists (e.g. ``esp_zb_cluster_list_t`` and ``esp_zb_attribute_list_t``) added to the data
|
||||
* modal should only be created and modified by the API.
|
||||
* 3. Please DO NOT reuse ANY of lists in the data mode. If you have two identical stuff (e.g. two endpoints
|
||||
* with identical clusters), please create/add them twice.
|
||||
*
|
||||
* @param[in] ep_list An endpoint list which wants to register, see @ref esp_zb_ep_list_s
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_device_register(esp_zb_ep_list_t *ep_list);
|
||||
|
||||
#ifdef ZB_DISTRIBUTED_SECURITY_ON
|
||||
|
||||
/**
|
||||
* @brief Set trust center policy state to distributed or not
|
||||
*
|
||||
* @param[in] enabled The trust center policy state
|
||||
*/
|
||||
void esp_zb_tc_policy_set_distributed_security(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Check the trust center policy is distributed
|
||||
*
|
||||
* @return
|
||||
* - true: trust center policy is set as distributed
|
||||
* - false: trust center policy is not set as distributed
|
||||
*/
|
||||
bool esp_zb_tc_policy_get_distributed_security();
|
||||
|
||||
/**
|
||||
* @brief Enable or disable the Zigbee distributed network.
|
||||
*
|
||||
* @param[in] enabled The status of Zigbee distribute network
|
||||
*/
|
||||
void esp_zb_enable_distributed_network(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Allow to setup network as distributed when started
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_setup_network_as_distributed(void);
|
||||
|
||||
/**
|
||||
* @brief Check if the current network is a distributed security network
|
||||
*
|
||||
* @return - True: The current network is distributed, otherwise it is not.
|
||||
*/
|
||||
bool esp_zb_network_is_distributed(void);
|
||||
|
||||
/**
|
||||
* @brief Enable or disable the Zigbee device to join a distributed TC network
|
||||
*
|
||||
* @note It is disabled by default
|
||||
*
|
||||
* @param[in] enabled Enable or disable
|
||||
*/
|
||||
void esp_zb_enable_joining_to_distributed(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Determine whether the Zigbee device can join the distributed TC network or not
|
||||
*
|
||||
* @return - True: The Zigbee device can join the distributed TC network; otherwise, it cannot
|
||||
*/
|
||||
bool esp_zb_joining_to_distributed_network_enabled(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set the sleep threshold on the device. When the scheduler detects that the device can enter sleep mode,
|
||||
* it will notify the application with the signal ESP_ZB_COMMON_SIGNAL_CAN_SLEEP.
|
||||
* The default sleep threshold is 20 milliseconds.
|
||||
*
|
||||
* @param[in] threshold_ms Sleep threshold in milliseconds
|
||||
*
|
||||
* @return ESP_OK if new threshold is valid and applied.
|
||||
* @return ESP_FAIL if the user attempts to set a threshold greater than ESP_ZB_SLEEP_MAXIMUM_THRESHOLD_MS.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_sleep_set_threshold(uint32_t threshold_ms);
|
||||
|
||||
/**
|
||||
* @brief Blocking function responsible for putting device into sleep mode.
|
||||
*/
|
||||
void esp_zb_sleep_now(void);
|
||||
|
||||
/**
|
||||
* @brief Enable the Zigbee sleep.
|
||||
*
|
||||
* @param[in] enable Enable Zigbee Sleep
|
||||
*
|
||||
*/
|
||||
void esp_zb_sleep_enable(bool enable);
|
||||
|
||||
/**
|
||||
* @brief Get Zigbee sleep is enable or not.
|
||||
*
|
||||
* @return TRUE Zigbee sleep is enable.
|
||||
* @return FALSE Zigbee sleep is disable.
|
||||
*
|
||||
*/
|
||||
bool esp_zb_sleep_is_enable(void);
|
||||
|
||||
/**
|
||||
* @brief Get bdb_commissioning_status
|
||||
*
|
||||
* @return commissioning_status refer to esp_zb_bdb_commissioning_status_t
|
||||
*
|
||||
*/
|
||||
#ifndef ZB_MACSPLIT_DEVICE
|
||||
esp_zb_bdb_commissioning_status_t esp_zb_get_bdb_commissioning_status(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee node descriptor manufacturer code.
|
||||
*
|
||||
* @note The function should be called in ESP_ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY signal
|
||||
|
||||
* @param[in] manufacturer_code The manufacturer code of Zigbee device
|
||||
*/
|
||||
void esp_zb_set_node_descriptor_manufacturer_code(uint16_t manufacturer_code);
|
||||
|
||||
/**
|
||||
* @brief Get the version string of the SDK.
|
||||
*
|
||||
* @return The version string of the SDK.
|
||||
*/
|
||||
const char *esp_zb_get_version_string(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/**
|
||||
* @brief Create an empty endpoint list.
|
||||
*
|
||||
* @note This endpoint list is ready to add endpoint refer @ref esp_zb_ep_list_add_ep.
|
||||
* @return pointer to @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_ep_list_create(void);
|
||||
|
||||
/**
|
||||
* @brief Add an endpoint (which includes cluster list) in a endpoint list.
|
||||
*
|
||||
* @param[in] ep_list A pointer to endpoint list @ref esp_zb_ep_list_s
|
||||
* @param[in] cluster_list An cluster list which wants to add to endpoint
|
||||
* @param[in] endpoint_config A specific endpoint config @ref esp_zb_endpoint_config_s
|
||||
* @anchor esp_zb_ep_list_add_ep
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if endpoint list not initialized
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_ep_list_add_ep(esp_zb_ep_list_t *ep_list, esp_zb_cluster_list_t *cluster_list, esp_zb_endpoint_config_t endpoint_config);
|
||||
|
||||
/**
|
||||
* @brief Add a gateway endpoint to the endpoint list.
|
||||
* @param[in] ep_list A pointer to the endpoint list where the @p cluster_list will be added, @ref esp_zb_ep_list_s.
|
||||
* @param[in] cluster_list A pointer to @ref esp_zb_cluster_list_s indicating the gateway's clusters.
|
||||
* @param[in] endpoint_config The specific endpoint configuration, @ref esp_zb_endpoint_config_s.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success.
|
||||
* - ESP_ERR_NO_MEM if the number of gateways reaches the limit.
|
||||
* - ESP_ERR_INVALID_ARG if the endpoint list is not initialized.
|
||||
*/
|
||||
esp_err_t esp_zb_ep_list_add_gateway_ep(esp_zb_ep_list_t *ep_list, esp_zb_cluster_list_t *cluster_list, esp_zb_endpoint_config_t endpoint_config);
|
||||
|
||||
/**
|
||||
* @brief Get endpoint (cluster list) from a endpoint list.
|
||||
*
|
||||
* @param[in] ep_list A pointer to endpoint list @ref esp_zb_ep_list_s
|
||||
* @param[in] ep_id The endpoint id for cluster list
|
||||
*
|
||||
* @return
|
||||
* - pointer to @ref esp_zb_cluster_list_s, if the endpoint is found in the endpoint list
|
||||
* - ``NULL`` if endpoint is not found
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_ep_list_get_ep(const esp_zb_ep_list_t *ep_list, uint8_t ep_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
#include "zcl/esp_zigbee_zcl_common.h"
|
||||
|
||||
/**
|
||||
* @brief The basic zcl information for OTA command
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ota_zcl_information_s {
|
||||
esp_zb_zcl_addr_t src_addr; /*!< The source address */
|
||||
uint16_t dst_short_addr; /*!< The destination short address */
|
||||
uint8_t src_endpoint; /*!< The source endpoint identifier */
|
||||
uint8_t dst_endpoint; /*!< The destination endpoint identifier */
|
||||
uint16_t cluster_id; /*!< The cluster identifier */
|
||||
uint16_t profile_id; /*!< The profile identifier */
|
||||
uint8_t command_id; /*!< The command identifier */
|
||||
uint16_t manufacturer_specific; /*!< The manufacturer specific data */
|
||||
} esp_zb_ota_zcl_information_t;
|
||||
|
||||
/**
|
||||
* @brief The ZCL ota upgrade header optional structure
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ota_file_optional_s {
|
||||
uint8_t security_credential_version; /*!< Indicate security credential version type such as SE1.0 or SE2.0 that the client
|
||||
is required to have, before it SHALL install the image. */
|
||||
esp_zb_ieee_addr_t upgrade_file_destination;/*!< Indicates that this OTA file contains security credential/certificate data or
|
||||
other type of information that is specific to a particular device.*/
|
||||
uint16_t minimum_hardware_version; /*!< Represent the earliest hardware platform version this image SHOULD be used on. */
|
||||
uint16_t maximum_hardware_version; /*!< Represent the latest hardware platform version this image SHOULD be used on. */
|
||||
} esp_zb_ota_file_optional_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZCL OTA file header struct.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ota_file_header_s {
|
||||
uint16_t manufacturer_code; /*!< OTA header manufacturer code */
|
||||
uint16_t image_type; /*!< Image type value to distinguish the products */
|
||||
uint32_t file_version; /*!< File version represents the release and build number of the image’s application and stack */
|
||||
uint32_t image_size; /*!< Total image size in bytes transferred from the server to the client */
|
||||
uint16_t field_control; /*!< Indicate whether additional optional information */
|
||||
esp_zb_ota_file_optional_t optional; /*!< The optional header controlled by the filed contorl, @see esp_zb_ota_file_optional_t */
|
||||
} esp_zb_ota_file_header_t;
|
||||
|
||||
/**
|
||||
* @brief A callback for the OTA Server to retrieve the next OTA data
|
||||
*
|
||||
* @param[in] message The message will provide the basic OTA cluster information, @ref esp_zb_ota_zcl_information_s
|
||||
* @param[in] index The index of the OTA file
|
||||
* @param[in] size The size indicates how many bytes the user needs to allocate for the @p data
|
||||
* @param[out] data The next OTA data that will be transmit to OTA Client by the OTA Server
|
||||
*
|
||||
*/
|
||||
typedef esp_err_t (*esp_zb_ota_next_data_callback_t)(esp_zb_ota_zcl_information_t message, uint16_t index, uint8_t size, uint8_t **data);
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZCL OTA upgrade client variable configuration struct.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zcl_ota_upgrade_client_variable_s {
|
||||
uint16_t timer_query; /*!< The field indicates the time of querying OTA image for OTA upgrade client */
|
||||
uint16_t hw_version; /*!< The hardware version */
|
||||
uint8_t max_data_size; /*!< The maximum size of OTA data */
|
||||
} esp_zb_zcl_ota_upgrade_client_variable_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZCL OTA upgrade server variable configuration struct.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zcl_ota_upgrade_server_variable_s {
|
||||
uint8_t query_jitter; /*!< Query jitter */
|
||||
uint32_t current_time; /*!< Current time of OTA server */
|
||||
uint8_t file_count; /*!< The field specifies the maximum number of OTA files for the OTA upgrade server variable. */
|
||||
} esp_zb_zcl_ota_upgrade_server_variable_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZCL OTA upgrade server notification request struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ota_upgrade_server_notify_req_s {
|
||||
uint8_t endpoint; /*!< The endpoint identifier for ota server cluster */
|
||||
uint8_t index; /*!< The index of OTA file */
|
||||
uint8_t notify_on; /*!< The field indicates whether send the notification request directly */
|
||||
uint32_t ota_upgrade_time; /*!< The time indicates the interval for the OTA file upgrade after the OTA process is completed */
|
||||
esp_zb_ota_file_header_t ota_file_header; /*!< The header is used to register the basic OTA upgrade information */
|
||||
esp_zb_ota_next_data_callback_t next_data_cb; /*!< The callback is used to retrieve the next OTA data, which will be transmitted to the OTA client side */
|
||||
} esp_zb_ota_upgrade_server_notify_req_t;
|
||||
|
||||
/********************* Declare functions **************************/
|
||||
/**
|
||||
* @brief Notify the image upgrade event of OTA upgrade server
|
||||
*
|
||||
* @param[in] req The OTA file information request @ref esp_zb_ota_upgrade_server_notify_req_s
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_NOT_FOUND: Not found the variable table in the OTA server side
|
||||
* - ESP_ERR_INVALID_ARG: The input arguments are incorrect or invalid.
|
||||
*/
|
||||
esp_err_t esp_zb_ota_upgrade_server_notify_req(esp_zb_ota_upgrade_server_notify_req_t *req);
|
||||
|
||||
/**
|
||||
* @brief Send the OTA upgrade client query image request
|
||||
*
|
||||
* @param[in] server_addr The short address of the OTA upgrade server that the client expect to query
|
||||
* @param[in] server_ep The endpoint identifier of the OTA upgrade server with OTA image
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_FAIL: On failed
|
||||
*/
|
||||
esp_err_t esp_zb_ota_upgrade_client_query_image_req(uint16_t server_ep, uint8_t server_addr);
|
||||
|
||||
/**
|
||||
* @brief Set the interval of query for OTA upgrade client
|
||||
*
|
||||
* @param[in] endpoint The endpoint identifier of OTA upgrade client resides
|
||||
* @param[in] interval The interval in minute
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_FAIL: On failed
|
||||
*/
|
||||
esp_err_t esp_zb_ota_upgrade_client_query_interval_set(uint8_t endpoint, uint16_t interval);
|
||||
|
||||
/**
|
||||
* @brief Stop the image query of OTA upgrade client
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_FAIL: On failed
|
||||
*/
|
||||
esp_err_t esp_zb_ota_upgrade_client_query_image_stop(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,252 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** Enum of the Zigbee secure install code type
|
||||
* @note It is formed with 6/8/12/16 bytes IC (install code) + 2 bytes of CRC
|
||||
* @anchor esp_zb_secur_ic_type_t
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_IC_TYPE_48 = 0x0, /*!< Install code total of 8 bytes length */
|
||||
ESP_ZB_IC_TYPE_64 = 0x1, /*!< Install code total of 10 bytes length */
|
||||
ESP_ZB_IC_TYPE_96 = 0x2, /*!< Install code total of 14 bytes length */
|
||||
ESP_ZB_IC_TYPE_128 = 0x3, /*!< Install code total of 18 bytes length */
|
||||
ESP_ZB_IC_TYPE_MAX = 0x4 /*!< Unknown type */
|
||||
} esp_zb_secur_ic_type_t;
|
||||
/********************* Declare functions **************************/
|
||||
|
||||
/**
|
||||
* @brief Enable Trust Center to only use install code policy
|
||||
*
|
||||
* @param[in] enabled A boolean indicating whether only the install code policy is enabled.
|
||||
* @return
|
||||
* - ESP_OK: on success, otherwise, failed
|
||||
*/
|
||||
esp_err_t esp_zb_secur_ic_only_enable(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Get the Zigbee install code from storage
|
||||
*
|
||||
* @warning Only for the non-Trust Center device (non Zigbee coordinator)!
|
||||
* @note Called only after esp_zb_start(), otherwise no install code has been set from
|
||||
* production config refer to tools/mfg_tool
|
||||
*
|
||||
* @param[out] ic_type A pointer of install code type @ref esp_zb_secur_ic_type_t
|
||||
*
|
||||
* @return A pointer to the install code
|
||||
*
|
||||
*/
|
||||
uint8_t *esp_zb_secur_ic_get(uint8_t *ic_type);
|
||||
|
||||
/**
|
||||
* @brief Add the Zigbee install code from remote device
|
||||
*
|
||||
* @warning Only for the Trust Center device (Zigbee coordinator)!
|
||||
*
|
||||
* @param[in] address A 64-bit ieee address of the remote device composed by array of zb_uint8_t
|
||||
* @param[in] ic_str A string of the install code
|
||||
*
|
||||
* @return -ESP_OK on success
|
||||
*/
|
||||
esp_err_t esp_zb_secur_ic_str_add(esp_zb_ieee_addr_t address, char *ic_str);
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee install code from character string
|
||||
*
|
||||
* @note if user wants to manually set install code instead of from production config refer to esp-zigbee-sdk/tools/mfg_tool
|
||||
*
|
||||
* @warning Only for the non-Trust Center device (non Zigbee coordinator)!
|
||||
*
|
||||
* @param[in] ic_str A string of the install code
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_secur_ic_str_set(char *ic_str);
|
||||
|
||||
/**
|
||||
* @brief Add the Zigbee install code of a remote device with type
|
||||
*
|
||||
* @warning Only for the Trust Center device (Zigbee coordinator)!
|
||||
*
|
||||
* @param[in] address A 64-bit ieee address of the remote device composed by array of zb_uint8_t
|
||||
* @param[in] ic_type A install code type @ref esp_zb_secur_ic_type_t
|
||||
* @param[in] ic A pointer of data array for install code
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_secur_ic_add(esp_zb_ieee_addr_t address, uint8_t ic_type, uint8_t *ic);
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee install code for a Zigbee device with type
|
||||
*
|
||||
* @note if user wants to set install code with type manually instead of from production config check esp-zigbee-sdk/tools/mfg_tool
|
||||
*
|
||||
* @warning Only for the non-Trust Center device (non Zigbee coordinator)!
|
||||
*
|
||||
* @param[in] ic_type A install code type @ref esp_zb_secur_ic_type_t
|
||||
* @param[in] ic A pointer of data array for install code
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_secur_ic_set(uint8_t ic_type, uint8_t *ic);
|
||||
|
||||
/**
|
||||
* @brief remove the Zigbee install code of a specific device
|
||||
*
|
||||
* @warning Only for the Trust Center device (Zigbee coordinator)!
|
||||
*
|
||||
* @param[in] address device ieee addressing to remove ic
|
||||
* @return - ESP_OK on success
|
||||
*/
|
||||
esp_err_t esp_zb_secur_ic_remove_req(esp_zb_ieee_addr_t address);
|
||||
|
||||
/**
|
||||
* @brief remove the Zigbee ALL install code
|
||||
*
|
||||
* @warning Only for the Trust Center device (Zigbee coordinator)!
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
*/
|
||||
esp_err_t esp_zb_secur_ic_remove_all_req(void);
|
||||
|
||||
/**
|
||||
* @brief Set the Trust Center standard distributed key
|
||||
*
|
||||
* @param key A pointer to standard distributed key of Trust Center that will be set to
|
||||
*/
|
||||
void esp_zb_secur_TC_standard_distributed_key_set(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set the Trust Center pre-configured security key
|
||||
*
|
||||
* @param key A pointer to the pre-configured key of Trust Center that will be set to
|
||||
*/
|
||||
void esp_zb_secur_TC_standard_preconfigure_key_set(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set the link key exchange requirement for a ZigBee node.
|
||||
*
|
||||
* @note The ZigBee end device with @p disabled will not request key from the ZigBee coordinator.
|
||||
* The ZigBee coordinator with @p disabled allows the end device to stay in network without a TC-link key exchange.
|
||||
* @param[in] enable Enable or Disable
|
||||
*/
|
||||
void esp_zb_secur_link_key_exchange_required_set(bool enable);
|
||||
|
||||
/**
|
||||
* @brief Enable/Disable the network layer security
|
||||
*
|
||||
* @param[in] enabled A boolean indicating whether network layer security will be enabled
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_INVALID_STATE: Invalid setting when the device is in network state
|
||||
* - Otherwise: On failure
|
||||
*/
|
||||
esp_err_t esp_zb_secur_network_security_enable(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Get the network security enabled state
|
||||
*
|
||||
* @return Whether the network layer security is enabled or not
|
||||
*/
|
||||
bool esp_zb_secur_network_security_is_enabled(void);
|
||||
|
||||
/**
|
||||
* @brief Get the primary security network key
|
||||
*
|
||||
* @note The network key can only be obtained after the Zigbee device is the joined state.
|
||||
* @param[out] key The 16-byte network key
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_INVALID_STATE: invalid network state.
|
||||
*/
|
||||
esp_err_t esp_zb_secur_primary_network_key_get(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee security network key
|
||||
*
|
||||
* @param key A 16-byte security network key that will be used
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_INVALID_STATE: invalid network state.
|
||||
*/
|
||||
esp_err_t esp_zb_secur_network_key_set(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Switches the network key using the specified Key Sequence Number.
|
||||
*
|
||||
* @param[in] key A 16-byte security network key that will be switched
|
||||
* @param[in] key_seq_num The sequence number of the network key to switch to.
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_zb_secur_network_key_switch(const uint8_t *key, uint8_t key_seq_num);
|
||||
|
||||
/**
|
||||
* @brief Get the minimum LQI values for device joining the network
|
||||
*
|
||||
* @return The minimum LQI values
|
||||
*/
|
||||
uint8_t esp_zb_secur_network_min_join_lqi_get(void);
|
||||
|
||||
/**
|
||||
* @brief Set the minimum LQI value for device joining the network
|
||||
*
|
||||
* @param[in] lqi The LQI values
|
||||
*/
|
||||
void esp_zb_secur_network_min_join_lqi_set(uint8_t lqi);
|
||||
|
||||
/**
|
||||
* @brief Add the specified pre-configured TC standard link key for the device
|
||||
*
|
||||
* @param[in] key A pointer to 16-byte pre-configured link key to be set
|
||||
* @return
|
||||
* - ESP_OK: Preconfigured TC standard link key added successfully
|
||||
* - ESP_FAIL: Failed to add preconfigured TC standard link key
|
||||
*/
|
||||
esp_err_t esp_zb_secur_multi_TC_standard_preconfigure_key_add(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Remove the specified pre-configured TC standard link key from the device
|
||||
*
|
||||
* @param[in] key A pointer to 16-byte the pre-configured link key to be removed
|
||||
* @return
|
||||
* - ESP_OK: Preconfigured TC standard link key removed successfully
|
||||
* - ESP_FAIL: Failed to remove preconfigured TC standard link key
|
||||
*/
|
||||
esp_err_t esp_zb_secur_multi_TC_standard_preconfigure_key_remove(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Add the specified pre-configured distributed link key for the device
|
||||
*
|
||||
* @param[in] key A pointer to 16-byte pre-configured distributed link key to be set
|
||||
* @return
|
||||
* - ESP_OK: Preconfigured distributed link key added successfully
|
||||
* - ESP_FAIL: Failed to add preconfigured distributed link key
|
||||
*/
|
||||
esp_err_t esp_zb_secur_multi_standard_distributed_key_add(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Remove the specified pre-configured distributed link key from the device
|
||||
*
|
||||
* @param[in] key A pointer to 16-byte pre-configured distributed link key to be removed
|
||||
* @return
|
||||
* - ESP_OK: Preconfigured distributed link key removed successfully
|
||||
* - ESP_FAIL: Failed to remove preconfigured distributed link key
|
||||
*/
|
||||
esp_err_t esp_zb_secur_multi_standard_distributed_key_remove(uint8_t *key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/**
|
||||
* @brief The esp zigbee SDK trace level value
|
||||
* @anchor esp_zb_trace_level_cfg_t
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_TRACE_LEVEL_CRITICAL = 0,
|
||||
ESP_ZB_TRACE_LEVEL_WARN = 1,
|
||||
ESP_ZB_TRACE_LEVEL_INFO = 2,
|
||||
ESP_ZB_TRACE_LEVEL_DEBUG = 3,
|
||||
ESP_ZB_TRACE_LEVEL_VERBOSE = 4,
|
||||
} esp_zb_trace_level_cfg_t;
|
||||
|
||||
/** The Zigbee SDK trace mask
|
||||
* @note Different masks represent different sections of the zigbee stack
|
||||
*/
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_NONE 0x0000U /*!< None subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_COMMON 0x0001U /*!< Common subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_MEM 0x0002U /*!< MEM subsystem (buffers pool) */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_MAC 0x0004U /*!< MAC subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_NWK 0x0008U /*!< NWK subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_APS 0x0010U /*!< APS subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_ZSE 0x0020U /*!< ZSE subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_ZDO 0x0040U /*!< ZDO subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_SECUR 0x0080U /*!< Security subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_ZCL 0x0100U /*!< ZCL subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_ZLL 0x0200U /*!< ZLL/Touchlink subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_SSL 0x0400U /*!< SSL subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_NCP_TRANSPORT ESP_ZB_TRACE_SUBSYSTEM_SSL
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_MACSPLIT ESP_ZB_TRACE_SUBSYSTEM_NCP_TRANSPORT
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_APP 0x0800U /*!< User Application */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_LWIP 0x1000U /*!< LWIP is used, else free */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_ALIEN 0x2000U /*!< Some special debug */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_ZGP 0x4000U /*!< ZGP subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_MAC_API 0x8000U /*!< MAC API subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_MACLL 0x10000U /*!< MAC LL subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_SPECIAL1 0x20000U /*!< Special subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_BATTERY 0x40000U /*!< Battery subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_OTA 0x80000U /*!< OTA subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_TRANSPORT 0x100000U /*!< Transport subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_USB 0x200000U /*!< USB subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_SPI 0x400000U /*!< SPI subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_UART 0x800000U /*!< UART subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_JSON 0x1000000U /*!< JSON subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_HTTP 0x2000000U /*!< HTTP subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_CLOUD 0x4000000U /*!< Interface to the Cloud */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_ZBDIRECT 0x8000000U /*!< Zigbee Direct subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_DIAGNOSTIC 0x10000000U /*!< Diagnostic subsystem */
|
||||
#define ESP_ZB_TRACE_SUBSYSTEM_NS 0x20000000U /*!< Network simulator subsystem */
|
||||
|
||||
/**
|
||||
* @brief The Zigbee trace configuration.
|
||||
*
|
||||
* @param[in] trace_level set trace level refer to esp_zb_trace_level_cfg_t
|
||||
* @param[in] trace_mask Set trace mask
|
||||
*
|
||||
*/
|
||||
void esp_zb_set_trace_level_mask(esp_zb_trace_level_cfg_t trace_level, uint32_t trace_mask);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,989 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include "stdbool.h"
|
||||
|
||||
#define ESP_ZB_PACKED_STRUCT __attribute__ ((packed))
|
||||
#define ESP_ZB_DEPRECATED __attribute__((deprecated))
|
||||
|
||||
typedef uint8_t esp_zb_64bit_addr_t[8];
|
||||
typedef esp_zb_64bit_addr_t esp_zb_ieee_addr_t;
|
||||
typedef esp_zb_64bit_addr_t esp_zb_ext_pan_id_t;
|
||||
typedef void (*esp_zb_zcl_cluster_init_t)(void);
|
||||
typedef void (*esp_zb_callback_t)(uint8_t param);
|
||||
typedef void (*esp_zb_user_callback_t)(void* param);
|
||||
typedef uint8_t esp_zb_user_cb_handle_t;
|
||||
#define ESP_ZB_USER_CB_HANDLE_INVALID (0x00)
|
||||
|
||||
/**
|
||||
* @brief The Zigbee address union consist of 16 bit short address and 64 bit long address.
|
||||
*
|
||||
*/
|
||||
typedef union {
|
||||
uint16_t addr_short; /*!< Zigbee short address */
|
||||
esp_zb_ieee_addr_t addr_long; /*!< Zigbee long address */
|
||||
} esp_zb_addr_u;
|
||||
|
||||
/** Definition of the Zigbee ZCL address type
|
||||
* @brief Possible address types of devices from which ZCL message is received.
|
||||
* @anchor esp_zb_zcl_address_type_t
|
||||
*/
|
||||
#define ESP_ZB_ZCL_ADDR_TYPE_SHORT 0U
|
||||
#define ESP_ZB_ZCL_ADDR_TYPE_IEEE_GPD 1U
|
||||
#define ESP_ZB_ZCL_ADDR_TYPE_SRC_ID_GPD 2U
|
||||
#define ESP_ZB_ZCL_ADDR_TYPE_IEEE 3U
|
||||
#define ESP_ZB_CCM_KEY_SIZE 16U
|
||||
#define ESP_ZB_ZCL_ATTR_SET_WITH_ATTR_ID(_set, _id) ((_set << 8) | (_id & 0xFF))
|
||||
#define ESP_ZB_ZCL_MAX_STRING_SIZE 0xFF
|
||||
|
||||
#define ESP_ZB_ZCL_VALUE_FF (-1)
|
||||
#define ESP_ZB_ZCL_VALUE_FE (-2)
|
||||
#define ESP_ZB_ZCL_VALUE_NaN (.0 / .0)
|
||||
|
||||
#define ESP_ZB_ZCL_VALUE_U8_FF ((uint8_t)ESP_ZB_ZCL_VALUE_FF)
|
||||
#define ESP_ZB_ZCL_VALUE_U16_FF ((uint16_t)ESP_ZB_ZCL_VALUE_FF)
|
||||
#define ESP_ZB_ZCL_VALUE_U32_FF ((uint32_t)ESP_ZB_ZCL_VALUE_FF)
|
||||
#define ESP_ZB_ZCL_VALUE_U64_FF ((uint64_t)ESP_ZB_ZCL_VALUE_FF)
|
||||
|
||||
#define ESP_ZB_ZCL_VALUE_S8_NaS ((int8_t)(1ULL << 7))
|
||||
#define ESP_ZB_ZCL_VALUE_S16_NaS ((int16_t)(1ULL << 15))
|
||||
#define ESP_ZB_ZCL_VALUE_S32_NaS ((int32_t)(1ULL << 31))
|
||||
#define ESP_ZB_ZCL_VALUE_S64_NaS ((int64_t)(1ULL << 63))
|
||||
|
||||
#define ESP_ZB_ZCL_VALUE_U8_NONE ESP_ZB_ZCL_VALUE_U8_FF
|
||||
#define ESP_ZB_ZCL_VALUE_U16_NONE ESP_ZB_ZCL_VALUE_U16_FF
|
||||
#define ESP_ZB_ZCL_VALUE_U32_NONE ESP_ZB_ZCL_VALUE_U32_FF
|
||||
#define ESP_ZB_ZCL_VALUE_U64_NONE ESP_ZB_ZCL_VALUE_U64_FF
|
||||
|
||||
#define ESP_ZB_ZCL_VALUE_S8_NONE ESP_ZB_ZCL_VALUE_S8_NaS
|
||||
#define ESP_ZB_ZCL_VALUE_S16_NONE ESP_ZB_ZCL_VALUE_S16_NaS
|
||||
#define ESP_ZB_ZCL_VALUE_S32_NONE ESP_ZB_ZCL_VALUE_S32_NaS
|
||||
#define ESP_ZB_ZCL_VALUE_S64_NONE ESP_ZB_ZCL_VALUE_S64_NaS
|
||||
|
||||
#define ESP_ZB_ZCL_VALUE_SINGLE_NONE ESP_ZB_ZCL_VALUE_NaN
|
||||
#define ESP_ZB_ZCL_VALUE_DOUBLE_NONE ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/**
|
||||
* @brief Type to represent source address of ZCL message
|
||||
* @note Address type refer @ref esp_zb_zcl_address_type_t
|
||||
*/
|
||||
typedef struct esp_zb_zcl_addr_s {
|
||||
uint8_t addr_type; /*!< address type see esp_zb_zcl_address_type_t */
|
||||
union {
|
||||
uint16_t short_addr; /*!< Zigbee short address */
|
||||
uint32_t src_id; /*!< Source ID of ZGPD */
|
||||
esp_zb_ieee_addr_t ieee_addr; /*!< Full IEEE-address of ZGPD */
|
||||
} u; /*!< Union of the address */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_zcl_addr_t;
|
||||
|
||||
/**
|
||||
* @brief Type to represent header info callback of ZCL message
|
||||
*/
|
||||
typedef struct esp_zb_zcl_cmd_cb_s {
|
||||
esp_zb_zcl_addr_t zcl_addr_u; /*!< ZCL command source node single short address, group address or ieee address */
|
||||
uint8_t dst_endpoint; /*!< ZCL command destination endpoint */
|
||||
uint8_t src_endpoint; /*!< ZCL command source endpoint */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_zcl_cmd_cb_t;
|
||||
|
||||
/******************* attribute data model *******************/
|
||||
|
||||
/**
|
||||
* @brief Type to represent ZCL attribute definition structure
|
||||
* @note Access define refer to zcl_attr_access
|
||||
*/
|
||||
typedef struct esp_zb_zcl_attr_s {
|
||||
uint16_t id; /*!< Attribute id */
|
||||
uint8_t type; /*!< Attribute type see zcl_attr_type */
|
||||
uint8_t access; /*!< Attribute access options according to zcl_attr_access */
|
||||
uint16_t manuf_code; /*!< Manufacture specific id, refer to ESP_ZB_ZCL_NON_MANUFACTURER_SPECIFIC */
|
||||
void *data_p; /*!< Pointer to attribute data */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_zcl_attr_t;
|
||||
|
||||
/**
|
||||
* @brief The esp-zigbee data model of list of attribute.
|
||||
*
|
||||
* @note An attribute list groups up a single cluster.
|
||||
*/
|
||||
typedef struct esp_zb_attribute_list_s {
|
||||
esp_zb_zcl_attr_t attribute; /*!< A single attribute */
|
||||
uint16_t cluster_id; /*!< A cluster id assigned to this attribute */
|
||||
struct esp_zb_attribute_list_s *next; /*!< A pointer to next attribute */
|
||||
} esp_zb_attribute_list_t;
|
||||
|
||||
/******************* cluster data model *******************/
|
||||
|
||||
/**
|
||||
* @brief Type to represent ZCL cluster definition structure
|
||||
* @note Cluster id refer to zcl_cluster_id and attribute define see @ref esp_zb_zcl_attr_s
|
||||
*/
|
||||
typedef struct esp_zb_zcl_cluster_s {
|
||||
uint16_t cluster_id; /*!< ZCL 16-bit cluster id. Refer zcl_cluster_id */
|
||||
uint16_t attr_count; /*!< Attributes number supported by the cluster */
|
||||
union {
|
||||
esp_zb_zcl_attr_t *attr_desc_list; /*!< Array of cluster attributes esp_zb_zcl_attr_t */
|
||||
esp_zb_attribute_list_t* attr_list; /*!< List of cluster attributes esp_zb_attribute_list_t */
|
||||
} ESP_ZB_PACKED_STRUCT; /*!< Attribute data model */
|
||||
uint8_t role_mask; /*!< Cluster role, refer to zcl_cluster_role */
|
||||
uint16_t manuf_code; /*!< Manufacturer code for cluster and its attributes */
|
||||
esp_zb_zcl_cluster_init_t cluster_init; /*!< cluster init callback function */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_zcl_cluster_t;
|
||||
|
||||
/**
|
||||
* @brief The esp-zigbee data model of list of cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_cluster_list_s {
|
||||
esp_zb_zcl_cluster_t cluster; /*!< A single cluster */
|
||||
struct esp_zb_cluster_list_s *next; /*!< A pointer to next cluster */
|
||||
} esp_zb_cluster_list_t;
|
||||
|
||||
/**
|
||||
* @brief Type to represent type signed int_24
|
||||
* @note Internal use
|
||||
*/
|
||||
typedef struct esp_zb_int24_s {
|
||||
uint16_t low; /*!< Low 16-bit of the value */
|
||||
int8_t high; /*!< High 8-bit of the value with signed */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_int24_t;
|
||||
|
||||
/**
|
||||
* @brief Type to represent type unsigned int_24
|
||||
* @note Internal use
|
||||
*/
|
||||
typedef struct esp_zb_uint24_s {
|
||||
uint16_t low; /*!< Low 16-bit of the value */
|
||||
uint8_t high; /*!< High 8-bit of the value */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_uint24_t;
|
||||
|
||||
/**
|
||||
* @brief Type to represent type unsigned int_48
|
||||
* @note Internal use
|
||||
*/
|
||||
typedef struct esp_zb_uint48_s {
|
||||
uint32_t low; /*!< Low 32-bit of the value */
|
||||
uint16_t high; /*!< High 16-bit of the value */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_uint48_t;
|
||||
|
||||
/**
|
||||
* @brief Type to represent type signed int_48
|
||||
* @note Internal use
|
||||
*/
|
||||
typedef struct esp_zb_int48_s {
|
||||
uint32_t low; /*!< Low 32-bit of the value */
|
||||
int16_t high; /*!< High 16-bit of the value with signed */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_int48_t;
|
||||
|
||||
/**
|
||||
* @brief Union of the ZCL attribute value
|
||||
* @note Internal use
|
||||
*/
|
||||
union esp_zb_zcl_attr_var_u {
|
||||
uint8_t u8; /*!< Unsigned 8-bit int of integer */
|
||||
int8_t s8; /*!< Signed 8-bit int of integer */
|
||||
uint16_t u16; /*!< Unsigned 16-bit of integer */
|
||||
int16_t s16; /*!< Signed 16-bit of integer */
|
||||
esp_zb_uint24_t u24;/*!< Unsigned 24-bit of the integer */
|
||||
esp_zb_int24_t s24; /*!< Signed 24-bit of the integer */
|
||||
uint32_t u32; /*!< Unsigned 32-bit of the integer */
|
||||
int32_t s32; /*!< Signed 32-bit of the integer */
|
||||
esp_zb_uint48_t u48;/*!< Unsigned 48-bit of the integer */
|
||||
uint8_t data_buf[4];/*!< Data array */
|
||||
float f32; /*!< Single precision, ESP_ZB_ZCL_ATTR_TYPE_SINGLE data type */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Type to represent ZCL attribute reporting info structure
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zcl_reporting_info_s {
|
||||
uint8_t direction; /*!< Direction: report is send or received */
|
||||
uint8_t ep; /*!< Endpoint number */
|
||||
uint16_t cluster_id; /*!< Cluster ID for reporting */
|
||||
uint8_t cluster_role; /*!< Cluster role server/client */
|
||||
uint16_t attr_id; /*!< Attribute ID for reporting */
|
||||
uint8_t flags; /*!< Flags to inform status of reporting */
|
||||
uint64_t run_time; /*!< Time to run next reporting activity */
|
||||
union {
|
||||
struct {
|
||||
uint16_t min_interval; /*!< Actual minimum reporting interval */
|
||||
uint16_t max_interval; /*!< Actual maximum reporting interval */
|
||||
union esp_zb_zcl_attr_var_u delta; /*!< Actual reportable change */
|
||||
union esp_zb_zcl_attr_var_u reported_value; /*!< The last reported value */
|
||||
uint16_t def_min_interval; /*!< Default minimum reporting interval */
|
||||
uint16_t def_max_interval; /*!< Default maximum reporting interval */
|
||||
}
|
||||
send_info; /*!< send_info is stored on cluster server side (as usual) and describes how
|
||||
attribute should be reported */
|
||||
struct {
|
||||
uint16_t timeout; /*!< Timeout period */
|
||||
}
|
||||
recv_info; /*!< recv_info is stored on cluster client side (as usual) and describes how
|
||||
attribute report is received */
|
||||
}
|
||||
u; /*!< Union of the report info*/
|
||||
|
||||
struct {
|
||||
uint16_t short_addr; /*!< Destination short address */
|
||||
uint8_t endpoint; /*!< Destination endpoint */
|
||||
uint16_t profile_id; /*!< Profile id */
|
||||
}
|
||||
dst; /*!< Union of the ZCL destination */
|
||||
uint16_t manuf_code; /*!< Manufacturer specific code */
|
||||
}
|
||||
esp_zb_zcl_reporting_info_t;
|
||||
|
||||
/**
|
||||
* @brief Structure of Alarm variables
|
||||
* @note Internal use
|
||||
*/
|
||||
typedef struct esp_zb_zcl_cvc_alarm_variables_s {
|
||||
uint8_t endpoint_id; /*!< Endpoint id */
|
||||
uint16_t cluster_id; /*!< Cluster id */
|
||||
uint16_t attribute_id; /*!< Attribute id */
|
||||
uint8_t alarm_buf_id; /*!< Alarm buffer id */
|
||||
bool is_used; /*!< Is Used flag */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_zcl_cvc_alarm_variables_t;
|
||||
|
||||
/**
|
||||
* @brief Struture of Node descriptor request of ZDO response
|
||||
*/
|
||||
typedef struct esp_zb_af_node_desc_s {
|
||||
uint16_t node_desc_flags; /*!< node description */
|
||||
uint8_t mac_capability_flags; /*!< mac capability */
|
||||
uint16_t manufacturer_code; /*!< Manufacturer code */
|
||||
uint8_t max_buf_size; /*!< Maximum buffer size */
|
||||
uint16_t max_incoming_transfer_size; /*!< Maximum incoming transfer size */
|
||||
uint16_t server_mask; /*!< Server mask */
|
||||
uint16_t max_outgoing_transfer_size; /*!< Maximum outgoing transfer size */
|
||||
uint8_t desc_capability_field; /*!< Descriptor capability field */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_af_node_desc_t;
|
||||
|
||||
/**
|
||||
* @brief Structure of simple descriptor request of ZCL command
|
||||
*/
|
||||
typedef struct esp_zb_af_simple_desc_1_1_s {
|
||||
uint8_t endpoint; /*!< Endpoint */
|
||||
uint16_t app_profile_id; /*!< Application profile identifier */
|
||||
uint16_t app_device_id; /*!< Application device identifier */
|
||||
uint32_t app_device_version: 4; /*!< Application device version */
|
||||
uint32_t reserved: 4; /*!< Reserved */
|
||||
uint8_t app_input_cluster_count; /*!< Application input cluster count */
|
||||
uint8_t app_output_cluster_count; /*!< Application output cluster count */
|
||||
uint16_t app_cluster_list[2]; /*!< Application input and output cluster list */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_af_simple_desc_1_1_t;
|
||||
|
||||
/**
|
||||
* @brief Structure of device descriptor on a endpoint
|
||||
*/
|
||||
typedef struct esp_zb_endpoint_config_s {
|
||||
uint8_t endpoint; /*!< Endpoint */
|
||||
uint16_t app_profile_id; /*!< Application profile identifier */
|
||||
uint16_t app_device_id; /*!< Application device identifier */
|
||||
uint32_t app_device_version: 4; /*!< Application device version */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_endpoint_config_t;
|
||||
|
||||
/******************* endpoint data model *******************/
|
||||
|
||||
/**
|
||||
* @brief Type to represent ZCL endpoint definition structure
|
||||
* @note The esp_zb_zcl_reporting_info_t defines see @ref esp_zb_zcl_reporting_info_s
|
||||
* @note The esp_zb_af_simple_desc_1_1_t defines see @ref esp_zb_af_simple_desc_1_1_s
|
||||
*/
|
||||
typedef struct esp_zb_endpoint_s {
|
||||
uint8_t ep_id; /*!< Endpoint ID */
|
||||
uint16_t profile_id; /*!< Application profile, which implemented on endpoint */
|
||||
esp_zb_callback_t device_handler; /*!< endpoint specific callback, handles all commands for this endpoint. If set, it will be called to handle callback,like esp_zb_add_read_attr_resp_cb */
|
||||
esp_zb_callback_t identify_handler; /*!< Identify notification callback. If set, it will be called on identification start and stop indicating start event with a non-zero argument*/
|
||||
uint8_t reserved_size; /*!< Unused parameter (reserved for future use) */
|
||||
void *reserved_ptr; /*!< Unused parameter (reserved for future use) */
|
||||
uint8_t cluster_count; /*!< Number of supported clusters */
|
||||
union {
|
||||
esp_zb_zcl_cluster_t *cluster_desc_list; /*!< Supported clusters arranged in array */
|
||||
esp_zb_cluster_list_t *cluster_list; /*!< Supported clusters arranged in list */
|
||||
} ESP_ZB_PACKED_STRUCT; /*!< Cluster data model */
|
||||
esp_zb_af_simple_desc_1_1_t *simple_desc; /*!< Simple descriptor */
|
||||
#if defined ZB_ENABLE_ZLL
|
||||
uint8_t group_id_count; /*!< Number of group id */
|
||||
#endif /* defined ZB_ENABLE_ZLL */
|
||||
uint8_t rep_info_count; /*!< Number of reporting info slots */
|
||||
esp_zb_zcl_reporting_info_t *reporting_info; /*!< Attributes reporting information */
|
||||
uint8_t cvc_alarm_count; /*!< Number of continuous value change alarm slots */
|
||||
esp_zb_zcl_cvc_alarm_variables_t *cvc_alarm_info; /*!< pointer to the cvc alarm structure */
|
||||
} ESP_ZB_PACKED_STRUCT
|
||||
esp_zb_endpoint_t;
|
||||
|
||||
/**
|
||||
* @brief The esp-zigbee data model of list of endpoint.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ep_list_s {
|
||||
esp_zb_endpoint_t endpoint; /*!< A single endpoint */
|
||||
struct esp_zb_ep_list_s *next; /*!< A pointer to next endpoint */
|
||||
} esp_zb_ep_list_t;
|
||||
|
||||
/****************** standard clusters *********************/
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for basic cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_basic_cluster_cfg_s {
|
||||
uint8_t zcl_version; /*!< ZCL version */
|
||||
uint8_t power_source; /*!< The sources of power available to the device */
|
||||
} esp_zb_basic_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee default attribute for power configuration cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_power_config_cluster_cfg_s {
|
||||
uint16_t main_voltage; /*!< MainVoltage RMS voltage or DC voltage in units of 100mV */
|
||||
uint8_t main_freq; /*!< MainFrequency in value of 0.5 * measured frequency, DC supply is 0Hz */
|
||||
uint8_t main_alarm_mask; /*!< Main alram mask in bit */
|
||||
uint16_t main_voltage_min; /*!< Main voltage min threshold in unit of 100mV */
|
||||
uint16_t main_voltage_max; /*!< Main voltage max threshold in unit of 100mV */
|
||||
uint16_t main_voltage_dwell; /*!< Main voltage exist in seconds */
|
||||
} esp_zb_power_config_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for identify cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_identify_cluster_cfg_s {
|
||||
uint16_t identify_time; /*!< The remaining length of the time that identify itself */
|
||||
} esp_zb_identify_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for groups cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_groups_cluster_cfg_s {
|
||||
uint8_t groups_name_support_id; /*!< The indication of group names are supported or not */
|
||||
} esp_zb_groups_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for scenes cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_scenes_cluster_cfg_s {
|
||||
uint8_t scenes_count; /*!< The number of scenes currently in the scene table */
|
||||
uint8_t current_scene; /*!< Scene ID that invoked */
|
||||
uint16_t current_group; /*!< Group ID that invoked */
|
||||
bool scene_valid; /*!< Indication of the associated with current scene and group valid or not*/
|
||||
uint8_t name_support; /*!< The indication of group names are supported or not */
|
||||
} esp_zb_scenes_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for on_off cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_on_off_cluster_cfg_s {
|
||||
bool on_off; /*!< On Off state of the device */
|
||||
} esp_zb_on_off_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for on_off switch configuration cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_on_off_switch_cluster_cfg_s {
|
||||
uint8_t switch_type; /*!< On Off switch type */
|
||||
uint8_t switch_action; /*!< On off switch action */
|
||||
} esp_zb_on_off_switch_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for level cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_level_cluster_cfg_s {
|
||||
uint8_t current_level; /*!< Current level of the device */
|
||||
} esp_zb_level_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for color cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_color_cluster_cfg_s {
|
||||
uint16_t current_x; /*!< The current value of the normalized chromaticity value x */
|
||||
uint16_t current_y; /*!< The current value of the normalized chromaticity value y */
|
||||
uint8_t color_mode; /*!< The mode which attribute determines the color of the device */
|
||||
uint8_t options; /*!< The bitmap determines behavior of some cluster commands */
|
||||
uint8_t enhanced_color_mode; /*!< The enhanced-mode which attribute determines the color of the device */
|
||||
uint16_t color_capabilities; /*!< Specifying the color capabilities of the device support the color control cluster */
|
||||
} esp_zb_color_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for time cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_time_cluster_cfg_s {
|
||||
uint32_t time; /*!< The time value of the a real time clock */
|
||||
uint8_t time_status; /*!< The time status holds a number of bit field of status */
|
||||
} esp_zb_time_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for shade config cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_shade_config_cluster_cfg_s {
|
||||
uint8_t status; /*!< The status attribute indicates the status of a number of shade function */
|
||||
uint16_t closed_limit; /*!< The attribute indicates most closed position that shade can move to */
|
||||
uint8_t mode; /*!< The attribute indicates the current operating mode */
|
||||
} esp_zb_shade_config_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for binary input (basic) cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_binary_input_cluster_cfg_s {
|
||||
bool out_of_service; /*!< Out of Service */
|
||||
uint8_t status_flags; /*!< Status flags */
|
||||
bool present_value; /*!< Present value */
|
||||
} esp_zb_binary_input_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee default attribute for Commissioning cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_commissioning_cluster_cfg_s {
|
||||
uint16_t short_address; /**< Short Address */
|
||||
esp_zb_ieee_addr_t extended_panid; /**< Extended Panid */
|
||||
uint16_t panid; /**< Panid */
|
||||
uint32_t channel_mask; /**< Channel Mask */
|
||||
uint8_t protocol_version; /**< Protocol Version */
|
||||
uint8_t stack_profile; /**< Stack Profile */
|
||||
uint8_t startup_control; /**< Startup Control */
|
||||
esp_zb_ieee_addr_t trust_center_address; /**< Trust Center Address */
|
||||
uint8_t network_key[16]; /**< Network Key */
|
||||
bool use_insecure_join; /**< Use Insecure Join */
|
||||
uint8_t preconfigured_link_key[16]; /**< Preconfigured Link Key */
|
||||
uint8_t network_key_seq_num; /**< Network Key Seq Num */
|
||||
uint8_t network_key_type; /**< Network Key Type */
|
||||
uint16_t network_manager_address; /**< Network Manager Address */
|
||||
} esp_zb_commissioning_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief The IAS zone application callback
|
||||
*
|
||||
*/
|
||||
typedef void (* esp_zb_ias_zone_app_callback_t)(uint8_t param, uint16_t general_val);
|
||||
|
||||
/**
|
||||
* @brief Zigbee IAS zone application initialization context
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zcl_ias_zone_int_ctx_s {
|
||||
esp_zb_callback_t process_result_cb; /*!< The callback will be active, when the IAS zone status change notification */
|
||||
esp_zb_ias_zone_app_callback_t general_cb; /*!< The callback is for the IAS zone attribute */
|
||||
uint8_t restore_current_zone_sens_level; /*!< The sensitivity of current IAS zone */
|
||||
uint8_t new_current_zone_sens_level; /*!< The new sensitivity of IAS zone */
|
||||
} esp_zb_zcl_ias_zone_int_ctx_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for ias zone cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ias_zone_cluster_cfg_s {
|
||||
uint8_t zone_state; /*!< zone state */
|
||||
uint16_t zone_type; /*!< zone type */
|
||||
uint16_t zone_status; /*!< zone status */
|
||||
esp_zb_ieee_addr_t ias_cie_addr; /*!< IAS CIE Address that commands generated by server SHALL be sent to */
|
||||
uint8_t zone_id; /*!< zone id */
|
||||
esp_zb_zcl_ias_zone_int_ctx_t zone_ctx; /*!< zone context*/
|
||||
} esp_zb_ias_zone_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee configurations for ias ace cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ias_ace_cluster_cfg_s {
|
||||
uint8_t zone_table_length; /**< Length of the zone table */
|
||||
} esp_zb_ias_ace_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee default attribute for ias wd cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ias_wd_cluster_cfg_s {
|
||||
uint16_t max_duration; /**< Max duration */
|
||||
} esp_zb_ias_wd_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for door lock cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_door_lock_cluster_cfg_s {
|
||||
uint8_t lock_state; /*!< The attribute indicates the state of lock */
|
||||
uint8_t lock_type; /*!< The attribute indicates different type of the lock type */
|
||||
bool actuator_enabled; /*!< The attribute indicates if the lock is currently able (Enabled) or not able (Disabled) to process remote lock */
|
||||
} esp_zb_door_lock_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for temperature measurement cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_temperature_meas_cluster_cfg_s {
|
||||
int16_t measured_value; /*!< The attribute indicates the temperature in degrees Celsius */
|
||||
int16_t min_value; /*!< The attribute indicates minimum value of the measured value */
|
||||
int16_t max_value; /*!< The attribute indicates maximum value of the measured value */
|
||||
} esp_zb_temperature_meas_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for humidity measurement cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_humidity_meas_cluster_cfg_s {
|
||||
uint16_t measured_value; /*!< The attribute indicates the humidity in 100*percent */
|
||||
uint16_t min_value; /*!< The attribute indicates minimum value of the measured value */
|
||||
uint16_t max_value; /*!< The attribute indicates maximum value of the measured value */
|
||||
} esp_zb_humidity_meas_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for OTA client cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ota_cluster_cfg_s {
|
||||
uint32_t ota_upgrade_file_version; /*!< The attribute indicates the file version of the running firmware image on the device */
|
||||
uint16_t ota_upgrade_manufacturer; /*!< The attribute indicates the value for the manufacturer of the device */
|
||||
uint16_t ota_upgrade_image_type; /*!< The attribute indicates the the image type of the file that the client is currently downloading */
|
||||
uint16_t ota_min_block_reque; /*!< The attribute indicates the delay between Image Block Request commands in milliseconds */
|
||||
uint32_t ota_upgrade_file_offset; /*!< The attribute indicates the the current location in the OTA upgrade image. */
|
||||
uint32_t ota_upgrade_downloaded_file_ver; /*!< The attribute indicates the file version of the downloaded image on the device*/
|
||||
esp_zb_ieee_addr_t ota_upgrade_server_id; /*!< The attribute indicates the address of the upgrade server */
|
||||
uint8_t ota_image_upgrade_status; /*!< The attribute indicates the image upgrade status of the client device */
|
||||
} esp_zb_ota_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for illuminance measurement cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_illuminance_meas_cluster_cfg_s {
|
||||
uint16_t measured_value; /*!< The attribute indicates the illuminance from 0x0000 to 0xffff */
|
||||
uint16_t min_value; /*!< The attribute indicates minimum value of the measured value */
|
||||
uint16_t max_value; /*!< The attribute indicates maximum value of the measured value */
|
||||
} esp_zb_illuminance_meas_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for pressure measurement cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_pressure_meas_cluster_cfg_s {
|
||||
int16_t measured_value; /*!< The attribute indicates the pressure from 0x8000 to 0x7fff */
|
||||
int16_t min_value; /*!< The attribute indicates minimum value of the measured value */
|
||||
int16_t max_value; /*!< The attribute indicates maximum value of the measured value */
|
||||
} esp_zb_pressure_meas_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for flow measurement cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_flow_meas_cluster_cfg_s {
|
||||
int16_t measured_value; /*!< The attribute indicates the flow from 0x0000 to 0xffff */
|
||||
int16_t min_value; /*!< The attribute indicates minimum value of the measured value */
|
||||
int16_t max_value; /*!< The attribute indicates maximum value of the measured value */
|
||||
} esp_zb_flow_meas_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for electrical measurement cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_electrical_meas_cluster_cfg_s {
|
||||
uint32_t measured_type; /*!< This attribute indicates a device’s measurement type */
|
||||
} esp_zb_electrical_meas_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for occupancy sensing cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_occupancy_sensing_cluster_cfg_s {
|
||||
uint8_t occupancy; /*!< Bit 0 specifies the sensed occupancy as follows: 1 = occupied, 0 = unoccupied. */
|
||||
uint32_t sensor_type; /*!< The attribute specifies the type of the occupancy sensor */
|
||||
uint8_t sensor_type_bitmap; /*!< The attribute specifies the types of the occupancy sensor */
|
||||
} esp_zb_occupancy_sensing_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for window covering cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_window_covering_cluster_cfg_s {
|
||||
uint8_t covering_type; /*!< This attribute identifies the type of window covering being controlled by this endpoint */
|
||||
uint8_t covering_status; /*!< This attribute makes configuration and status information available */
|
||||
uint8_t covering_mode; /*!< This attribute allows configuration of the window covering */
|
||||
} esp_zb_window_covering_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for thermostat cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_thermostat_cluster_cfg_s {
|
||||
int16_t local_temperature; /*!< This attribute represents the temperature in degrees Celsius */
|
||||
int16_t occupied_cooling_setpoint; /*!< This attribute specifies the cooling mode setpoint when the room is occupied */
|
||||
int16_t occupied_heating_setpoint; /*!< This attribute specifies the heating mode setpoint when the room is occupied */
|
||||
uint8_t control_sequence_of_operation; /*!< This attribute specifies the overall operating environment and possible system modes */
|
||||
uint8_t system_mode; /*!< This attribute specifies the current operating mode */
|
||||
} esp_zb_thermostat_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for fan control cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_fan_control_cluster_cfg_s {
|
||||
uint8_t fan_mode; /*!< This attribute specifies the current speed of the fan */
|
||||
uint8_t fan_mode_sequence; /*!< This attribute specifies the possible fan speeds that the thermostat can set */
|
||||
} esp_zb_fan_control_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for thermostat ui configuration cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_thermostat_ui_config_cluster_cfg_s {
|
||||
uint8_t temperature_display_mode; /*!< This attribute specifies the units of the temperature displayed on the thermostat sceen */
|
||||
uint8_t keypad_lockout; /*!< This attribute specifies the level of functionality that is available to the user via the keypad */
|
||||
} esp_zb_thermostat_ui_config_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for analog input cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_analog_input_cluster_cfg_s {
|
||||
bool out_of_service; /*!< This attribute indicates whether or not the physical input that the cluster represents is in service */
|
||||
float_t present_value; /*!< This attribute indicates the current value of the input as appropriate for the cluster */
|
||||
uint8_t status_flags; /*!< This attribute indicates the general “health” of the analog sensor */
|
||||
} esp_zb_analog_input_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for analog output cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_analog_output_cluster_cfg_s {
|
||||
bool out_of_service; /*!< This attribute indicates whether or not the physical output that the cluster represents is in service */
|
||||
float_t present_value; /*!< This attribute indicates the current value of the output as appropriate for the cluster */
|
||||
uint8_t status_flags; /*!< This attribute indicates the general “health” of the analog sensor */
|
||||
} esp_zb_analog_output_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for analog value cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_analog_value_cluster_cfg_s {
|
||||
bool out_of_service; /*!< This attribute indicates whether or not the physical value that the cluster represents is in service */
|
||||
float_t present_value; /*!< This attribute indicates the current value as appropriate for the cluster */
|
||||
uint8_t status_flags; /*!< This attribute indicates the general “health” of the analog sensor */
|
||||
} esp_zb_analog_value_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee default attribute for electrical conductivity measurement cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ec_measurement_cluster_cfg_s {
|
||||
uint16_t measured_value; /*!< This attribute represents the electrical conductivity in EC or mS/m */
|
||||
uint16_t min_measured_value; /*!< This attribute indicates the minimum value of measuredvalue that is capable of being measured */
|
||||
uint16_t max_measured_value; /*!< This attribute indicates the maximum value of measuredvalue that is capable of being measured */
|
||||
} esp_zb_ec_measurement_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee default attribute for pH measurement cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_ph_measurement_cluster_cfg_s {
|
||||
uint16_t measured_value; /*!< This attribute represents the pH with no units */
|
||||
uint16_t min_measured_value; /*!< This attribute indicates the minimum value of measuredvalue that is capable of being measured */
|
||||
uint16_t max_measured_value; /*!< This attribute indicates the maximum value of measuredvalue that is capable of being measured */
|
||||
} esp_zb_ph_measurement_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee default attribute for wind speed measurement cluster.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_wind_speed_measurement_cluster_cfg_s {
|
||||
uint16_t measured_value; /*!< This attribute represents the the Wind Speed in m/s */
|
||||
uint16_t min_measured_value; /*!< This attribute indicates the minimum value of measuredvalue that is capable of being measured */
|
||||
uint16_t max_measured_value; /*!< This attribute indicates the maximum value of measuredvalue that is capable of being measured */
|
||||
} esp_zb_wind_speed_measurement_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for carbon dioxide measurement cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_carbon_dioxide_measurement_cluster_cfg_s {
|
||||
float_t measured_value; /*!< This attribute represents the carbon dioxide concentration as a fraction of one */
|
||||
float_t min_measured_value; /*!< This attribute indicates the minimum value of measuredvalue that is capable of being measured */
|
||||
float_t max_measured_value; /*!< This attribute indicates the maximum value of measuredvalue that is capable of being measured */
|
||||
} esp_zb_carbon_dioxide_measurement_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for pm 2.5 measurement cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_pm2_5_measurement_cluster_cfg_s {
|
||||
float_t measured_value; /*!< This attribute represents the pm2.5 concentration as a fraction of one */
|
||||
float_t min_measured_value; /*!< This attribute indicates the minimum value of measuredvalue that is capable of being measured */
|
||||
float_t max_measured_value; /*!< This attribute indicates the maximum value of measuredvalue that is capable of being measured */
|
||||
} esp_zb_pm2_5_measurement_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for multistate value cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_multistate_value_cluster_cfg_s {
|
||||
uint16_t number_of_states; /*!< This attribute defines the number of states that a multistate PresentValue MAY have */
|
||||
bool out_of_service; /*!< This attribute indicates whether or not the physical value that the cluster represents is in service */
|
||||
uint16_t present_value; /*!< This attribute indicates the current value as appropriate for the cluster */
|
||||
uint8_t status_flags; /*!< This attribute indicates the general “health” of the analog sensor */
|
||||
} esp_zb_multistate_value_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for metering cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_metering_cluster_cfg_s {
|
||||
esp_zb_uint48_t current_summation_delivered; /*!< This attribute represents the most recent summed value of Energy, Gas, or Water delivered and consumed in the premises */
|
||||
uint8_t status; /*!< This attribute provides indicators reflecting the current error conditions found by the metering device */
|
||||
uint8_t uint_of_measure; /*!< This attribute provides a label for the Energy, Gas, or Water being measured by the metering device.
|
||||
refer to esp_zb_zcl_metering_unit_of_measure_t */
|
||||
uint8_t summation_formatting; /*!< This attribute provides a method to properly decipher the number of digits and the decimal location of the values found in the Summation Information Set */
|
||||
uint8_t metering_device_type; /*!< This attribute provides a label for identifying the type of metering device (Energy, Gas, Water, Thermal, Heat, Cooling, and mirrored metering devices).
|
||||
refer to esp_zb_zcl_metering_device_type_t */
|
||||
} esp_zb_metering_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for diagnostics cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_diagnostics_cluster_cfg_s {
|
||||
/* no member */
|
||||
} esp_zb_diagnostics_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for meter identification cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_meter_identification_cluster_cfg_s {
|
||||
char company_name[17]; /*!< This attribute provides the name of the meter manufacturer. (1 octet length + 16 octets data) */
|
||||
uint16_t meter_type_id; /*!< This attribute provides a label to identify the installation features of the meter. */
|
||||
uint16_t data_quality_id; /*!< This attribute provides a label to identify the Meter Simple Metering information certification type. */
|
||||
char pod[17]; /*!< This attribute provides a unique identification ID of the premise connection point. (1 octet length + 16 octets data) */
|
||||
esp_zb_uint24_t available_power; /*!< This attribute represents the InstantaneousDemand that can be distributed to the customer without any risk of overload. */
|
||||
esp_zb_uint24_t power_threshold; /*!< This attribute represents a threshold of InstantaneousDemand distributed to the customer that will lead to an imminent risk of overload. */
|
||||
} esp_zb_meter_identification_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for price cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_price_cluster_cfg_s {
|
||||
/* no member */
|
||||
} esp_zb_price_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for demand response and load control cluster
|
||||
*/
|
||||
typedef struct esp_zb_drlc_cluster_cfg_s {
|
||||
uint8_t utility_enrollment_group; /*!< This attribute provides a method for utilities to assign devices to groups. */
|
||||
uint8_t start_randomization_minutes; /*!< This attribute represents the maximum number of minutes to be used when randomizing the start of an event. */
|
||||
uint8_t duration_randomization_minutes; /*!< This attribute represents the maximum number of minutes to be used when randomizing the duration of an event. */
|
||||
uint16_t device_class_value; /*!< This attribute identifies which bits the device will match in the Device Class fields. */
|
||||
} esp_zb_drlc_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for dehumidification control cluster
|
||||
*/
|
||||
typedef struct esp_zb_dehumidification_control_cluster_cfg_s {
|
||||
uint8_t cooling; /*!< This attribute specifies the current dehumidification cooling output (in %) */
|
||||
uint8_t set_point; /*!< This attribute represents the relative humidity (in %) at which dehumidification occurs */
|
||||
uint8_t hysteresis; /*!< This attribute specifies the hysteresis (in %) associated with RelativeHumidity value */
|
||||
uint16_t max_cool; /*!< This attribute specifies the maximum dehumidification cooling output (in %) */
|
||||
} esp_zb_dehumidification_control_cluster_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee standard mandatory attribute for touchlink commissioning cluster
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_touchlink_commissioning_cfg_s {
|
||||
/* no member */
|
||||
} esp_zb_touchlink_commissioning_cfg_t;
|
||||
|
||||
/****************** standard device config *********************/
|
||||
/**
|
||||
* @brief Zigbee HA standard on-off light device clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_on_off_light_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_groups_cluster_cfg_t groups_cfg; /*!< Groups cluster configuration, @ref esp_zb_groups_cluster_cfg_s */
|
||||
esp_zb_scenes_cluster_cfg_t scenes_cfg; /*!< Scenes cluster configuration, @ref esp_zb_scenes_cluster_cfg_s */
|
||||
esp_zb_on_off_cluster_cfg_t on_off_cfg; /*!< On off cluster configuration, @ref esp_zb_on_off_cluster_cfg_s */
|
||||
} esp_zb_on_off_light_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard on-off switch device clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_on_off_switch_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
} esp_zb_on_off_switch_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard color dimmable light device clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_color_dimmable_light_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_groups_cluster_cfg_t groups_cfg; /*!< Groups cluster configuration, @ref esp_zb_groups_cluster_cfg_s */
|
||||
esp_zb_scenes_cluster_cfg_t scenes_cfg; /*!< Scenes cluster configuration, @ref esp_zb_scenes_cluster_cfg_s */
|
||||
esp_zb_on_off_cluster_cfg_t on_off_cfg; /*!< On off cluster configuration, @ref esp_zb_on_off_cluster_cfg_s */
|
||||
esp_zb_level_cluster_cfg_t level_cfg; /*!< Level cluster configuration, @ref esp_zb_level_cluster_cfg_s */
|
||||
esp_zb_color_cluster_cfg_t color_cfg; /*!< Color cluster configuration, @ref esp_zb_color_cluster_cfg_s */
|
||||
} esp_zb_color_dimmable_light_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard color dimmable switch device clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_color_dimmable_switch_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
} esp_zb_color_dimmable_switch_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard mains power outlet clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_mains_power_outlet_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_groups_cluster_cfg_t groups_cfg; /*!< Groups cluster configuration, @ref esp_zb_groups_cluster_cfg_s */
|
||||
esp_zb_scenes_cluster_cfg_t scenes_cfg; /*!< Scenes cluster configuration, @ref esp_zb_scenes_cluster_cfg_s */
|
||||
esp_zb_on_off_cluster_cfg_t on_off_cfg; /*!< On off cluster configuration, @ref esp_zb_on_off_cluster_cfg_s */
|
||||
} esp_zb_mains_power_outlet_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard shade clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_shade_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_groups_cluster_cfg_t groups_cfg; /*!< Groups cluster configuration, @ref esp_zb_groups_cluster_cfg_s */
|
||||
esp_zb_scenes_cluster_cfg_t scenes_cfg; /*!< Scenes cluster configuration, @ref esp_zb_scenes_cluster_cfg_s */
|
||||
esp_zb_on_off_cluster_cfg_t on_off_cfg; /*!< On off cluster configuration, @ref esp_zb_on_off_cluster_cfg_s */
|
||||
esp_zb_level_cluster_cfg_t level_cfg; /*!< Level cluster configuration, @ref esp_zb_level_cluster_cfg_s */
|
||||
esp_zb_shade_config_cluster_cfg_t shade_cfg; /*!< Shade config cluster configuration, @ref esp_zb_shade_config_cluster_cfg_s */
|
||||
} esp_zb_shade_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard shade controller device clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_shade_controller_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
} esp_zb_shade_controller_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard door lock clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_door_lock_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_groups_cluster_cfg_t groups_cfg; /*!< Groups cluster configuration, @ref esp_zb_groups_cluster_cfg_s */
|
||||
esp_zb_scenes_cluster_cfg_t scenes_cfg; /*!< Scenes cluster configuration, @ref esp_zb_scenes_cluster_cfg_s */
|
||||
esp_zb_door_lock_cluster_cfg_t door_lock_cfg; /*!< Door Lock cluster configuration, @ref esp_zb_door_lock_cluster_cfg_s */
|
||||
} esp_zb_door_lock_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard door lock controller clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_door_lock_controller_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
} esp_zb_door_lock_controller_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard temperature sensor clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_temperature_sensor_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_temperature_meas_cluster_cfg_t temp_meas_cfg; /*!< Temperature measurement cluster configuration, @ref esp_zb_temperature_meas_cluster_cfg_s */
|
||||
} esp_zb_temperature_sensor_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard configuration tool clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_configuration_tool_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
} esp_zb_configuration_tool_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard thermostat clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_thermostat_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_thermostat_cluster_cfg_t thermostat_cfg; /*!< Thermostat cluster configuration, @ref esp_zb_thermostat_cluster_cfg_s */
|
||||
} esp_zb_thermostat_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA window covering clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_window_covering_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_groups_cluster_cfg_t groups_cfg; /*!< Groups cluster configuration, @ref esp_zb_groups_cluster_cfg_s */
|
||||
esp_zb_scenes_cluster_cfg_t scenes_cfg; /*!< Scenes cluster configuration, @ref esp_zb_scenes_cluster_cfg_s */
|
||||
esp_zb_window_covering_cluster_cfg_t window_cfg; /*!< Window covering cluster configuration, @ref esp_zb_window_covering_cluster_cfg_s */
|
||||
} esp_zb_window_covering_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA window covering controller clusters.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_window_covering_controller_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
} esp_zb_window_covering_controller_cfg_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA light sensor configuration.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_light_sensor_cfg_s {
|
||||
esp_zb_basic_cluster_cfg_t basic_cfg; /*!< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
|
||||
esp_zb_identify_cluster_cfg_t identify_cfg; /*!< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
|
||||
esp_zb_illuminance_meas_cluster_cfg_t illuminance_cfg; /*!< Illuminance cluster configuration @ref esp_zb_illuminance_meas_cluster_cfg_s */
|
||||
} esp_zb_light_sensor_cfg_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef ESP_ZB_VER_MAJOR
|
||||
#define ESP_ZB_VER_MAJOR 1
|
||||
#endif
|
||||
|
||||
#ifndef ESP_ZB_VER_MINOR
|
||||
#define ESP_ZB_VER_MINOR 6
|
||||
#endif
|
||||
|
||||
#ifndef ESP_ZB_VER_PATCH
|
||||
#define ESP_ZB_VER_PATCH 4
|
||||
#endif
|
||||
@@ -0,0 +1,742 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_core.h"
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard on-off light device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.groups_cfg = \
|
||||
{ \
|
||||
.groups_name_support_id = ESP_ZB_ZCL_GROUPS_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.scenes_cfg = \
|
||||
{ \
|
||||
.scenes_count = ESP_ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE, \
|
||||
.current_scene = ESP_ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE, \
|
||||
.current_group = ESP_ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE, \
|
||||
.scene_valid = ESP_ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE, \
|
||||
.name_support = ESP_ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.on_off_cfg = \
|
||||
{ \
|
||||
.on_off = ESP_ZB_ZCL_ON_OFF_ON_OFF_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard on-off switch device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_ON_OFF_SWITCH_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard color dimmable light device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_COLOR_DIMMABLE_LIGHT_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.groups_cfg = \
|
||||
{ \
|
||||
.groups_name_support_id = ESP_ZB_ZCL_GROUPS_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.scenes_cfg = \
|
||||
{ \
|
||||
.scenes_count = ESP_ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE, \
|
||||
.current_scene = ESP_ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE, \
|
||||
.current_group = ESP_ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE, \
|
||||
.scene_valid = ESP_ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE, \
|
||||
.name_support = ESP_ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.on_off_cfg = \
|
||||
{ \
|
||||
.on_off = ESP_ZB_ZCL_ON_OFF_ON_OFF_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.level_cfg = \
|
||||
{ \
|
||||
.current_level = ESP_ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.color_cfg = \
|
||||
{ \
|
||||
.current_x = ESP_ZB_ZCL_COLOR_CONTROL_CURRENT_X_DEF_VALUE, \
|
||||
.current_y = ESP_ZB_ZCL_COLOR_CONTROL_CURRENT_Y_DEF_VALUE, \
|
||||
.color_mode = ESP_ZB_ZCL_COLOR_CONTROL_COLOR_MODE_DEFAULT_VALUE, \
|
||||
.options = ESP_ZB_ZCL_COLOR_CONTROL_OPTIONS_DEFAULT_VALUE, \
|
||||
.enhanced_color_mode = ESP_ZB_ZCL_COLOR_CONTROL_ENHANCED_COLOR_MODE_DEFAULT_VALUE, \
|
||||
.color_capabilities = 0x0008, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard color dimmable switch device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_COLOR_DIMMABLE_SWITCH_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard mains power outlet device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_MAINS_POWER_OUTLET_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.groups_cfg = \
|
||||
{ \
|
||||
.groups_name_support_id = ESP_ZB_ZCL_GROUPS_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.scenes_cfg = \
|
||||
{ \
|
||||
.scenes_count = ESP_ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE, \
|
||||
.current_scene = ESP_ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE, \
|
||||
.current_group = ESP_ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE, \
|
||||
.scene_valid = ESP_ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE, \
|
||||
.name_support = ESP_ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.on_off_cfg = \
|
||||
{ \
|
||||
.on_off = ESP_ZB_ZCL_ON_OFF_ON_OFF_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard shade device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_SHADE_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.groups_cfg = \
|
||||
{ \
|
||||
.groups_name_support_id = ESP_ZB_ZCL_GROUPS_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.scenes_cfg = \
|
||||
{ \
|
||||
.scenes_count = ESP_ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE, \
|
||||
.current_scene = ESP_ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE, \
|
||||
.current_group = ESP_ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE, \
|
||||
.scene_valid = ESP_ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE, \
|
||||
.name_support = ESP_ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.on_off_cfg = \
|
||||
{ \
|
||||
.on_off = ESP_ZB_ZCL_ON_OFF_ON_OFF_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.level_cfg = \
|
||||
{ \
|
||||
.current_level = ESP_ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.shade_cfg = \
|
||||
{ \
|
||||
.status = ESP_ZB_ZCL_SHADE_CONFIG_STATUS_DEFAULT_VALUE, \
|
||||
.closed_limit = ESP_ZB_ZCL_SHADE_CONFIG_CLOSED_LIMIT_DEFAULT_VALUE, \
|
||||
.mode = ESP_ZB_ZCL_SHADE_CONFIG_MODE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard shade controller device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_SHADE_CONTROLLER_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard door lock device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_DOOR_LOCK_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.groups_cfg = \
|
||||
{ \
|
||||
.groups_name_support_id = ESP_ZB_ZCL_GROUPS_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.scenes_cfg = \
|
||||
{ \
|
||||
.scenes_count = ESP_ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE, \
|
||||
.current_scene = ESP_ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE, \
|
||||
.current_group = ESP_ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE, \
|
||||
.scene_valid = ESP_ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE, \
|
||||
.name_support = ESP_ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.door_lock_cfg = \
|
||||
{ \
|
||||
.lock_state = ESP_ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_DEFAULT_VALUE, \
|
||||
.lock_type = ESP_ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_DEFAULT_VALUE, \
|
||||
.actuator_enabled = ESP_ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard door lock controller device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_DOOR_LOCK_CONTROLLER_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard temperature sensor device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_TEMPERATURE_SENSOR_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.temp_meas_cfg = \
|
||||
{ \
|
||||
.measured_value = ESP_ZB_ZCL_TEMP_MEASUREMENT_MEASURED_VALUE_DEFAULT, \
|
||||
.min_value = ESP_ZB_ZCL_TEMP_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT, \
|
||||
.max_value = ESP_ZB_ZCL_TEMP_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard configuration tool device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_CONFIGURATION_TOOL_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard thermostat device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_THERMOSTAT_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.thermostat_cfg = \
|
||||
{ \
|
||||
.local_temperature = ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_DEFAULT_VALUE, \
|
||||
.occupied_cooling_setpoint = ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_COOLING_SETPOINT_DEFAULT_VALUE, \
|
||||
.occupied_heating_setpoint = ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_HEATING_SETPOINT_DEFAULT_VALUE, \
|
||||
.control_sequence_of_operation = ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_DEFAULT_VALUE, \
|
||||
.system_mode = ESP_ZB_ZCL_THERMOSTAT_CONTROL_SYSTEM_MODE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard window covering device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_WINDOW_COVERING_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.groups_cfg = \
|
||||
{ \
|
||||
.groups_name_support_id = ESP_ZB_ZCL_GROUPS_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.scenes_cfg = \
|
||||
{ \
|
||||
.scenes_count = ESP_ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE, \
|
||||
.current_scene = ESP_ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE, \
|
||||
.current_group = ESP_ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE, \
|
||||
.scene_valid = ESP_ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE, \
|
||||
.name_support = ESP_ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.window_cfg = \
|
||||
{ \
|
||||
. covering_type = ESP_ZB_ZCL_WINDOW_COVERING_WINDOW_COVERING_TYPE_DEFAULT_VALUE, \
|
||||
. covering_status = ESP_ZB_ZCL_WINDOW_COVERING_CONFIG_STATUS_DEFAULT_VALUE, \
|
||||
. covering_mode = ESP_ZB_ZCL_WINDOW_COVERING_MODE_DEFAULT_VALUE, \
|
||||
} \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Zigbee HA standard window covering controller device default config value.
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_DEFAULT_WINDOW_COVERING_CONTROLLER_CONFIG() \
|
||||
{ \
|
||||
.basic_cfg = \
|
||||
{ \
|
||||
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
|
||||
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
|
||||
}, \
|
||||
.identify_cfg = \
|
||||
{ \
|
||||
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/********************************* Declare functions **************************************/
|
||||
|
||||
/***************************** ZCL HA device standard cluster list ********************************/
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA on-off light cluster list.
|
||||
*
|
||||
* @note This contains basic, identify, groups, scenes, on-off cluster as server side.
|
||||
* @param[in] light_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_on_off_light_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_on_off_light_clusters_create(esp_zb_on_off_light_cfg_t *light_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA on-off switch cluster list.
|
||||
*
|
||||
* @note This contains basic, identify, as server side. And identify, on-off cluster as client side.
|
||||
* @param[in] switch_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_on_off_switch_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_on_off_switch_clusters_create(esp_zb_on_off_switch_cfg_t *switch_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA color dimmable light cluster list.
|
||||
*
|
||||
* @note This contains basic, identify, groups, scenes, on-off, level, color cluster as server side.
|
||||
* @param[in] light_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_color_dimmable_light_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_color_dimmable_light_clusters_create(esp_zb_color_dimmable_light_cfg_t *light_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA color dimmable switch cluster list.
|
||||
*
|
||||
* @note This contains basic, identify, as server side. And identify, on-off, level, color cluster as client side.
|
||||
* @param[in] switch_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_color_dimmable_switch_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_color_dimmable_switch_clusters_create(esp_zb_color_dimmable_switch_cfg_t *switch_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA mains power outlet cluster list.
|
||||
*
|
||||
* @note This contains basic, identify, groups, scenes, on-off, level control and shade config cluster as server side.
|
||||
* @param[in] outlet_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_mains_power_outlet_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_mains_power_outlet_clusters_create(esp_zb_mains_power_outlet_cfg_t *outlet_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA shade cluster list.
|
||||
*
|
||||
* @note This contains basic, identify, groups, scenes, on-off cluster as server side.
|
||||
* @param[in] shade_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_shade_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_shade_clusters_create(esp_zb_shade_cfg_t *shade_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA shade controller cluster list.
|
||||
*
|
||||
* @note This contains basic, identify cluster as server side. Identify, on-off and level control cluster as client side.
|
||||
* @param[in] shade_controller_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_shade_controller_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_shade_controller_clusters_create(esp_zb_shade_controller_cfg_t *shade_controller_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA door lock cluster list.
|
||||
*
|
||||
* @note This contains basic, identify, groups, scenes, door lock cluster as server side.
|
||||
* @param[in] door_lock Configuration parameters for this cluster lists defined by @ref esp_zb_door_lock_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_door_lock_clusters_create(esp_zb_door_lock_cfg_t *door_lock);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA door lock controller cluster list.
|
||||
*
|
||||
* @note This contains basic, identify cluster as server side. Identify, scenes, groups and door lock cluster as client side.
|
||||
* @param[in] door_lock_controller Configuration parameters for this cluster lists defined by @ref esp_zb_door_lock_controller_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_door_lock_controller_clusters_create(esp_zb_door_lock_controller_cfg_t *door_lock_controller);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA temperature sensor cluster list.
|
||||
*
|
||||
* @note This contains basic, identify cluster and temperature measurement as server side. Identify cluster as client side.
|
||||
* @param[in] temperature_sensor Configuration parameters for this cluster lists defined by @ref esp_zb_temperature_sensor_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_temperature_sensor_clusters_create(esp_zb_temperature_sensor_cfg_t *temperature_sensor);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA configuration tool cluster list.
|
||||
*
|
||||
* @note This contains basic, identify cluster as server side. Identify, scenes, groups and door lock cluster as client side.
|
||||
* @param[in] configuration_tool Configuration parameters for this cluster lists defined by @ref esp_zb_configuration_tool_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_configuration_tool_clusters_create(esp_zb_configuration_tool_cfg_t *configuration_tool);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA thermostat cluster list.
|
||||
*
|
||||
* @note This contains basic, identify and thermostat cluster as server side. Identify cluster as client side.
|
||||
* @param[in] thermostat Configuration parameters for this cluster lists defined by @ref esp_zb_thermostat_cfg_s
|
||||
*
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_thermostat_clusters_create(esp_zb_thermostat_cfg_t *thermostat);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA window covering cluster list
|
||||
*
|
||||
* @note This contains basic, identify, group, scene and window_covering cluster as server side.
|
||||
* @param[in] window Configuration parameters for this cluster lists defined by @ref esp_zb_window_covering_cfg_s
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_window_covering_clusters_create(esp_zb_window_covering_cfg_t *window);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA window covering controller cluster list
|
||||
*
|
||||
* @note This contains the basic and identify clusters as server side, and the identify and window_covering clusters as client side.
|
||||
* @param[in] window_controller Configuration parameters for this cluster lists defined by @ref esp_zb_window_covering_controller_cfg_s
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_window_covering_controller_clusters_create(esp_zb_window_covering_controller_cfg_t *window_controller);
|
||||
|
||||
/**
|
||||
* @brief Create a standard HA light sensor cluster list
|
||||
*
|
||||
* @note This contains the basic, identify and illuminance clusters as server side.
|
||||
* @param[in] light_sensor Configuration parameters for this cluster lists defined by @ref esp_zb_light_sensor_cfg_s
|
||||
* @return Pointer to cluster list @ref esp_zb_cluster_list_s
|
||||
*/
|
||||
esp_zb_cluster_list_t *esp_zb_light_sensor_clusters_create(esp_zb_light_sensor_cfg_t *light_sensor);
|
||||
|
||||
/****************************** ZCL HA device standard endpoint list ********************************/
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA on off light endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] light_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_on_off_light_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_on_off_light_ep_create(uint8_t endpoint_id, esp_zb_on_off_light_cfg_t *light_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA on off switch endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] switch_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_on_off_switch_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_on_off_switch_ep_create(uint8_t endpoint_id, esp_zb_on_off_switch_cfg_t *switch_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA color dimmable light endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] light_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_color_dimmable_light_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_color_dimmable_light_ep_create(uint8_t endpoint_id, esp_zb_color_dimmable_light_cfg_t *light_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA color dimmable switch endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] switch_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_color_dimmable_switch_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_color_dimmable_switch_ep_create(uint8_t endpoint_id, esp_zb_color_dimmable_switch_cfg_t *switch_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA mains power outlet endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] outlet_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_mains_power_outlet_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_mains_power_outlet_ep_create(uint8_t endpoint_id, esp_zb_mains_power_outlet_cfg_t *outlet_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA shade endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] shade_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_shade_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_shade_ep_create(uint8_t endpoint_id, esp_zb_shade_cfg_t *shade_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA shade controller endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] shade_controller_cfg Configuration parameters for this cluster lists defined by @ref esp_zb_shade_controller_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_shade_controller_ep_create(uint8_t endpoint_id, esp_zb_shade_controller_cfg_t *shade_controller_cfg);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA door lock endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] door_lock Configuration parameters for this cluster lists defined by @ref esp_zb_door_lock_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_door_lock_ep_create(uint8_t endpoint_id, esp_zb_door_lock_cfg_t *door_lock);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA door lock controller endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] door_lock_controller Configuration parameters for this cluster lists defined by @ref esp_zb_door_lock_controller_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_door_lock_controller_ep_create(uint8_t endpoint_id, esp_zb_door_lock_controller_cfg_t *door_lock_controller);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA temperature sensor endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] temperature_sensor Configuration parameters for this cluster lists defined by @ref esp_zb_temperature_sensor_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_temperature_sensor_ep_create(uint8_t endpoint_id, esp_zb_temperature_sensor_cfg_t *temperature_sensor);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA configuration tool endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] configuration_tool Configuration parameters for this cluster lists defined by @ref esp_zb_configuration_tool_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_configuration_tool_ep_create(uint8_t endpoint_id, esp_zb_configuration_tool_cfg_t *configuration_tool);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA thermostat endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] thermostat Configuration parameters for this cluster lists defined by @ref esp_zb_thermostat_cfg_s
|
||||
*
|
||||
* @note This function adds a single endpoint to a cluster list.
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_thermostat_ep_create(uint8_t endpoint_id, esp_zb_thermostat_cfg_t *thermostat);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA window covering endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] window_covering Configuration parameters for this cluster lists defined by @ref esp_zb_window_covering_cfg_s
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_window_covering_ep_create(uint8_t endpoint_id, esp_zb_window_covering_cfg_t *window_covering);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA window covering controller endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint
|
||||
* @param[in] window_controller Configuration parameters for this cluster lists defined by @ref esp_zb_window_covering_controller_cfg_s
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_window_covering_controller_ep_create(uint8_t endpoint_id, esp_zb_window_covering_controller_cfg_t *window_controller);
|
||||
|
||||
/**
|
||||
* @brief Create a standard single HA light sensor endpoint.
|
||||
*
|
||||
* @param[in] endpoint_id The specific endpoint identifier
|
||||
* @param[in] light_sensor Configuration parameters for this cluster list defined by @ref esp_zb_light_sensor_cfg_s
|
||||
*
|
||||
* @return Pointer to esp_zb_ep_list_t @ref esp_zb_ep_list_s
|
||||
*/
|
||||
esp_zb_ep_list_t *esp_zb_light_sensor_ep_create(uint8_t endpoint_id, esp_zb_light_sensor_cfg_t *light_sensor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,384 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** Enum of the Zigbee network device type
|
||||
* @anchor esp_zb_nwk_device_type_t
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_DEVICE_TYPE_COORDINATOR = 0x0, /*!< Device - Coordinator */
|
||||
ESP_ZB_DEVICE_TYPE_ROUTER = 0x1, /*!< Device - Router */
|
||||
ESP_ZB_DEVICE_TYPE_ED = 0x2, /*!< Device - End device */
|
||||
ESP_ZB_DEVICE_TYPE_NONE = 0x3, /*!< Unknown Device */
|
||||
} esp_zb_nwk_device_type_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration of Zigbee network command status code
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_NWK_COMMAND_STATUS_NO_ROUTE_AVAILABLE = 0x00U, /*!< No route available */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_TREE_LINK_FAILURE = 0x01U, /*!< Tree link failure */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_NONE_TREE_LINK_FAILURE = 0x02U, /*!< None-tree link failure */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_LOW_BATTERY_LEVEL = 0x03U, /*!< Low battery level */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_NO_ROUTING_CAPACITY = 0x04U, /*!< No routing capacity */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_NO_INDIRECT_CAPACITY = 0x05U, /*!< No indirect capacity */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_INDIRECT_TRANSACTION_EXPIRY = 0x06U, /*!< Indirect transaction expiry */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_TARGET_DEVICE_UNAVAILABLE = 0x07U, /*!< Target device unavailable */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_TARGET_ADDRESS_UNALLOCATED = 0x08U, /*!< Target address unallocated */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_PARENT_LINK_FAILURE = 0x09U, /*!< Parent link failure */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_VALIDATE_ROUTE = 0x0aU, /*!< Validate route */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_SOURCE_ROUTE_FAILURE = 0x0bU, /*!< Source route failure */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_MANY_TO_ONE_ROUTE_FAILURE = 0x0cU, /*!< Many-to-one route failure */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_ADDRESS_CONFLICT = 0x0dU, /*!< Address conflict */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_VERIFY_ADDRESS = 0x0eU, /*!< Verify address */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_PAN_IDENTIFIER_UPDATE = 0x0fU, /*!< Pan ID update */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_NETWORK_ADDRESS_UPDATE = 0x10U, /*!< Network address update */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_BAD_FRAME_COUNTER = 0x11U, /*!< Bad frame counter */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_BAD_KEY_SEQUENCE_NUMBER = 0x12U, /*!< Bad key sequence number */
|
||||
ESP_ZB_NWK_COMMAND_STATUS_UNKNOWN_COMMAND = 0x13U, /*!< Command received is not known */
|
||||
} esp_zb_nwk_command_status_t;
|
||||
|
||||
#define ESP_ZB_NWK_INFO_ITERATOR_INIT 0 /*!< Initializer for esp_zb_neighbor_info_iterator_t. */
|
||||
#define ESP_ZB_NWK_INFO_ITERATOR_EOT 0xFFFF /*!< Indicate the iterator reach the End of Table. */
|
||||
|
||||
#define ESP_ZB_NWK_MAX_SOURCE_ROUTE 5
|
||||
|
||||
/**
|
||||
* @brief Iterator used to iterate through the tables of network informations.
|
||||
*
|
||||
*/
|
||||
typedef uint16_t esp_zb_nwk_info_iterator_t;
|
||||
|
||||
/**
|
||||
* @brief Relationship of network neighbor
|
||||
* @anchor esp_zb_nwk_relationship_t
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_NWK_RELATIONSHIP_PARENT = 0U, /*!< The peer device is the parent of current device. */
|
||||
ESP_ZB_NWK_RELATIONSHIP_CHILD = 1U, /*!< The peer device is the child of current device. */
|
||||
ESP_ZB_NWK_RELATIONSHIP_SIBLING = 2U, /*!< The peer device is the sibling of current device. */
|
||||
ESP_ZB_NWK_RELATIONSHIP_NONE_OF_THE_ABOVE = 3U, /*!< The relationship is none of above, means that the peer device is
|
||||
currently unknown, and its relationship with the network is in
|
||||
the process of being established. */
|
||||
ESP_ZB_NWK_RELATIONSHIP_PREVIOUS_CHILD = 4U, /*!< The peer device is the previous child of current device, meaning it
|
||||
has been confirmed to have left the network */
|
||||
ESP_ZB_NWK_RELATIONSHIP_UNAUTHENTICATED_CHILD = 5U, /*!< The peer device is the unauthenticated child of current device,
|
||||
meaning it is in the process of joining the network but has not yet
|
||||
been authenticated. */
|
||||
} esp_zb_nwk_relationship_t;
|
||||
|
||||
/**
|
||||
* @brief Information of network neighbor table entry
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_nwk_neighbor_info_s {
|
||||
esp_zb_ieee_addr_t ieee_addr; /*!< Long address (EUI64) of the device. */
|
||||
uint16_t short_addr; /*!< Short address (network address) of the device. */
|
||||
uint8_t device_type; /*!< Neighbor device type, refer to @ref esp_zb_nwk_device_type_t */
|
||||
uint8_t depth; /*!< The network depth of this device.*/
|
||||
uint8_t rx_on_when_idle; /*!< Indicates if neighbour receiver enabled during idle periods:*/
|
||||
uint8_t relationship; /*!< The relationship between the neighbour and current device, refer to @ref esp_zb_nwk_relationship_t */
|
||||
uint8_t lqi; /*!< Link quality. Also used to calculate incoming cost */
|
||||
int8_t rssi; /*!< Received signal strength indicator */
|
||||
uint8_t outgoing_cost; /*!< The cost of an outgoing link. Got from link status. */
|
||||
uint8_t age; /*!< Counter value for router aging. The number of nwkLinkStatusPeriod
|
||||
* intervals since a link status command was received. */
|
||||
uint32_t device_timeout; /*!< Configured end device timeout, in seconds. */
|
||||
uint32_t timeout_counter; /*!< Timeout value ED aging, in milliseconds. */
|
||||
} esp_zb_nwk_neighbor_info_t;
|
||||
|
||||
/**
|
||||
* @brief State of the network route
|
||||
* @anchor esp_zb_nwk_route_state_t
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_NWK_ROUTE_STATE_ACTIVE = 0U, /*!< The route is active. */
|
||||
ESP_ZB_NWK_ROUTE_STATE_DISCOVERY_UNDERWAY = 1U, /*!< The route is under discovery process. */
|
||||
ESP_ZB_NWK_ROUTE_STATE_DISCOVERY_FAILED = 2U, /*!< The discovery process failed of this route. */
|
||||
ESP_ZB_NWK_ROUTE_STATE_INACTIVE = 3U, /*!< The route is inactive and under validation. */
|
||||
} esp_zb_nwk_route_state_t;
|
||||
|
||||
/**
|
||||
* @brief Information of network routing table entry
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_nwk_route_info_s {
|
||||
uint16_t dest_addr; /*!< 16-bit network address of the destination. */
|
||||
uint16_t next_hop_addr; /*!< 16-bit network address of the next hop on the way to the destination. */
|
||||
struct {
|
||||
uint8_t status : 3; /*!< The status of the route, bit 0 - 2, refer to esp_zb_nwk_route_state_t */
|
||||
uint8_t no_route_cache : 1; /*!< Dest does not store source routes, bit 3 */
|
||||
uint8_t many_to_one : 1; /*!< Dest is the concentrator and many-to-one request was used, bit 4 */
|
||||
uint8_t route_record_required : 1; /*!< Route record command frame should be sent
|
||||
* to the dest prior to the next data packet, bit 5 */
|
||||
uint8_t group_id : 1; /*!< Indicates that dest_addr is a Group ID, bit 6 */
|
||||
uint8_t /* reserved */ : 2; /*!< Reserved, bit 7 */
|
||||
} flags; /*!< Flags in the routing table entry */
|
||||
uint8_t expiry; /*!< Expiration time. */
|
||||
} esp_zb_nwk_route_info_t;
|
||||
|
||||
/**
|
||||
* @brief Information of network route record table entry
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_nwk_route_record_info_s {
|
||||
uint16_t dest_address; /*!< Destination network address of this route record. */
|
||||
uint8_t expiry; /*!< Expiration time. */
|
||||
uint8_t relay_count; /*!< The count of relay nodes from concentrator to the destination. */
|
||||
uint16_t path[ESP_ZB_NWK_MAX_SOURCE_ROUTE]; /*!< The set of network addresses that represent the route
|
||||
* in order from the concentrator to the destination.*/
|
||||
} esp_zb_nwk_route_record_info_t;
|
||||
|
||||
/**
|
||||
* @brief Set the network update id
|
||||
*
|
||||
* @param[in] id The network update id is expected to be set
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_INVALID_STATE: Device is already on a network
|
||||
*/
|
||||
esp_err_t esp_zb_nwk_set_update_id(uint8_t id);
|
||||
|
||||
/**
|
||||
* @brief Get the network update id
|
||||
*
|
||||
* @return The network update id
|
||||
*/
|
||||
uint8_t esp_zb_nwk_get_update_id(void);
|
||||
|
||||
/**
|
||||
* @brief Set the network outgoing frame counter
|
||||
*
|
||||
* @param[in] frame_counter The network frame counter value is expect to be set
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_INVALID_STATE: Device is already on a network
|
||||
*/
|
||||
esp_err_t esp_zb_nwk_set_frame_counter(uint32_t frame_counter);
|
||||
|
||||
/**
|
||||
* @brief Get the current network outgoing frame counter
|
||||
*
|
||||
* @return The network outgoing frame counter
|
||||
*/
|
||||
uint32_t esp_zb_nwk_get_frame_counter(void);
|
||||
|
||||
/**
|
||||
* @brief Set zigbee rx on when idle.
|
||||
*
|
||||
* @param[in] rx_on enable/disable rx on when idle.
|
||||
*
|
||||
*/
|
||||
void esp_zb_set_rx_on_when_idle(bool rx_on);
|
||||
|
||||
/**
|
||||
* @brief Get the current state of RX-ON-When-Idle
|
||||
*
|
||||
* @return The state of RX-ON-When-Idle
|
||||
*/
|
||||
bool esp_zb_get_rx_on_when_idle(void);
|
||||
|
||||
/**
|
||||
* @brief Set the maximum number of children allowed.
|
||||
*
|
||||
* The function only takes effect on ZC/ZR.
|
||||
*
|
||||
* @param[in] max_children Maximum number of children.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_NOT_SUPPORTED: for ZED.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_nwk_set_max_children(uint8_t max_children);
|
||||
|
||||
/**
|
||||
* @brief Get the maximum number of children allowed.
|
||||
*
|
||||
* @return
|
||||
* - Maximum number of children, for ZC/ZR
|
||||
* - 0, for ZED
|
||||
*
|
||||
*/
|
||||
uint8_t esp_zb_nwk_get_max_children(void);
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee device long address.
|
||||
*
|
||||
* @note Set this function AFTER @ref esp_zb_init called, if user wants to set specific address
|
||||
* without reading MAC address from flash refer to tools/mfg_tool or eFUSE.
|
||||
*
|
||||
* @param[in] addr An 64-bit of IEEE long address, which is presented in little-endian.
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_INVALID_STATE: Device is already on a network
|
||||
*/
|
||||
esp_err_t esp_zb_set_long_address(esp_zb_ieee_addr_t addr);
|
||||
|
||||
/**
|
||||
* @brief Get the Zigbee device long address.
|
||||
*
|
||||
* @note This function will return a pointer to 64-bit of ieee long address.
|
||||
*
|
||||
* @param[out] addr An 64-bit of IEEE long address, which is presented in little-endian.
|
||||
*
|
||||
*/
|
||||
void esp_zb_get_long_address(esp_zb_ieee_addr_t addr);
|
||||
|
||||
/**
|
||||
* @brief Get the Zigbee device short address.
|
||||
*
|
||||
* @return 16-bit Zigbee short address
|
||||
*
|
||||
*/
|
||||
uint16_t esp_zb_get_short_address(void);
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee network extended PAN ID.
|
||||
*
|
||||
* @param ext_pan_id An 64-bit of extended PAN ID, which is presented in little-endian.
|
||||
*/
|
||||
void esp_zb_set_extended_pan_id(const esp_zb_ieee_addr_t ext_pan_id);
|
||||
|
||||
/**
|
||||
* @brief Get the Zigbee network extended PAN ID.
|
||||
*
|
||||
* @note This function will return back a pointer to 64-bit of extended PAN ID.
|
||||
*
|
||||
* @param[out] ext_pan_id An 64-bit of extended PAN ID, which is presented in little-endian.
|
||||
*
|
||||
*/
|
||||
void esp_zb_get_extended_pan_id(esp_zb_ieee_addr_t ext_pan_id);
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee network PAN ID.
|
||||
*
|
||||
* @note The PAN ID will be set from the network PIB to the IEEE802154 PIB
|
||||
* @param[in] pan_id 16-bit Zigbee network PAN ID
|
||||
*
|
||||
*/
|
||||
void esp_zb_set_pan_id(uint16_t pan_id);
|
||||
|
||||
/**
|
||||
* @brief Get the Zigbee network PAN ID.
|
||||
*
|
||||
* @return 16-bit Zigbee network PAN ID
|
||||
*
|
||||
*/
|
||||
uint16_t esp_zb_get_pan_id(void);
|
||||
|
||||
/**
|
||||
* @brief Get the currently used channel.
|
||||
* @return 8-bit Zigbee network channel number
|
||||
*/
|
||||
uint8_t esp_zb_get_current_channel(void);
|
||||
|
||||
/**
|
||||
* @brief Get the network short address by the IEEE address
|
||||
*
|
||||
* @param[in] address An 64-bit for the IEEE address, which is presented in little-endian.
|
||||
* @return Network short address
|
||||
*
|
||||
*/
|
||||
uint16_t esp_zb_address_short_by_ieee(esp_zb_ieee_addr_t address);
|
||||
|
||||
/**
|
||||
* @brief Get the network IEEE address by the short address
|
||||
*
|
||||
* @param[in] short_addr The 2-byte address which will been used to search the mapped IEEE address
|
||||
* @param[out] ieee_addr The 64-bit of address for Zigbee IEEE address, which is presented in little-endian.
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_NOT_FOUND: not found the IEEE address
|
||||
*/
|
||||
esp_err_t esp_zb_ieee_address_by_short(uint16_t short_addr, uint8_t *ieee_addr);
|
||||
|
||||
/**
|
||||
* @brief Set the Zigbee network device role
|
||||
*
|
||||
* @param[in] role The network device role is expected to be set
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_INVALID_STATE: Device is already on a network
|
||||
* - ESP_ERR_INVALID_ARG: Invalid device role
|
||||
*/
|
||||
esp_err_t esp_zb_set_network_device_role(esp_zb_nwk_device_type_t role);
|
||||
|
||||
/**
|
||||
* @brief Get the Zigbee network device type.
|
||||
*
|
||||
* @return device type @ref esp_zb_nwk_device_type_t
|
||||
*
|
||||
*/
|
||||
esp_zb_nwk_device_type_t esp_zb_get_network_device_role(void);
|
||||
|
||||
/**
|
||||
* @brief Iterate through the neighbor table and get information about active neighbor
|
||||
*
|
||||
* @param[in] iterator iterator used to iterate through neighbor table, refer to esp_zb_nwk_info_iterator_t
|
||||
* @param[out] nbr_info next neighbor information, @ref esp_zb_nwk_neighbor_info_s
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
* - ESP_ERR_NOT_FOUND on finish iteration
|
||||
* - ESP_ERR_INVALID_ARG if arguements are invalid
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_nwk_get_next_neighbor(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_neighbor_info_t *nbr_info);
|
||||
|
||||
/**
|
||||
* @brief Iterate through the routing table and get the information in the entry
|
||||
*
|
||||
* @param[in] iterator iterator used to iterate through routing table, refer to esp_zb_nwk_info_iterator_t
|
||||
* @param[out] route_info next route entry information, @ref esp_zb_nwk_route_info_s
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
* - ESP_ERR_NOT_FOUND on finish iteration
|
||||
* - ESP_ERR_INVALID_ARG if arguements are invalid
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_nwk_get_next_route(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_route_info_t *route_info);
|
||||
|
||||
/**
|
||||
* @brief Iterate through the route record table (a.k.a source route table) and get the information in the entry
|
||||
*
|
||||
* @param[in] iterator iterator used to iterate through routing table, refer to esp_zb_nwk_info_iterator_t
|
||||
* @param[out] route_record_info next route record entry information, @ref esp_zb_nwk_route_record_info_s
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
* - ESP_ERR_NOT_FOUND on finish iteration
|
||||
* - ESP_ERR_INVALID_ARG if arguements are invalid
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_nwk_get_next_route_record(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_route_record_info_t *route_record_info);
|
||||
|
||||
/**
|
||||
* @brief Get the nwkLinkStatusPeriod attribute in NIB
|
||||
*
|
||||
* @return The time in seconds between link status command frames.
|
||||
*
|
||||
*/
|
||||
uint8_t esp_zb_nwk_get_link_status_period(void);
|
||||
|
||||
/**
|
||||
* @brief Set the nwkLinkStatusPeriod attribute in NIB
|
||||
*
|
||||
* @param[in] period The time in seconds between link status command frames.
|
||||
*
|
||||
* @return - ESP_OK on success, error code otherwise.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_nwk_set_link_status_period(uint8_t period);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "hal/gpio_types.h"
|
||||
#include "hal/uart_types.h"
|
||||
#include "driver/uart.h"
|
||||
#include "esp_ieee802154_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enumeration of Zigbee radio mode
|
||||
*/
|
||||
typedef enum {
|
||||
ZB_RADIO_MODE_NATIVE = 0x0, /*!< Use the native 15.4 radio */
|
||||
ZB_RADIO_MODE_UART_RCP = 0x1, /*!< UART connection to a 15.4 capable radio co - processor (RCP) */
|
||||
} esp_zb_radio_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration of Zigbee host connection mode
|
||||
*/
|
||||
typedef enum {
|
||||
ZB_HOST_CONNECTION_MODE_NONE = 0x0, /*!< Disable host connection */
|
||||
ZB_HOST_CONNECTION_MODE_CLI_UART = 0x1, /*!< CLI UART connection to the host */
|
||||
ZB_HOST_CONNECTION_MODE_RCP_UART = 0x2, /*!< RCP UART connection to the host */
|
||||
} esp_zb_host_connection_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration of Zigbee serial connection mode
|
||||
*/
|
||||
typedef enum {
|
||||
ZB_SERIAL_MODE_DISABLE = 0x0, /*!< Disable osif serial mode */
|
||||
ZB_SERIAL_MODE_UART = 0x1, /*!< osif serial mode through uart */
|
||||
} esp_zb_serial_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Uart configuration
|
||||
*/
|
||||
typedef struct {
|
||||
uart_port_t port; /*!< UART port number */
|
||||
gpio_num_t rx_pin; /*!< UART RX pin */
|
||||
gpio_num_t tx_pin; /*!< UART TX pin */
|
||||
uart_config_t uart_config; /*!< UART configuration, see uart_config_t docs */
|
||||
} esp_zb_uart_config_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee host connection mode
|
||||
*/
|
||||
typedef struct {
|
||||
esp_zb_serial_mode_t serial_mode; /*!< The osif serial connection mode */
|
||||
esp_zb_uart_config_t osif_serial_uart_config; /*!< The uart configuration to osif serial */
|
||||
} esp_zb_serial_config_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee radio configuration
|
||||
*/
|
||||
typedef struct {
|
||||
esp_zb_radio_mode_t radio_mode; /*!< The radio mode */
|
||||
esp_zb_uart_config_t radio_uart_config; /*!< The uart configuration to RCP */
|
||||
} esp_zb_radio_config_t;
|
||||
|
||||
/**
|
||||
* @briefZigbee host configuration
|
||||
*/
|
||||
typedef struct {
|
||||
esp_zb_host_connection_mode_t host_connection_mode; /*!< The host connection mode */
|
||||
esp_zb_uart_config_t host_uart_config; /*!< The uart configuration to host */
|
||||
} esp_zb_host_config_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee platform configuration
|
||||
*/
|
||||
typedef struct {
|
||||
esp_zb_radio_config_t radio_config; /*!< The radio configuration */
|
||||
esp_zb_host_config_t host_config; /*!< The host connection configuration */
|
||||
} esp_zb_platform_config_t;
|
||||
|
||||
/**
|
||||
* @brief Zigbee platform MAC configuration
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t csma_min_be; /*!< The minimum value of the backoff exponent, BE, in the CSMA-CA algorithm. */
|
||||
uint8_t csma_max_be; /*!< The maximum value of the backoff exponent, BE, in the CSMA-CA algorithm. */
|
||||
uint8_t csma_max_backoffs; /*!< The maximum number of backoffs the CSMA-CA algorithm will attempt before
|
||||
declaring a channel access failure. */
|
||||
} esp_zb_platform_mac_config_t;
|
||||
|
||||
/**
|
||||
* @brief A callback for user to obtain the MAC raw frame
|
||||
*
|
||||
* @param[in] frame The MAC raw frame
|
||||
* @param[in] info The basic information of MAC raw frame
|
||||
* @return
|
||||
* - true: Indicates the stack should drop this frame
|
||||
* - false: Indicates the stack should continue to handle the frame
|
||||
*/
|
||||
typedef bool (*esp_zb_mac_raw_frame_callback_t)(const uint8_t *frame, const esp_ieee802154_frame_info_t *info);
|
||||
|
||||
/**
|
||||
* @brief Register a callback to intercept the MAC raw frame.
|
||||
*
|
||||
* @param[in] cb A callback will be raised when receiving the MAC raw frame
|
||||
* @return
|
||||
* - ESP_OK: On success, otherwise, failed
|
||||
*/
|
||||
esp_err_t esp_zb_mac_raw_frame_handler_register(esp_zb_mac_raw_frame_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Set the espressif soc platform config
|
||||
*
|
||||
* @param[in] config - pointer to platform configuration @ref esp_zb_platform_config_t
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_platform_config(esp_zb_platform_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief Get the espressif soc platform config
|
||||
*
|
||||
* @return - pointer to platform configuration @ref esp_zb_platform_config_t
|
||||
*
|
||||
*/
|
||||
esp_zb_platform_config_t* esp_zb_platform_config_get(void);
|
||||
|
||||
/**
|
||||
* @brief Set the espressif platform mac config
|
||||
*
|
||||
* @param[in] config - pointer to platform mac configuration @ref esp_zb_platform_mac_config_t
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if @p config is invalid or with invalid values.
|
||||
* - ESP_ERR_NOT_SUPPORTED if ZB_RADIO_NATIVE is not enabled.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_platform_mac_config_set(const esp_zb_platform_mac_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief Get the espressif platform mac config
|
||||
*
|
||||
* @param[out] config - pointer to platform mac configuration @ref esp_zb_platform_mac_config_t
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
* - ESP_ERR_NOT_SUPPORTED if ZB_RADIO_NATIVE is not enabled.
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_platform_mac_config_get(esp_zb_platform_mac_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief Deinitialize the RCP
|
||||
*
|
||||
* @return - ESP_OK on success
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_zb_rcp_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Set zigbee default long poll interval
|
||||
*
|
||||
* @note Used internally by the Zigbee SDK, no user intervention is required.
|
||||
*
|
||||
* @param[in] milliseconds - default long_poll_interval
|
||||
*/
|
||||
void esp_zb_set_default_long_poll_interval(uint32_t milliseconds);
|
||||
|
||||
/**
|
||||
* @brief Get the zigbee default long poll interval
|
||||
*
|
||||
* @note Used internally by the Zigbee SDK, no user intervention is required.
|
||||
*
|
||||
* @return zigbee default long poll interval
|
||||
*
|
||||
*/
|
||||
uint32_t esp_zb_get_default_long_poll_interval(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "platform/esp_zigbee_platform.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Configure the radio spinel uart
|
||||
*
|
||||
* @param[in] radio_config Radio spinel UART interface configuration
|
||||
* @return
|
||||
* - ESP_OK: On success, otherwise, failure.
|
||||
*/
|
||||
esp_err_t esp_zb_radio_spinel_config_uart(const esp_zb_uart_config_t *uart_config);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
@@ -0,0 +1,362 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Analog Input cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_DESCRIPTION_ID = 0x001c, /*!< Description attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_MAX_PRESENT_VALUE_ID = 0x0041, /*!< MaxPresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_MIN_PRESENT_VALUE_ID = 0x0045, /*!< MinPresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_OUT_OF_SERVICE_ID = 0x0051, /*!< OutOfService attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_PRESENT_VALUE_ID = 0x0055, /*!< PresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_RELIABILITY_ID = 0x0067, /*!< Reliability attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_RESOLUTION_ID = 0x006a, /*!< Resolution attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_STATUS_FLAGS_ID = 0x006f, /*!< StatusFlags attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_ENGINEERING_UNITS_ID = 0x0075, /*!< EngineeringUnits attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_INPUT_APPLICATION_TYPE_ID = 0x0100, /*!< ApplicationType attribute */
|
||||
} esp_zb_zcl_analog_input_attr_t;
|
||||
|
||||
/** @brief Values for StatusFlags attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAG_NORMAL = 0x00, /*!< Normal (default) state. */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAG_IN_ALARM = 0x01, /*!< In alarm bit. */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAG_FAULT = 0x02, /*!< Fault bit. */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAG_OVERRIDDEN = 0x04, /*!< Overridden bit. */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAG_OUT_OF_SERVICE = 0x08, /*!< Out of service bit. */
|
||||
} esp_zb_zcl_analog_input_status_flags_value_t;
|
||||
|
||||
/** @brief Values for Reliability attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_NO_FAULT_DETECTED = 0x00, /*!< No fault detected */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_NO_SENSOR = 0x01, /*!< No sensor */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_OVER_RANGE = 0x02, /*!< Over range */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_UNDER_RANGE = 0x03, /*!< Under range */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_OPEN_LOOP = 0x04, /*!< Open loop */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_SHORTED_LOOP = 0x05, /*!< Shorted loop */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_NO_OUTPUT = 0x06, /*!< No output */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_UNRELIABLE_OTHER = 0x07, /*!< Unreliable other */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_PROCESS_ERROR = 0x08, /*!< Process error */
|
||||
/* 0x09 is for multistate clusters only */
|
||||
ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_CONFIGURATION_ERROR = 0x0a, /*!< Configuration error */
|
||||
} esp_zb_zcl_analog_input_reliability_value_t;
|
||||
|
||||
/** Analog Input cluster application types
|
||||
* The ApplicationType attribute indicates the specific application usage
|
||||
* for the cluster. ApplicationType is subdivided into Group, Type and
|
||||
* an Index number, as follows:
|
||||
*
|
||||
* Group = Bits 24 to 31
|
||||
* An indication of the cluster this attribute is part of. Analog Input
|
||||
* clusters have Group = 0x00.
|
||||
*
|
||||
* Type = Bits 16 to 23
|
||||
* The physical quantity that the PresentValue attribute of the cluster
|
||||
* represents.
|
||||
*
|
||||
* Index = Bits 0 to 15
|
||||
* The specific application usage of the cluster.
|
||||
*/
|
||||
|
||||
#define ESP_ZB_ZCL_AI_GROUP_ID 0x00
|
||||
#define ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(_type, _id) (((_type & 0xff) << 16) | (_id & 0xffff))
|
||||
|
||||
/** @brief Values for Analog Input cluster applications type*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_TEMPERATURE, /*!< Temperature */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_HUMIDITY, /*!< Humidity */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_PRESSURE, /*!< Pressure */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_FLOW, /*!< Flow */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_PERCENTAGE, /*!< Percentage */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_PPM, /*!< Ppm */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_RPM, /*!< Rpm */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_CURRENT_IN_AMPS, /*!< Current In AMPS */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_FREQUENCY, /*!< Frequence */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_POWER_IN_WATTS, /*!< Power In Watts */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_POWER_IN_KILOWATTS, /*!< Power In Kilowatts */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_ENERGY, /*!< Energy */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_COUNT_UNITLESS, /*!< Count Unitless */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_ENTHALPY, /*!< Enthalpy */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_TIME, /*!< Time */
|
||||
/* Types 0x0f to 0xfe are reserved */
|
||||
ESP_ZB_ZCL_AI_APP_TYPE_OTHER = 0xff, /*!< Other */
|
||||
} esp_zb_zcl_ai_application_types_t;
|
||||
|
||||
/** @brief Values for 'Temperature in degrees Celsius' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_2_PIPE_ENTERING = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_TEMPERATURE, 0x0000), /*!< 2 Pipe Entering */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_2_PIPE_LEAVING, /*!< 2 Pipe Leaving */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_BOILER_ENTERING, /*!< Boiler Entering */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_BOILER_LEAVING, /*!< Boiler Leaving */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_CHILLER_CHILLED_WATER_ENTERING, /*!< Chiller Chilled Water Entering */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_CHILLER_CHILLED_WATER_LEAVING, /*!< Chiller Chilled Water Leaving */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_CHILLER_CONDENSER_WATER_ENTERING, /*!< Chiller Condenser Water Entering */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_CHILLER_CONDENSER_WATER_LEAVING, /*!< Chiller Condenser Water Leaving */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_COLD_DECK, /*!< Cold Deck */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_COOLING_COIL_DISCHARGE, /*!< Cooling Coil Discharge */
|
||||
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_COOLING_ENTERING_WATER, /*!< Cooling entering water */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_COOLING_LEAVING_WATER, /*!< Cooling leaving Water */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_CONDENSER_WATER_RETURN, /*!< Condenser water return */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_CONDENSER_WATER_SUPPLY, /*!< Condenser water supply */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_DECOUPLE_LOOP_0, /*!< Decouple loop 0. Note: Decouple loop is duplicated in spec */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_BUILDING_LOAD, /*!< Building load */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_DECOUPLE_LOOP_1, /*!< Decouple loop 1 */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_DEW_POINT, /*!< Dew point */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_DISCHARGE_AIR, /*!< Discharge air */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_DISCHARGE, /*!< Discharge */
|
||||
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_EXHAUST_AIR_AFTER_HEAT_RECOVERY, /*!< Exhaust air afer heat recovery */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_EXHAUST_AIR, /*!< Exhaust air */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_GLYCOL, /*!< Glycol */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_HEAT_RECOVERY_AIR, /*!< Heat recovery air */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_HOT_DECK, /*!< Hot deck */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_HEAT_EXCHANGER_BYPASS, /*!< Heat exchanger bypass */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_HEAT_EXCHANGER_ENTERING, /*!< Heat exchanger entering */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_HEAT_EXCHANGER_LEAVING, /*!< Heat eXchanger leaving */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_MECHANICAL_ROOM, /*!< Mechanical room */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_MIXED_AIR_0, /*!< Mixed air 0. Mixed air is duplicated in spec */
|
||||
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_MIXED_AIR_1, /*!< Mixed air 1 */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_OUTDOOR_AIR_DEWPOINT, /*!< Outdoor air dewpoint */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_OUTDOOR_AIR, /*!< Outdoor air */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_PREHEAT_AIR, /*!< Preheat air */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_PREHEAT_ENTERING_WATER, /*!< Preheat entering water */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_PREHEAT_LEAVING_WATER, /*!< Preheat leaving water */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_PRIMARY_CHILLED_WATER_RETURN, /*!< Primary chilled water return */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_PRIMARY_CHILLED_WATER_SUPPLY, /*!< Primary chilled water supply */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_PRIMARY_HOT_WATER_RETURN, /*!< Primary hot watter return */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_PRIMARY_HOT_WATER_SUPPLY, /*!< Primary hot watter supply */
|
||||
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_REHEAT_COIL_DISCHARGE, /*!< Reheat coil discharge */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_REHEAT_ENTERING_WATER, /*!< Reheat entering water */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_REHEAT_LEAVING_WATER, /*!< Reheat leaving water */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_RETURN_AIR, /*!< Return air */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SECONDARY_CHILLED_WATER_RETURN, /*!< Secondary chilled water return */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SECONDARY_CHILLED_WATER_SUPPLY, /*!< Secondary chilled water supply */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SECONDARY_HW_RETURN, /*!< Secondary hw return */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SECONDARY_HW_SUPPLY, /*!< Secondary hw supply */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SIDELOOP_RESET, /*!< Sideloop reset */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SIDELOOP_SETPOINT, /*!< Sideloop setpoint */
|
||||
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SIDELOOP, /*!< Sideloop */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SOURCE, /*!< Source */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SUPPLY_AIR, /*!< Supply air */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_SUPPLY_LOW_LIMIT, /*!< Supply low limit */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_TOWER_BASIN, /*!< Tower basin */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_TWO_PIPE_LEAVING_WATER, /*!< Two pipe leaving water */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_RESERVED, /*!< Reserved */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_ZONE_DEWPOINT, /*!< Zone dewpoint */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_ZONE_SENSOR_SETPOINT, /*!< Zone sensor setpoint */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_ZONE_SENSOR_SETPOINT_OFFSET, /*!< Zone sensor setpoint offset */
|
||||
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_ZONE, /*!< Zone */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_TEMPERATURE_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_TEMPERATURE, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_temperature_in_degrees_celsius_t;
|
||||
|
||||
/** @brief Values for 'Relative Humidity in %' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_DISCHARGE = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_HUMIDITY, 0x0000), /*!< Discharge */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_EXHAUST, /*!< Exhaust */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_HOT_DECK, /*!< Hot deck */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_MIXED_AIR, /*!< Mixed air */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_OUTDOOR_AIR, /*!< Outdoor air */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_RETURN, /*!< Return */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_SIDELOOP, /*!< Sideloop */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_SPACE, /*!< Space */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_ZONE, /*!< Zone */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_HUMIDITY_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_HUMIDITY, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_relative_humidity_in_percent_t;
|
||||
|
||||
/** @brief Values for 'Pressure in Pascal' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_PRESSURE_BOILER_PUMP_DIFFERENTIAL = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_PRESSURE, 0x0000), /*!< Boier pump differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_BUILDING_STATIC, /*!< Building static */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_COLD_DECK_DIFFERENTIAL_SENSOR, /*!< Cold deck differential sensor */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_CHILLED_WATER_BUILDING_DIFFERENTIAL, /*!< Chilled water building differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_COLD_DECK_DIFFERENTIAL, /*!< Cold deck differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_COLD_DECK_STATIC, /*!< Cold deck static */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_CONDENSER_WATER_PUMP_DIFFERENTIAL, /*!< Condenser water pump differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_DISCHARGE_DIFFERENTIAL, /*!< Discharge differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_DISCHARGE_STATIC_1, /*!< Discharge static 1 */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_DISCHARGE_STATIC_2, /*!< Discharge static 2 */
|
||||
|
||||
ESP_ZB_ZCL_AI_PRESSURE_EXHAUST_AIR_DIFFERENTIAL, /*!< Exhaust air differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_EXHAUST_AIR_STATIC, /*!< Exhaust air static */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_EXHAUST_DIFFERENTIAL_0, /*!< Exhaust differential 0. Note: Exhaust differential is duplicated in spec */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_EXHAUST_DIFFERENTIAL_1, /*!< Exhaust differential 1 */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_HOT_DECK_DIFFERENTIAL_0, /*!< Hot deck differential 0. Note: Hot Deck differential is duplicated in spec */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_HOT_DECK_DIFFERENTIAL_1, /*!< Hot deck differential 1 */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_HOT_DECK_STATIC, /*!< Hot deck static */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_HOT_WATER_BLDG_DIFF, /*!< Hot water bldg Diff */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_HEAT_EXCHANGER_STEAM, /*!< Heat exchanger steam */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_MIN_OUTDOOR_AIR_DIFFERENTIAL, /*!< Min outdoor air differential */
|
||||
|
||||
ESP_ZB_ZCL_AI_PRESSURE_OUTDOOR_AIR_DIFFERENTIAL, /*!< Outdoor air differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_PRIMARY_CHILLED_WATER_PUMP_DIFFERENTIAL, /*!< Primary chilled water pump differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_PRIMATY_HOT_WATER_PUMP_DIFFERENTIAL, /*!< Primary hot water pump differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_RELIEF_DIFFERENTIAL, /*!< Relief differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_RETURN_AIR_STATIC, /*!< Return air Static */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_RETURN_DIFFERENTIAL, /*!< Return differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_SECONDARY_CHILLED_WATER_PUMP_DIFFERENTIAL, /*!< Secondary chilled water pump differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_SECONDARY_HOT_WATER_PUMP_DIFFERENTIAL, /*!< Secondary hot water pump differential */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_SIDELOOP, /*!< Sideloop */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_STEAM, /*!< Steam */
|
||||
|
||||
ESP_ZB_ZCL_AI_PRESSURE_SUPPLY_DIFFERENTIAL_SENSOR, /*!< Supply differential sensor */
|
||||
/* 0x0200 to 0xffffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_PRESSURE_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_PRESSURE, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_pressure_in_pascal_t;
|
||||
|
||||
/** @brief Values for 'Flow in Liters per Second' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_FLOW_CHILLED_WATER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_FLOW, 0x0000), /*!< Chilled water */
|
||||
ESP_ZB_ZCL_AI_FLOW_CHILLER_CHILLED_WATER, /*!< Chiller chilled water */
|
||||
ESP_ZB_ZCL_AI_FLOW_CHILLER_CONDENSER_WATER, /*!< Chiller condenser water */
|
||||
ESP_ZB_ZCL_AI_FLOW_COLD_DECK, /*!< Cold deck */
|
||||
ESP_ZB_ZCL_AI_FLOW_DECOUPLE_LOOP, /*!< Decouple loop */
|
||||
ESP_ZB_ZCL_AI_FLOW_DISCHARGE, /*!< Discharge */
|
||||
ESP_ZB_ZCL_AI_FLOW_EXHAUST_FAN, /*!< Exhaust fan */
|
||||
ESP_ZB_ZCL_AI_FLOW_EXHAUST, /*!< Exhaust */
|
||||
ESP_ZB_ZCL_AI_FLOW_FAN, /*!< Fan */
|
||||
ESP_ZB_ZCL_AI_FLOW_HOT_DECK, /*!< Flow hot deck */
|
||||
|
||||
ESP_ZB_ZCL_AI_FLOW_HOT_WATER, /*!< Hot water */
|
||||
ESP_ZB_ZCL_AI_FLOW_MIN_OUTDOOR_AIR_FAN, /*!< Min outdoor air fan */
|
||||
ESP_ZB_ZCL_AI_FLOW_MIN_OUTDOOR_AIR, /*!< Min outdoor Air */
|
||||
ESP_ZB_ZCL_AI_FLOW_OUTDOOR_AIR, /*!< Outdoor air */
|
||||
ESP_ZB_ZCL_AI_FLOW_PRIMARY_CHILLED_WATER, /*!< Primary chilled water */
|
||||
ESP_ZB_ZCL_AI_FLOW_RELIEF_FAN, /*!< Relief fan */
|
||||
ESP_ZB_ZCL_AI_FLOW_RELIEF, /*!< Relief */
|
||||
ESP_ZB_ZCL_AI_FLOW_RETURN_FAN, /*!< Return fan */
|
||||
ESP_ZB_ZCL_AI_FLOW_RETURN, /*!< Return */
|
||||
ESP_ZB_ZCL_AI_FLOW_SECONDARY_CHILLED_WATER_FLOW, /*!< Secondary chilled water flow */
|
||||
|
||||
ESP_ZB_ZCL_AI_FLOW_SUPPLY_FAN, /*!< Supply fan */
|
||||
ESP_ZB_ZCL_AI_FLOW_TOWER_FAN, /*!< Tower fan */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_FLOW_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_FLOW, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_flow_in_liters_per_second_t;
|
||||
|
||||
/** @brief Values for 'Percentage %' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_PERCENTAGE_CHILLER_FULL_LOAD_AMPERAGE = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_PERCENTAGE, 0x0000), /*!< Chiller full load amperage */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_PERCENTAGE_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_PERCENTAGE, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_percentage_t;
|
||||
|
||||
/** @brief Values for 'Parts per Million PPM' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_PPM_RETURN_CARBON_DIOXIDE = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_PPM, 0x0000), /*!< Return carbon dioxide */
|
||||
ESP_ZB_ZCL_AI_PPM_ZONE_CARBON_DIOXIDE, /*!< Zone carbon dioxide */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_PPM_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_PPM, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_ppm_t;
|
||||
|
||||
/** @brief Values for 'Rotational Speed in RPM' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_RPM_EXHAUS_FAN_REMOTE = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_RPM, 0x0000), /*!< Exhaust fan remote */
|
||||
ESP_ZB_ZCL_AI_RPM_HEAT_RECOVERY_WHEEL_REMOTE, /*!< Heat recovery wheel remote */
|
||||
ESP_ZB_ZCL_AI_RPM_MIN_OUTDOOR_AIR_FAN_REMOTE, /*!< Min outdoor air fan remote */
|
||||
ESP_ZB_ZCL_AI_RPM_RELIEF_FAN_REMOTE, /*!< Relief fan remote */
|
||||
ESP_ZB_ZCL_AI_RPM_RETURN_FAN_REMOTE, /*!< Return fan remote */
|
||||
ESP_ZB_ZCL_AI_RPM_SUPPLY_FAN_REMOTE, /*!< Supply fan remote */
|
||||
ESP_ZB_ZCL_AI_RPM_VARIABLE_SPEED_DRIVE_MOTOR, /*!< Variable speed drive motor */
|
||||
ESP_ZB_ZCL_AI_RPM_VARIABLE_SPEED_DRIVE_SETPOINT, /*!< Variable speed drive setpoint */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_RPM_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_RPM, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_rpm_t;
|
||||
|
||||
/** @brief Values for 'Current in Amps' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_CURRENT_CHILLER_AMPS = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_CURRENT_IN_AMPS, 0x0000), /*!< Chiller amps */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_CURRENT_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_CURRENT_IN_AMPS, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_current_t;
|
||||
|
||||
/** @brief Values for 'Frequency in Hz' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_FREQUENCY_VARIABLE_SPEED_DRIVE_OUTPUT = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_FREQUENCY, 0x0000), /*!< Variable speed drive output */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_FREQUENCY_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_FREQUENCY, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_frequency_t;
|
||||
|
||||
/** @brief Values for 'Power in Watts' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_POWER_IN_WATTS_CONSUMPTION = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_POWER_IN_WATTS, 0x0000), /*!< Consumption */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_POWER_IN_WATTS_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_POWER_IN_WATTS, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_power_in_watts_t;
|
||||
|
||||
/** @brief Values for 'Power in kW' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_POWER_IN_KILOWATTS_ABSOLUTE = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_POWER_IN_KILOWATTS, 0x0000), /*!< Absolute */
|
||||
ESP_ZB_ZCL_AI_POWER_IN_KILOWATTS_CONSUMPTION, /*!< Consumption */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_POWER_IN_KILOWATTS_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_POWER_IN_KILOWATTS, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_power_in_kilowatts_t;
|
||||
|
||||
/** @brief Values for 'Energy in kWH' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_ENERGY_KWH_VARIABLE_SPEED_DRIVE = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_ENERGY, 0x0000), /*!< Variable speed drive */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_ENERGY_KWH_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_ENERGY, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_energy_kwh_t;
|
||||
|
||||
/** @brief Values for 'Count - Unitless' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_COUNT_UNITLESS_COUNT = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_COUNT_UNITLESS, 0x0000), /*!< Count */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_COUNT_UNITLESS_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_COUNT_UNITLESS, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_count_unitless_t;
|
||||
|
||||
/** @brief Values for 'Enthalpy in KJoules per Kg' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_ENTHALPY_OUTDOOR_AIR = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_ENTHALPY, 0x0000), /*!< Out door air */
|
||||
ESP_ZB_ZCL_AI_ENTHALPY_RETURN_AIR, /*!< Return air */
|
||||
ESP_ZB_ZCL_AI_ENTHALPY_SPACE, /*!< Space */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_ENTHALPY_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_ENTHALPY, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_enthaply_t;
|
||||
|
||||
/** @brief Values for 'Time in Seconds' type of Analog Input cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AI_TIME_RELATIVE = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_TIME, 0x0000), /*!< Relative */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AI_TIME_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_TIME, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ai_time_t;
|
||||
|
||||
/** @brief Default value for Description attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_INPUT_DESCRIPTION_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for OutOfService attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_INPUT_OUT_OF_SERVICE_DEFAULT_VALUE false
|
||||
|
||||
/** @brief Default value for Reliability attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_INPUT_RELIABILITY_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief Default value for StatusFlags attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAG_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief StatusFlags attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAGS_MIN_VALUE 0
|
||||
|
||||
/** @brief StatusFlags attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ANALOG_INPUT_STATUS_FLAGS_MAX_VALUE 0x0f
|
||||
|
||||
/** Number of attributes mandatory for reporting in Analog Input cluster */
|
||||
#define ESP_ZB_ZCL_ANALOG_INPUT_REPORT_ATTR_COUNT 2
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Analog Output cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_DESCRIPTION_ID = 0x001c, /*!< Description attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_MAX_PRESENT_VALUE_ID = 0x0041, /*!< MaxPresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_MIN_PRESENT_VALUE_ID = 0x0045, /*!< MinPresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_OUT_OF_SERVICE_ID = 0x0051, /*!< OutOfService attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_PRESENT_VALUE_ID = 0x0055, /*!< PresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_PRIORITY_ARRAY_ID = 0x0057, /*!< PriorityArray attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_RELIABILITY_ID = 0x0067, /*!< Reliability attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_RELINQUISH_DEFAULT_ID = 0x0068, /*!< RelinquishDefault attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_RESOLUTION_ID = 0x006a, /*!< Resolution attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_STATUS_FLAGS_ID = 0x006f, /*!< StatusFlags attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_ENGINEERING_UNITS_ID = 0x0075, /*!< EngineeringUnits attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_APPLICATION_TYPE_ID = 0x0100, /*!< ApplicationType attribute */
|
||||
} esp_zb_zcl_analog_output_attr_t;
|
||||
|
||||
/** @brief Values for StatusFlags attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAG_NORMAL = 0x00, /*!< Normal (default) state */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAG_IN_ALARM = 0x01, /*!< In alarm bit */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAG_FAULT = 0x02, /*!< Fault bit */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAG_OVERRIDDEN = 0x04, /*!< Overridden bit */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAG_OUT_OF_SERVICE = 0x08, /*!< Out of service bit */
|
||||
} esp_zb_zcl_analog_output_status_flags_value_t;
|
||||
|
||||
/** @brief Values for Reliability attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_NO_FAULT_DETECTED = 0x00, /*!< No fault detected */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_NO_SENSOR = 0x01, /*!< No sensor */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_OVER_RANGE = 0x02, /*!< Over range */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_UNDER_RANGE = 0x03, /*!< Under range */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_OPEN_LOOP = 0x04, /*!< Open loop */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_SHORTED_LOOP = 0x05, /*!< Shorted loop */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_NO_OUTPUT = 0x06, /*!< No output */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_UNRELIABLE_OTHER = 0x07, /*!< Unreliable other */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_PROCESS_ERROR = 0x08, /*!< Process error */
|
||||
/* 0x09 is for multistate clusters only */
|
||||
ESP_ZB_ZCL_ANALOG_OUTPUT_RELIABILITY_CONFIGURATION_ERROR = 0x0a, /*!< Configuration error */
|
||||
} esp_zb_zcl_analog_output_reliability_value_t;
|
||||
|
||||
/** Analog Output cluster application types
|
||||
* The ApplicationType attribute indicates the specific application usage
|
||||
* for the cluster. ApplicationType is subdivided into Group, Type and
|
||||
* an Index number, as follows:
|
||||
*
|
||||
* Group = Bits 24 to 31
|
||||
* An indication of the cluster this attribute is part of. Analog Output
|
||||
* clusters have Group = 0x01.
|
||||
*
|
||||
* Type = Bits 16 to 23
|
||||
* The physical quantity that the PresentValue attribute of the cluster
|
||||
* represents.
|
||||
*
|
||||
* Index = Bits 0 to 15
|
||||
* The specific application usage of the cluster.
|
||||
*/
|
||||
|
||||
#define ESP_ZB_ZCL_AO_GROUP_ID 0x01
|
||||
#define ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(_type, _id) (((_type & 0xff) << 16) | (_id & 0xffff))
|
||||
|
||||
/** @brief Values for Analog Input cluster applications type */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_TEMPERATURE, /*!< Temperature */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_HUMIDITY, /*!< Humidity */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_PRESSURE, /*!< Pressure */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_FLOW, /*!< Flow */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_PERCENTAGE, /*!< Percentage */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_PPM, /*!< Ppm */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_RPM, /*!< Rpm */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_CURRENT_IN_AMPS, /*!< Current in amps */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_FREQUENCY, /*!< Frequency */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_POWER_IN_WATTS, /*!< Power in watts */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_POWER_IN_KILOWATTS, /*!< Power in kilowatts */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_ENERGY, /*!< Energy */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_COUNT_UNITLESS, /*!< Count unitless */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_ENTHALPY, /*!< Enthalpy */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_TIME, /*!< Time */
|
||||
/* Types 0x0f to 0xfe are reserved */
|
||||
ESP_ZB_ZCL_AO_APP_TYPE_OTHER = 0xff, /*!< Other */
|
||||
} esp_zb_zcl_ao_application_types_t;
|
||||
|
||||
/** @brief Values for 'Temperature in degrees Celsius' type of Analog Output cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_BOILER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_TEMPERATURE, 0x0000), /*!< Boiler */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_BOILER_SETPOINT, /*!< Boiler setpoint */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_COLD_DECK, /*!< Cold deck */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_CHILLER_SETPOINT_0, /*!< Chiller setpoint 0. Note: Chiller Setpoint is duplicated in spec */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_CHILLER_SETPOINT_1, /*!< Chiller setpoint 1 */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_HOT_DECK, /*!< Hot deck */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_COOLING_VALVE, /*!< Cooling valve */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_ZONE_TEMPERATURE_SETPOINT, /*!< Zone temperature setpoint */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_SETPOINT_OFFSET, /*!< Setpoint offset */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_SETPOINT_SHIFT, /*!< Setpoint shift */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AO_TEMPERATURE_OTHER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_TEMPERATURE, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ao_temperature_in_degrees_celsius_t;
|
||||
|
||||
/** @brief Values for 'Relative Humidity in %' type of Analog Output cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AO_HUMIDITY_HUMIDIFICATION = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_HUMIDITY, 0x0000), /*!< Humidification */
|
||||
ESP_ZB_ZCL_AO_HUMIDITY_ZONE_RELATIVE_HUMIDITY, /*!< Zone relative humidity */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AO_HUMIDITY_OTHER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_HUMIDITY, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ao_relative_humidity_in_percent_t;
|
||||
|
||||
/** @brief Values for 'Percentage %' type of Analog Output cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_FACE_BYPASS_DAMPER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_PERCENTAGE, 0x0000), /*!< Face bypass damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HEAT_RECOVERY_VALVE, /*!< Heat recovery valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HEAT_RECOVERY_WHELL, /*!< Heat recovery whell */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HEATING_VALVE, /*!< Heating valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HOT_DECK_DAMPER, /*!< Hot deck damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_2_PIPE_DAMPER, /*!< 2 pipe damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_2_PIPE_VALVE, /*!< 2 pipe valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_BOILER_MIXING_VALVE, /*!< Boiler mixing valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_BOX_COOLING_VALVE, /*!< Box cooling valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_BOX_HEATING_VALVE, /*!< Box heating valve */
|
||||
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_CHILLED_WATER_BYPASS_VALVE, /*!< Chilled water bypass valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_COLD_DECK_DAMPER, /*!< Cold deck damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_COOLING_DAMPER, /*!< Cooling damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_COOLING_VALVE, /*!< Cooling valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_DAMPER, /*!< Damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_EXHAUST_AIR_DAMPER, /*!< Exhaust air damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_EXHAUST_DAMPER, /*!< Exhaust damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HOT_WATER_BYPASS_VALVE, /*!< Hot water bypass valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HOT_WATER_MIXING_VALVE, /*!< Hot water mixing valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_MINIMUM_OUTSIDE_AIR_DAMPER, /*!< Minimum outside air damper */
|
||||
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_MINIMUM_OUTSIDE_AIR_FAN, /*!< Minimum outside air fan */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_MIXED_AIR_DAMPER, /*!< Mixed air damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_MIXING_VALVE, /*!< Mixing valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_OUTSIDE_AIR_DAMPER, /*!< Ourside air damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_PRIMARY_CHILLED_WATER_PUMP, /*!< Primary chilled water pump */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_PRIMARY_HOT_WATER_PUMP, /*!< Primary hot water pump */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_PRIMARY_HEAT_EXCHANGE_PUMP, /*!< Primary heat exchange pump */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_PREHEAT_DAMPER, /*!< Preheat damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_PREHEAT_VALVE, /*!< Preheat valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_REHEAT_VALVE_0, /*!< Reheat valve 0. Note: Reheat valve is duplicated in spec */
|
||||
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_REHEAT_VALVE_1, /*!< Reheat valve 1 */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_RETURN_AIR_DAMPER, /*!< Return air damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_SECONDARY_CHILLED_WATER_PUMP, /*!< Secondary chilled water pump */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_SEQUENCED_VALVE, /*!< Sequenced valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_SECONDARY_HOT_WATER_PUMP, /*!< Secondary hot water pump */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_SECONDARY_HEAT_EXCHANGE_PUMP, /*!< Secondary heat exchange pump */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_SIDELOOP, /*!< Sideloop */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_SUPPLY_HEATING_VALVE, /*!< Supply heating valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_SUPPLY_DAMPER, /*!< Supply damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_TOWER_BYPASS_VALVE, /*!< Tower bypass valve */
|
||||
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_TOWER_FAN, /*!< Tower fan */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_VALVE, /*!< Value */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_ZONE_1_DAMPER, /*!< Zone 1 damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_ZONE_1_HEATING_VALVE, /*!< Zone 1 heating valve */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HEAT_RECOVERY_EXHAUST_BYPASS_DAMPER, /*!< Heat recovery exhaust bypass damper */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_HEAT_RECOVERY_OUTSIDE_AIR_BYPASS_DAMPER, /*!< Heat recovery outside air bypass damper */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AO_PERCENTAGE_OTHER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_PERCENTAGE, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ao_percentage_t;
|
||||
|
||||
/** @brief Values for 'Parts per Million PPM' type of Analog Output cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AO_PPM_SPACE_CARBON_DIOXIDE_LIMIT = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_PPM, 0x0000), /*!< Space carbon dioxide limit */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AO_PPM_OTHER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_PPM, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ao_ppm_t;
|
||||
|
||||
/** @brief Values for 'Rotational Speed in RPM' type of Analog Output cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AO_RPM_EXHAUST_FAN_SPEED = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_RPM, 0x0000), /*!< Exhaust fan speed */
|
||||
ESP_ZB_ZCL_AO_RPM_FAN_SPEED, /*!< Fan speed */
|
||||
ESP_ZB_ZCL_AO_RPM_RELIEF_FAN_SPEED, /*!< Relief fan speed */
|
||||
ESP_ZB_ZCL_AO_RPM_RETURN_FAN_SPEED, /*!< Return fan speed */
|
||||
ESP_ZB_ZCL_AO_RPM_SUPPLY_FAN_SPEED, /*!< Supply fan speed */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AO_RPM_OTHER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_RPM, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ao_rpm_t;
|
||||
|
||||
/** @brief Values for 'Time in Seconds' type of Analog Output cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AO_TIME_RELATIVE = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_TIME, 0x0000), /*!< Relative */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AO_TIME_OTHER = ESP_ZB_ZCL_AO_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AO_APP_TYPE_TIME, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_ao_time_t;
|
||||
|
||||
/** @brief Default value for Description attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_OUTPUT_DESCRIPTION_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for OutOfService attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_OUTPUT_OUT_OF_SERVICE_DEFAULT_VALUE false
|
||||
|
||||
/** @brief Default value for StatusFlags attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAG_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief StatusFlags attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAGS_MIN_VALUE 0
|
||||
|
||||
/** @brief StatusFlags attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ANALOG_OUTPUT_STATUS_FLAGS_MAX_VALUE 0x0f
|
||||
|
||||
/** Number of attributes mandatory for reporting in Analog Output cluster */
|
||||
#define ESP_ZB_ZCL_ANALOG_OUTPUT_REPORT_ATTR_COUNT 2
|
||||
|
||||
void esp_zb_zcl_analog_output_init_server(void);
|
||||
void esp_zb_zcl_analog_output_init_client(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_ANALOG_OUTPUT_SERVER_ROLE_INIT esp_zb_zcl_analog_output_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_ANALOG_OUTPUT_CLIENT_ROLE_INIT esp_zb_zcl_analog_output_init_client
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Analog Value cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_DESCRIPTION_ID = 0x001c, /*!< Description attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_OUT_OF_SERVICE_ID = 0x0051, /*!< OutOfService attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_PRESENT_VALUE_ID = 0x0055, /*!< PresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_PRIORITY_ARRAY_ID = 0x0057, /*!< PriorityArray attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_RELIABILITY_ID = 0x0067, /*!< Reliability attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_RELINQUISH_DEFAULT_ID = 0x0068, /*!< RelinquishDefault attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_STATUS_FLAGS_ID = 0x006f, /*!< StatusFlags attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_ENGINEERING_UNITS_ID = 0x0075, /*!< EngineeringUnits attribute */
|
||||
ESP_ZB_ZCL_ATTR_ANALOG_VALUE_APPLICATION_TYPE_ID = 0x0100, /*!< ApplicationType attribute */
|
||||
} esp_zb_zcl_analog_value_attr_t;
|
||||
|
||||
/** @brief Values for StatusFlags attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAG_NORMAL = 0x00, /*!< Normal (default) state. */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAG_IN_ALARM = 0x01, /*!< In alarm bit. */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAG_FAULT = 0x02, /*!< Fault bit. */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAG_OVERRIDDEN = 0x04, /*!< Overridden bit. */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAG_OUT_OF_SERVICE = 0x08, /*!< Out of service bit. */
|
||||
} esp_zb_zcl_analog_value_status_flags_value_t;
|
||||
|
||||
/** @brief Values for Reliability attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_NO_FAULT_DETECTED = 0x00, /*!< No fault detected */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_NO_SENSOR = 0x01, /*!< No sensor */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_OVER_RANGE = 0x02, /*!< Over range */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_UNDER_RANGE = 0x03, /*!< Under range */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_OPEN_LOOP = 0x04, /*!< Open loop */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_SHORTED_LOOP = 0x05, /*!< Shorted loop */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_NO_OUTPUT = 0x06, /*!< No output */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_UNRELIABLE_OTHER = 0x07, /*!< Unreliable other */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_PROCESS_ERROR = 0x08, /*!< Process error */
|
||||
/* 0x09 is for multistate clusters only */
|
||||
ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_CONFIGURATION_ERROR = 0x0a, /*!< Configuration error */
|
||||
} esp_zb_zcl_analog_value_reliability_value_t;
|
||||
|
||||
/** Analog Value cluster application types
|
||||
* The ApplicationType attribute indicates the specific application usage
|
||||
* for the cluster. ApplicationType is subdivided into Group, Type and
|
||||
* an Index number, as follows:
|
||||
*
|
||||
* - Group = Bits 24 to 31
|
||||
* An indication of the cluster this attribute is part of. Analog Value
|
||||
* clusters have Group = 0x02.
|
||||
*
|
||||
* - Type = Bits 16 to 23
|
||||
* The physical quantity that the PresentValue attribute of the cluster
|
||||
* represents.
|
||||
*
|
||||
* - Index = Bits 0 to 15
|
||||
* The specific application usage of the cluster.
|
||||
*/
|
||||
|
||||
#define ESP_ZB_ZCL_AV_GROUP_ID 0x02
|
||||
#define ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(_type, _id) ((ESP_ZB_ZCL_AV_GROUP_ID << 24) | ((_type & 0xff) << 16) | (_id & 0xffff))
|
||||
|
||||
/** @brief Values for Analog Value cluster applications type */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AV_APP_TYPE_TEMPERATURE = 0x00, /*!< Temperature */
|
||||
ESP_ZB_ZCL_AV_APP_TYPE_AREA = 0x01, /*!< Area */
|
||||
ESP_ZB_ZCL_AV_APP_TYPE_MULTIPLIER = 0x02, /*!< Multiplier */
|
||||
ESP_ZB_ZCL_AV_APP_TYPE_FLOW = 0x03, /*!< Flow */
|
||||
ESP_ZB_ZCL_AV_APP_TYPE_OTHER = 0xff, /*!< Other */
|
||||
} esp_zb_zcl_av_application_types_t;
|
||||
|
||||
/** @brief Values for 'Temperature in degrees Celsius' type of Analog Value cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_SETPOINT_OFFSET_0 = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_TEMPERATURE, 0x0000), /*!< Setpoint Offset */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_TEMP_DEADBAND, /*!< Temp deadband */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_OCCUPIED_HEATING_SETPOINT, /*!< Occupied heating setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_UNOCCUPIED_HEATING_SETPOINT, /*!< Unoccupied heating setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_OCCUPIED_COOLING_SETPOINT, /*!< Occupied cooling setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_UNOCCUPIED_COOLING_SETPOINT, /*!< Unoccupied cooling setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_STANDBY_HEAT_SETPOINT, /*!< Standby heat setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_STANDBY_COOLING_SETPOINT, /*!< Standby cooling setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_EFFECTIVE_OCCUPIED_HEATING_SETPOINT, /*!< Effective occupied heating setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_EFFECTIVE_UNOCCUPIED_HEATING_SETPOINT, /*!< Effective unoccupied heating setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_EFFECTIVE_OCCUPIED_COOLING_SETPOINT, /*!< Effective occupied cooling setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_EFFECTIVE_UNOCCUPIED_COOLING_SETPOINT, /*!< Effective unoccupied cooling setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_EFFECTIVE_STANDBY_HEAT_SETPOINT, /*!< Effective standby heat setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_EFFECTIVE_STANDBY_COOLING_SETPOINT, /*!< Effective standby cooling setpoint */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_SETPOINT_OFFSET_2, /*!< Setpoint offset 2 */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_SETPOINT_SHIFT, /*!< Setpoint shift */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AV_TEMPERATURE_OTHER = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_TEMPERATURE, 0xffff), /*!< Other*/
|
||||
} esp_zb_zcl_av_temperature_in_degrees_celsius_t;
|
||||
|
||||
/** @brief Values for 'Area in Square Metres' type of Analog Value cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AV_AREA_DUCT_AREA = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_AREA, 0x0000), /*!< Duct Area */
|
||||
/* 0x0200 to 0xffffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AV_AREA_OTHER = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_AREA, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_av_area_in_squares_meters_t;
|
||||
|
||||
/** @brief Values for 'Multiplier - Number' type of Analog Value cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AV_MULTIPLIER_DUCT_MULTIPLIER = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_MULTIPLIER, 0x0000), /*!< Duct Area */
|
||||
/* 0x0200 to 0xffffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AV_MULTIPLIER_OTHER = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_MULTIPLIER, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_av_multiplier_number_t;
|
||||
|
||||
/** @brief Values for 'Flow in Litres per Second' type of Analog Value cluster */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_AV_FLOW_MINIMUM_AIR_FLOW = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_FLOW, 0x0000), /*!< Minimum Air Flow */
|
||||
ESP_ZB_ZCL_AV_FLOW_MAXIMUM_AIR_FLOW, /*!< Maximum Air Flow */
|
||||
ESP_ZB_ZCL_AV_FLOW_HEATING_MINIMUM_AIR_FLOW, /*!< Heating Minimum Air Flow */
|
||||
ESP_ZB_ZCL_AV_FLOW_HEATING_MAXIMUM_AIR_FLOW, /*!< Heating Maximum Air Flow */
|
||||
ESP_ZB_ZCL_AV_FLOW_STANDBY_MINIMUM_AIR_FLOW, /*!< Standby Minimum Air Flow */
|
||||
ESP_ZB_ZCL_AV_FLOW_STANDBY_MAXIMUM_AIR_FLOW, /*!< Standby Maximum Air Flow */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_AV_FLOW_OTHER = ESP_ZB_ZCL_AV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AV_APP_TYPE_FLOW, 0xffff), /*!< Other */
|
||||
} esp_zb_zcl_av_flow_in_liters_per_second_t;
|
||||
|
||||
/** @brief Default value for Description attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_VALUE_DESCRIPTION_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for OutOfService attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_VALUE_OUT_OF_SERVICE_DEFAULT_VALUE false
|
||||
|
||||
/** @brief Default value for Reliability attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_VALUE_RELIABILITY_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief Default value for StatusFlags attribute */
|
||||
#define ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAGS_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief StatusFlags attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAGS_MIN_VALUE 0
|
||||
|
||||
/** @brief StatusFlags attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ANALOG_VALUE_STATUS_FLAGS_MAX_VALUE 0x0f
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Basic cluster information attribute set identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID = 0x0000, /*!<ZCL version attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID = 0x0001, /*!< Application version attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID = 0x0002, /*!< Stack version attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_HW_VERSION_ID = 0x0003, /*!< Hardware version attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID = 0x0004, /*!< Manufacturer name attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID = 0x0005, /*!< Model identifier attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_DATE_CODE_ID = 0x0006, /*!< Date code attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID = 0x0007, /*!< Power source attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_GENERIC_DEVICE_CLASS_ID = 0x0008, /*!< The GenericDeviceClass attribute defines the field of application of the GenericDeviceType attribute. */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_GENERIC_DEVICE_TYPE_ID = 0x0009, /*!< The GenericDeviceType attribute allows an application to show an icon on a rich user interface (e.g. smartphone app). */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_PRODUCT_CODE_ID = 0x000a, /*!< The ProductCode attribute allows an application to specify a code for the product. */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_PRODUCT_URL_ID = 0x000b, /*!< The ProductURL attribute specifies a link to a web page containing specific product information. */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_VERSION_DETAILS_ID = 0x000c, /*!< Vendor specific human readable (displayable) string representing the versions of one of more program images supported on the device. */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_SERIAL_NUMBER_ID = 0x000d, /*!< Vendor specific human readable (displayable) serial number. */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_PRODUCT_LABEL_ID = 0x000e, /*!< Vendor specific human readable (displayable) product label. */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_LOCATION_DESCRIPTION_ID = 0x0010, /*!< Location description attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_PHYSICAL_ENVIRONMENT_ID = 0x0011, /*!< Physical environment attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID = 0x0012, /*!< Device enabled attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_ALARM_MASK_ID = 0x0013, /*!< Alarm mask attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_DISABLE_LOCAL_CONFIG_ID = 0x0014, /*!< Disable local config attribute */
|
||||
ESP_ZB_ZCL_ATTR_BASIC_SW_BUILD_ID = 0x4000 /*!< Manufacturer-specific reference to the version of the software. */
|
||||
} esp_zb_zcl_basic_attr_t;
|
||||
|
||||
/** @brief Default value for ZCL version attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE ((uint8_t)0x08)
|
||||
|
||||
/** @brief Default value for Application version attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_APPLICATION_VERSION_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for Stack version attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_STACK_VERSION_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for Hardware version attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_HW_VERSION_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for Manufacturer name attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_MANUFACTURER_NAME_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for Model identifier attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_MODEL_IDENTIFIER_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for Date code attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_DATE_CODE_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for Power source attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for GenericDeviceClass attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_GENERIC_DEVICE_CLASS_DEFAULT_VALUE ((uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for GenericDeviceType attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_GENERIC_DEVICE_TYPE_DEFAULT_VALUE ((uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for ProductCode attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_PRODUCT_CODE_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for ProductURL attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_PRODUCT_URL_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for ManufacturerVersionDetails attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_MANUFACTURER_VERSION_DETAILS_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for SerialNumber attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_SERIAL_NUMBER_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for ProductLabel attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_PRODUCT_LABEL_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for location description attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_LOCATION_DESCRIPTION_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for Physical environment attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_PHYSICAL_ENVIRONMENT_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for Device enabled attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_DEVICE_ENABLED_DEFAULT_VALUE ((bool)0x01)
|
||||
|
||||
/** @brief Default value for Alarm mask attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_ALARM_MASK_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for Disable local config attribute */
|
||||
#define ESP_ZB_ZCL_BASIC_DISABLE_LOCAL_CONFIG_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/**
|
||||
* @brief Default value for SWBuildId attribute.
|
||||
* @note Default value supposes that attribute will be stored as Pascal-style string (i. e.
|
||||
* length-byte, then content).
|
||||
*/
|
||||
#define ESP_ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
|
||||
/*! @brief Basic cluster command identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_BASIC_RESET_ID = 0x00 /*!< "Reset to Factory Defaults" command. */
|
||||
} esp_zb_zcl_basic_cmd_id_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Binary Input cluster attribute identifiers.
|
||||
*/
|
||||
typedef enum {
|
||||
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_ACTIVE_TEXT_ID = 0x0004, /*!< This attribute holds a human readable description of the ACTIVE state of a binary PresentValue. */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_DESCRIPTION_ID = 0x001C, /*!< The description of the usage of the input, output or value, as appropriate to the cluster. */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_INACTIVE_TEXT_ID = 0x002E, /*!< This attribute holds a human readable description of the INACTIVE state of a binary PresentValue. */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_OUT_OF_SERVICE_ID = 0x0051, /*!< OutOfService attribute */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_POLARITY_ID = 0x0054, /*!< This attribute indicates the relationship between the physical state of the input (or output as appropriate for the cluster) and the logical state represented by a binary PresentValue attribute, when OutOfService is FALSE. */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_PRESENT_VALUE_ID = 0x0055, /*!< PresentValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_RELIABILITY_ID = 0x0067, /*!< The attribute indicates whether the PresentValue or the operation of the physical input, output or value in question (as appropriate for the cluster) is reliable. */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_STATUS_FLAG_ID = 0x006F, /*!< StatusFlag attribute */
|
||||
ESP_ZB_ZCL_ATTR_BINARY_INPUT_APPLICATION_TYPE_ID = 0x0100, /*!< The attribute indicates the specific application usage for this cluster. */
|
||||
} esp_zb_zcl_binary_input_attr_t;
|
||||
|
||||
/** @brief Default value for ActiveText attribute */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_ACTIVE_TEXT_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for Description attribute */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_DESCRIPTION_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief Default value for InactiveText attribute */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_INACTIVE_TEXT_DEFAULT_VALUE {0}
|
||||
|
||||
/** @brief OutOfService attribute default value */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_OUT_OF_SERVICE_DEFAULT_VALUE false
|
||||
|
||||
/** @brief Default value for Polarity attribute */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_POLARITY_DEFAULT_VALUE ((uint8_t)0)
|
||||
|
||||
/** @brief Default value for Reliability attribute */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_RELIABILITY_DEFAULT_VALUE ((uint8_t)0)
|
||||
|
||||
/** @brief StatusFlag attribute default value */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_STATUS_FLAG_DEFAULT_VALUE ESP_ZB_ZCL_BINARY_INPUT_STATUS_FLAG_MIN_VALUE
|
||||
|
||||
/** @brief StatusFlag attribute minimum value */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_STATUS_FLAG_MIN_VALUE 0
|
||||
|
||||
/** @brief StatusFlag attribute maximum value */
|
||||
#define ESP_ZB_ZCL_BINARY_INPUT_STATUS_FLAG_MAX_VALUE 0x0F
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Carbon Dioxide Measurement cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_CARBON_DIOXIDE_MEASUREMENT_MEASURED_VALUE_ID = 0x0000, /*!< MeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_CARBON_DIOXIDE_MEASUREMENT_MIN_MEASURED_VALUE_ID = 0x0001, /*!< MinMeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_CARBON_DIOXIDE_MEASUREMENT_MAX_MEASURED_VALUE_ID = 0x0002, /*!< MaxMeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_CARBON_DIOXIDE_MEASUREMENT_TOLERANCE_ID = 0x0003, /*!< Tolerance attribute */
|
||||
} esp_zb_zcl_carbon_dioxide_measurement_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM (0.0)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM (1.0)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM (0.0)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM (1.0)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_CARBON_DIOXIDE_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
void esp_zb_zcl_carbon_dioxide_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_CARBON_DIOXIDE_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_carbon_dioxide_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_CARBON_DIOXIDE_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/**
|
||||
* @brief Color control attribute list
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_HUE_ID = 0x0000, /*!< Current_HUE attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_SATURATION_ID = 0x0001, /*!< Current Saturation attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_REMAINING_TIME_ID = 0x0002, /*!< Remaining Time attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_X_ID = 0x0003, /*!< CurrentX attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_Y_ID = 0x0004, /*!< CurrentY attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_DRIFT_COMPENSATION_ID = 0x0005, /*!< The DriftCompensation attribute indicates what mechanism */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COMPENSATION_TEXT_ID = 0x0006, /*!< The CompensationText attribute holds a textual indication of what mechanism */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_TEMPERATURE_ID = 0x0007, /*!< Color Temperature Mireds attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_MODE_ID = 0x0008, /*!< Color Mode attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_OPTIONS_ID = 0x000f, /*!< The Options attribute is a bitmap that determines the default behavior of some cluster commands. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_ENHANCED_CURRENT_HUE_ID = 0x4000, /*!< The EnhancedCurrentHue attribute represents non-equidistant steps along the CIE 1931 color triangle. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_ENHANCED_COLOR_MODE_ID = 0x4001, /*!< The EnhancedColorMode attribute specifies which attributes are currently determining the color of the device. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_ACTIVE_ID = 0x4002, /*!< The ColorLoopActive attribute specifies the current active status of the color loop. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_DIRECTION_ID = 0x4003, /*!< The ColorLoopDirection attribute specifies the current direction of the color loop. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_TIME_ID = 0x4004, /*!< The ColorLoopTime attribute specifies the number of seconds it SHALL take to perform a full color loop. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE_ID = 0x4005, /*!< The ColorLoopStartEnhancedHue attribute specifies the value of the EnhancedCurrentHue attribute from which the color loop SHALL be started. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE_ID = 0x4006, /*!< The ColorLoopStoredEnhancedHue attribute specifies the value of the EnhancedCurrentHue attribute before the color loop was stored. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_CAPABILITIES_ID = 0x400a, /*!< The ColorCapabilities attribute specifies the color capabilities of the device */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN_MIREDS_ID = 0x400b, /*!< The ColorTempPhysicalMinMireds attribute indicates the minimum mired value supported by the hardware. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX_MIREDS_ID = 0x400c, /*!< The ColorTempPhysicalMaxMireds attribute indicates the maximum mired value supported by the hardware. */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_COUPLE_COLOR_TEMP_TO_LEVEL_MIN_MIREDS_ID = 0x400d, /*!< The CoupleColorTempToLevelMinMireds attribute specifies a lower bound on the value of the ColorTemperatureMireds attribute */
|
||||
ESP_ZB_ZCL_ATTR_COLOR_CONTROL_START_UP_COLOR_TEMPERATURE_MIREDS_ID = 0x4010, /*!< The StartUpColorTemperatureMireds attribute SHALL define the desired startup color temperature value a lamp SHALL use when it is supplied with power. */
|
||||
} esp_zb_zcl_color_control_attr_t;
|
||||
|
||||
|
||||
/** @brief Default value for CurrentHue attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_CURRENT_HUE_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for CurrentSaturation attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_CURRENT_SATURATION_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for RemainingTime attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_REMAINING_TIME_DEFAULT_VALUE ((uint16_t)0x00)
|
||||
|
||||
/** @brief Current X attribute default value */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_CURRENT_X_DEF_VALUE 0x616b
|
||||
|
||||
/** @brief Current Y attribute default value */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_CURRENT_Y_DEF_VALUE 0x607d
|
||||
|
||||
/** @brief Color Temperature default value (4000K) */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_TEMPERATURE_DEF_VALUE 0x00fa
|
||||
|
||||
/** @brief Default value for ColorMode attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_MODE_DEFAULT_VALUE ((uint8_t)0x01)
|
||||
|
||||
/** @brief Default value for Options attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_OPTIONS_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for EnhancedCurrentHue attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_ENHANCED_CURRENT_HUE_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for EnhancedColorMode attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_ENHANCED_COLOR_MODE_DEFAULT_VALUE ((uint8_t)0x01)
|
||||
|
||||
/** @brief Default value for ColorLoopActive attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_ACTIVE_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for ColorLoopDirection attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_DIRECTION_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Color Loop Time attribute default value */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_TIME_DEF_VALUE 0x0019
|
||||
|
||||
/** @brief Color Loop Start Enhanced Hue attribute default value */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_START_DEF_VALUE 0x2300
|
||||
|
||||
/** @brief Default value for ColorLoopStoredEnhancedHue attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
/** @brief Default value for ColorCapabilities attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_CAPABILITIES_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for ColorTempPhysicalMinMireds attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN_MIREDS_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for ColorTempPhysicalMaxMireds attribute */
|
||||
#define ESP_ZB_ZCL_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX_MIREDS_DEFAULT_VALUE ((uint16_t)0xFEFF)
|
||||
|
||||
/** @brief Color control cluster command identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_HUE = 0x00, /*!< Move To Hue command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_HUE = 0x01, /*!< Move Hue command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_STEP_HUE = 0x02, /*!< Step Hue command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_SATURATION = 0x03, /*!< Move To Saturation command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_SATURATION = 0x04, /*!< Move Saturation command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_STEP_SATURATION = 0x05, /*!< Step Saturation command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_HUE_SATURATION = 0x06, /*!< Move To Hue and Saturation command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_COLOR = 0x07, /*!< Move To Color command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_COLOR = 0x08, /*!< Move Color command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_STEP_COLOR = 0x09, /*!< Step Color command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_COLOR_TEMPERATURE = 0x0a, /*!< Move to color temperature command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_ENHANCED_MOVE_TO_HUE = 0x40, /*!< Enhanced move to hue command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_ENHANCED_MOVE_HUE = 0x41, /*!< Enhanced move hue command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_ENHANCED_STEP_HUE = 0x42, /*!< Enhanced step hue command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_ENHANCED_MOVE_TO_HUE_SATURATION = 0x43, /*!< Enhanced move to hue and saturation command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_COLOR_LOOP_SET = 0x44, /*!< Color loop set command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_STOP_MOVE_STEP = 0x47, /*!< Stop move step command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_COLOR_TEMPERATURE = 0x4b, /*!< Move color temperature command */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_STEP_COLOR_TEMPERATURE = 0x4c, /*!< Step color temperature command */
|
||||
} esp_zb_zcl_color_control_cmd_id_t;
|
||||
|
||||
/** @brief Direction of Move to Hue defines
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_HUE_SHORTEST = 0x00, /*!< Shortest distance */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_HUE_LONGEST = 0x01, /*!< Longest distance */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_HUE_UP = 0x02, /*!< Up */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_TO_HUE_DOWN = 0x03, /*!< Down */
|
||||
} esp_zb_zcl_color_control_move_to_hue_direction_t;
|
||||
|
||||
/** @brief Direction of Move mode defines.
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_STOP = 0x00, /*!< Stop */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_UP = 0x01, /*!< Up */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_MOVE_DOWN = 0x03, /*!< Down */
|
||||
} esp_zb_zcl_color_control_move_mode_t;
|
||||
|
||||
/** @brief Direction of Step mode defines.
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_STEP_UP = 0x01, /*!< Up */
|
||||
ESP_ZB_ZCL_CMD_COLOR_CONTROL_STEP_DOWN = 0x03, /*!< Down */
|
||||
} esp_zb_zcl_color_control_step_mode_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Commissioning Cluster server attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_SHORT_ADDRESS_ID = 0x0000, /**< ShortAddress Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_EXTENDED_PANID_ID = 0x0001, /**< ExtendedPANId Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_PANID_ID = 0x0002, /**< PANId Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_CHANNEL_MASK_ID = 0x0003, /**< ChannelMask Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_PROTOCOL_VERSION_ID = 0x0004, /**< ProtocolVersion Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_STACK_PROFILE_ID = 0x0005, /**< StackProfile Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_CONTROL_ID = 0x0006, /**< StartupControl Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_TRUST_CENTER_ADDRESS_ID = 0x0010, /**< TrustCenterAddress Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_TRUST_CENTER_MASTER_KEY_ID = 0x0011, /**< TrustCenterMasterKey Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_KEY_ID = 0x0012, /**< NetworkKey Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_USE_INSECURE_JOIN_ID = 0x0013, /**< UseInsecureJoin Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_PRECONFIGURED_LINK_KEY_ID = 0x0014, /**< PreconfiguredLinkKey Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_KEY_SEQ_NUM_ID = 0x0015, /**< NetworkKeySeqNum Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_KEY_TYPE_ID = 0x0016, /**< NetworkKeyType Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_MANAGER_ADDRESS_ID = 0x0017, /**< NetworkManagerAddress Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_SCAN_ATTEMPTS_ID = 0x0020, /**< ScanAttempts Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_TIME_BETWEEN_SCANS_ID = 0x0021, /**< TimeBetweenScans Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_REJOIN_INTERVAL_ID = 0x0022, /**< RejoinInterval Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_MAX_REJOIN_INTERVAL_ID = 0x0023, /**< MaxRejoinInterval Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_INDIRECT_POLL_RATE_ID = 0x0030, /**< IndirectPollRate Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_PARENT_RETRY_THRESHOLD_ID = 0x0031, /**< ParentRetryThreshold Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_CONCENTRATOR_FLAG_ID = 0x0040, /**< ConcentratorFlag Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_CONCENTRATOR_RADIUS_ID = 0x0041, /**< ConcentratorRadius Attribute */
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_CONCENTRATOR_DISCOVERY_TIME_ID = 0x0042, /**< ConcentratorDiscoveryTime Attribute */
|
||||
} esp_zb_zcl_commissioning_srv_attr_t;
|
||||
|
||||
/** @brief Values for valid Startup Control attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_JOINED = 0x00,
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_FORM = 0x01,
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_REJOIN = 0x02,
|
||||
ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_SCRATCH = 0x03,
|
||||
} esp_zb_zcl_commissioning_startup_type_t;
|
||||
|
||||
/** @brief Minimum value for ShortAddress attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_SHORT_ADDRESS_MIN_VALUE ((uint16_t)0x0)
|
||||
|
||||
/** @brief Maximum value for ShortAddress attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_SHORT_ADDRESS_MAX_VALUE ((uint16_t)0xfff7)
|
||||
|
||||
/** @brief Minimum value for ProtocolVersion attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_PROTOCOL_VERSION_MIN_VALUE ((uint8_t)0x2)
|
||||
|
||||
/** @brief Maximum value for ProtocolVersion attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_PROTOCOL_VERSION_MAX_VALUE ((uint8_t)0x2)
|
||||
|
||||
/** @brief Minimum value for StackProfile attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_STACK_PROFILE_MIN_VALUE ((uint8_t)0x1)
|
||||
|
||||
/** @brief Maximum value for StackProfile attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_STACK_PROFILE_MAX_VALUE ((uint8_t)0x2)
|
||||
|
||||
/** @brief Minimum value for StartupControl attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_STARTUP_CONTROL_MIN_VALUE ((uint8_t)0x0)
|
||||
|
||||
/** @brief Maximum value for StartupControl attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_STARTUP_CONTROL_MAX_VALUE ((uint8_t)0x3)
|
||||
|
||||
/** @brief Default value for ExtendedPANId attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_EXTENDED_PANID_DEFAULT_VALUE {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
||||
|
||||
/** @brief Default value for ProtocolVersion attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_PROTOCOL_VERSION_DEFAULT_VALUE ((uint8_t)ZB_PROTOCOL_VERSION)
|
||||
|
||||
/** @brief Default value for StackProfile attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_STACK_PROFILE_DEFAULT_VALUE ((uint8_t)ZB_STACK_PROFILE)
|
||||
|
||||
/** @brief Default value for ProtocolVersion attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_STARTUP_CONTROL_DEFAULT_VALUE ((uint8_t)ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_SCRATCH)
|
||||
|
||||
/** @brief Default value for UseInsecureJoin attribute */
|
||||
#define ESP_ZB_ZCL_COMMISSIONING_USE_INSECURE_JOIN_DEFAULT_VALUE ((bool)0x1)
|
||||
|
||||
/** @brief Commissioning Cluster server command identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_RESTART_DEVICE_RESPONSE_ID = 0x0000, /**< "Restart Device Response" command. */
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_SAVE_STARTUP_PARAMETERS_RESPONSE_ID = 0x0001, /**< "Save Startup Parameters Response" command. */
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_RESTORE_STARTUP_PARAMETERS_RESPONSE_ID = 0x0002, /**< "Restore Startup Parameters Response" command. */
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_RESET_STARTUP_PARAMETERS_RESPONSE_ID = 0x0003, /**< "Reset Startup Parameters Response" command. */
|
||||
} esp_zb_zcl_commissioning_srv_cmd_id_t;
|
||||
|
||||
/** @brief Commissioning Cluster client command identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_RESTART_DEVICE_ID = 0x0000, /**< "Restart Device" command. */
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_SAVE_STARTUP_PARAMETERS_ID = 0x0001, /**< "Save Startup Parameters" command. */
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_RESTORE_STARTUP_PARAMETERS_ID = 0x0002, /**< "Restore Startup Parameters" command. */
|
||||
ESP_ZB_ZCL_CMD_COMMISSIONING_RESET_STARTUP_PARAMETERS_ID = 0x0003, /**< "Reset Startup Parameters" command. */
|
||||
} esp_zb_zcl_commissioning_cli_cmd_id_t;
|
||||
|
||||
/**
|
||||
* @brief The values of "startup_mode" bitfield in "options" field of "esp_zb_zcl_commissioning_restart_device_payload_t"
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_COMMISSIONING_STARTUP_MODE_USE_PARAMETER_SET = 0,
|
||||
ESP_ZB_ZCL_COMMISSIONING_STARTUP_MODE_USE_CURRENT_STACK = 1,
|
||||
} esp_zb_zcl_commissioning_startup_mode_t;
|
||||
|
||||
/**
|
||||
* @brief "options" field of "esp_zb_zcl_commissioning_restart_device_payload_t"
|
||||
*/
|
||||
typedef union {
|
||||
uint8_t u8; /**< Restart device options */
|
||||
struct {
|
||||
uint8_t startup_mode : 3; /**< startup mode: bit 0 - 2 */
|
||||
uint8_t immediate : 1; /**< immediate: bit 3 */
|
||||
uint8_t /* reserved */ : 4; /**< reserved: bit 4 - 7 */
|
||||
};
|
||||
} esp_zb_zcl_commissioning_restart_device_options_t;
|
||||
|
||||
/**
|
||||
* @brief "Restart Device Response" Command Payload Format
|
||||
*/
|
||||
typedef struct esp_zb_zcl_commissioning_restart_device_payload_s {
|
||||
esp_zb_zcl_commissioning_restart_device_options_t options; /*!< Options for restart device */
|
||||
uint8_t delay; /*!< Startup procedure is to be invoked, in seconds */
|
||||
uint8_t jitter; /*!< Specifies a random jitter range, in millisecond */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_restart_device_payload_t;
|
||||
|
||||
/**
|
||||
* @brief ESP_ZB_ZCL_CMD_COMMISSIONING_SAVE_STARTUP_PARAMETERS_ID "Save Startup Parameters" Command Payload Format
|
||||
*/
|
||||
typedef struct esp_zb_zcl_commissioning_save_startup_parameters_payload_s {
|
||||
uint8_t options; /*!< Reserved field */
|
||||
uint8_t index; /*!< The current startup parameter attribute set is to be saved */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_save_startup_parameters_payload_t;
|
||||
|
||||
/**
|
||||
* @brief ESP_ZB_ZCL_CMD_COMMISSIONING_RESTORE_STARTUP_PARAMETERS_ID "Restore Startup Parameters" Command Payload Format
|
||||
*/
|
||||
typedef struct esp_zb_zcl_commissioning_restore_startup_parameters_payload_s {
|
||||
uint8_t options; /*!< Reserved field */
|
||||
uint8_t index; /*!< Index of the saved startup parameter attribute set to be restored to current status */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_restore_startup_parameters_payload_t;
|
||||
|
||||
/**
|
||||
* @brief "options" field of "esp_zb_zcl_commissioning_reset_startup_parameters_payload_t"
|
||||
*/
|
||||
typedef union {
|
||||
uint8_t u8; /**< Reset startup options */
|
||||
struct {
|
||||
uint8_t reset_current : 1; /**< reset current: bit 0 */
|
||||
uint8_t reset_all : 1; /**< reset all: bit 1 */
|
||||
uint8_t erase_index : 1; /**< erase index: bit 2 */
|
||||
uint8_t /* reserved */ : 5; /**< reserved: bit 3 - 7 */
|
||||
};
|
||||
} esp_zb_zcl_commissioning_reset_startup_param_options_t;
|
||||
|
||||
/**
|
||||
* @brief "Reset Startup Parameters" Command Payload Format
|
||||
*/
|
||||
typedef struct esp_zb_zcl_commissioning_reset_startup_parameters_payload_s {
|
||||
esp_zb_zcl_commissioning_reset_startup_param_options_t options; /*!< The options of reset startup parameter */
|
||||
uint8_t index; /*!< Index of a saved startup parameter attribute set */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_reset_startup_parameters_payload_t;
|
||||
|
||||
void esp_zb_zcl_commissioning_init_server(void);
|
||||
void esp_zb_zcl_commissioning_init_client(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_COMMISSIONING_SERVER_ROLE_INIT esp_zb_zcl_commissioning_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_COMMISSIONING_CLIENT_ROLE_INIT esp_zb_zcl_commissioning_init_client
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,373 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
#include "esp_zigbee_zcl_basic.h"
|
||||
#include "esp_zigbee_zcl_identify.h"
|
||||
#include "esp_zigbee_zcl_groups.h"
|
||||
#include "esp_zigbee_zcl_scenes.h"
|
||||
#include "esp_zigbee_zcl_on_off.h"
|
||||
#include "esp_zigbee_zcl_on_off_switch_config.h"
|
||||
#include "esp_zigbee_zcl_level.h"
|
||||
#include "esp_zigbee_zcl_color_control.h"
|
||||
#include "esp_zigbee_zcl_time.h"
|
||||
#include "esp_zigbee_zcl_binary_input.h"
|
||||
#include "esp_zigbee_zcl_commissioning.h"
|
||||
#include "esp_zigbee_zcl_ias_zone.h"
|
||||
#include "esp_zigbee_zcl_ias_ace.h"
|
||||
#include "esp_zigbee_zcl_ias_wd.h"
|
||||
#include "esp_zigbee_zcl_shade_config.h"
|
||||
#include "esp_zigbee_zcl_door_lock.h"
|
||||
#include "esp_zigbee_zcl_humidity_meas.h"
|
||||
#include "esp_zigbee_zcl_temperature_meas.h"
|
||||
#include "esp_zigbee_zcl_ota.h"
|
||||
#include "esp_zigbee_zcl_electrical_meas.h"
|
||||
#include "esp_zigbee_zcl_illuminance_meas.h"
|
||||
#include "esp_zigbee_zcl_pressure_meas.h"
|
||||
#include "esp_zigbee_zcl_flow_meas.h"
|
||||
#include "esp_zigbee_zcl_occupancy_sensing.h"
|
||||
#include "esp_zigbee_zcl_window_covering.h"
|
||||
#include "esp_zigbee_zcl_thermostat.h"
|
||||
#include "esp_zigbee_zcl_fan_control.h"
|
||||
#include "esp_zigbee_zcl_thermostat_ui_config.h"
|
||||
#include "esp_zigbee_zcl_analog_input.h"
|
||||
#include "esp_zigbee_zcl_analog_output.h"
|
||||
#include "esp_zigbee_zcl_analog_value.h"
|
||||
#include "esp_zigbee_zcl_carbon_dioxide_measurement.h"
|
||||
#include "esp_zigbee_zcl_pm2_5_measurement.h"
|
||||
#include "esp_zigbee_zcl_multistate_value.h"
|
||||
#include "esp_zigbee_zcl_metering.h"
|
||||
#include "esp_zigbee_zcl_diagnostics.h"
|
||||
#include "esp_zigbee_zcl_meter_identification.h"
|
||||
#include "esp_zigbee_zcl_price.h"
|
||||
#include "esp_zigbee_zcl_ec_measurement.h"
|
||||
#include "esp_zigbee_zcl_ph_measurement.h"
|
||||
#include "esp_zigbee_zcl_wind_speed_measurement.h"
|
||||
#include "esp_zigbee_zcl_drlc.h"
|
||||
#include "esp_zigbee_zcl_dehumidification_control.h"
|
||||
|
||||
#ifdef ZB_ENABLE_ZGP
|
||||
#include "esp_zigbee_zcl_green_power.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Application Framework Profile identifiers.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_AF_HA_PROFILE_ID = 0x0104U, /** HA profile ID */
|
||||
ESP_ZB_AF_SE_PROFILE_ID = 0x0109U, /** SE profile ID */
|
||||
ESP_ZB_AF_ZLL_PROFILE_ID = 0xC05EU, /** ZLL profile ID */
|
||||
ESP_ZB_AF_GP_PROFILE_ID = 0xA1E0U, /** GreenPower profile ID */
|
||||
} esp_zb_af_profile_id_t;
|
||||
|
||||
/** Green power special endpoint */
|
||||
#define ESP_ZGP_ENDPOINT 242
|
||||
/** Non manufacturer specific code for certain attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_NON_MANUFACTURER_SPECIFIC 0xFFFFU
|
||||
/** Non manufacturer specific code for certain cluster */
|
||||
#define EZP_ZB_ZCL_CLUSTER_NON_MANUFACTURER_SPECIFIC 0x0000
|
||||
|
||||
/** @brief HA Device identifiers.
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_HA_ON_OFF_SWITCH_DEVICE_ID = 0x0000, /*!< General On/Off switch */
|
||||
ESP_ZB_HA_LEVEL_CONTROL_SWITCH_DEVICE_ID = 0x0001, /*!< Level Control Switch */
|
||||
ESP_ZB_HA_ON_OFF_OUTPUT_DEVICE_ID = 0x0002, /*!< General On/Off output */
|
||||
ESP_ZB_HA_LEVEL_CONTROLLABLE_OUTPUT_DEVICE_ID = 0x0003, /*!< Level Controllable Output */
|
||||
ESP_ZB_HA_SCENE_SELECTOR_DEVICE_ID = 0x0004, /*!< Scene Selector */
|
||||
ESP_ZB_HA_CONFIGURATION_TOOL_DEVICE_ID = 0x0005, /*!< Configuration Tool */
|
||||
ESP_ZB_HA_REMOTE_CONTROL_DEVICE_ID = 0x0006, /*!< Remote Control */
|
||||
ESP_ZB_HA_COMBINED_INTERFACE_DEVICE_ID = 0x0007, /*!< Combined Interface */
|
||||
ESP_ZB_HA_RANGE_EXTENDER_DEVICE_ID = 0x0008, /*!< Range Extender */
|
||||
ESP_ZB_HA_MAINS_POWER_OUTLET_DEVICE_ID = 0x0009, /*!< Mains Power Outlet */
|
||||
ESP_ZB_HA_DOOR_LOCK_DEVICE_ID = 0x000A, /*!< Door lock client */
|
||||
ESP_ZB_HA_DOOR_LOCK_CONTROLLER_DEVICE_ID = 0x000B, /*!< Door lock controller */
|
||||
ESP_ZB_HA_SIMPLE_SENSOR_DEVICE_ID = 0x000C, /*!< Simple Sensor device */
|
||||
ESP_ZB_HA_CONSUMPTION_AWARENESS_DEVICE_ID = 0x000D, /*!< Consumption Awareness Device */
|
||||
ESP_ZB_HA_HOME_GATEWAY_DEVICE_ID = 0x0050, /*!< Home Gateway */
|
||||
ESP_ZB_HA_SMART_PLUG_DEVICE_ID = 0x0051, /*!< Smart plug */
|
||||
ESP_ZB_HA_WHITE_GOODS_DEVICE_ID = 0x0052, /*!< White Goods */
|
||||
ESP_ZB_HA_METER_INTERFACE_DEVICE_ID = 0x0053, /*!< Meter Interface */
|
||||
ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID = 0x0100, /*!< On/Off Light Device */
|
||||
ESP_ZB_HA_DIMMABLE_LIGHT_DEVICE_ID = 0x0101, /*!< Dimmable Light Device */
|
||||
ESP_ZB_HA_COLOR_DIMMABLE_LIGHT_DEVICE_ID = 0x0102, /*!< Color Dimmable Light Device */
|
||||
ESP_ZB_HA_DIMMER_SWITCH_DEVICE_ID = 0x0104, /*!< Dimmer Switch Device */
|
||||
ESP_ZB_HA_COLOR_DIMMER_SWITCH_DEVICE_ID = 0x0105, /*!< Color Dimmer Switch Device */
|
||||
ESP_ZB_HA_LIGHT_SENSOR_DEVICE_ID = 0x0106, /*!< Light Sensor Device */
|
||||
ESP_ZB_HA_SHADE_DEVICE_ID = 0x0200, /*!< Shade */
|
||||
ESP_ZB_HA_SHADE_CONTROLLER_DEVICE_ID = 0x0201, /*!< Shade controller */
|
||||
ESP_ZB_HA_WINDOW_COVERING_DEVICE_ID = 0x0202, /*!< Window Covering client*/
|
||||
ESP_ZB_HA_WINDOW_COVERING_CONTROLLER_DEVICE_ID = 0x0203, /*!< Window Covering controller */
|
||||
ESP_ZB_HA_HEATING_COOLING_UNIT_DEVICE_ID = 0x0300, /*!< Heating/Cooling Unit device */
|
||||
ESP_ZB_HA_THERMOSTAT_DEVICE_ID = 0x0301, /*!< Thermostat Device */
|
||||
ESP_ZB_HA_TEMPERATURE_SENSOR_DEVICE_ID = 0x0302, /*!< Temperature Sensor */
|
||||
ESP_ZB_HA_IAS_CONTROL_INDICATING_EQUIPMENT_ID = 0x0400, /*!< IAS Control and Indicating Equipment */
|
||||
ESP_ZB_HA_IAS_ANCILLARY_CONTROL_EQUIPMENT_ID = 0x0401, /*!< IAS Ancillary Control Equipment */
|
||||
ESP_ZB_HA_IAS_ZONE_ID = 0x0402, /*!< IAS Zone */
|
||||
ESP_ZB_HA_IAS_WARNING_DEVICE_ID = 0x0403, /*!< IAS Warning Device */
|
||||
ESP_ZB_HA_TEST_DEVICE_ID = 0xfff0, /*!< Custom HA device for test */
|
||||
ESP_ZB_HA_CUSTOM_TUNNEL_DEVICE_ID = 0xfff1, /*!< Custom Tunnel device (should declared in private profile) */
|
||||
ESP_ZB_HA_CUSTOM_ATTR_DEVICE_ID = 0xfff2 /*!< Custom Attributes Device */
|
||||
} esp_zb_ha_standard_devices_t;
|
||||
|
||||
/**
|
||||
* @brief ZCL cluster role enum
|
||||
* @anchor esp_zb_zcl_cluster_role
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CLUSTER_SERVER_ROLE = 0x01U, /*!< Server cluster role */
|
||||
ESP_ZB_ZCL_CLUSTER_CLIENT_ROLE = 0x02U, /*!< Client cluster role */
|
||||
} esp_zb_zcl_cluster_role_t;
|
||||
|
||||
/**
|
||||
* @brief ZCL cluster identifiers
|
||||
* @anchor esp_zb_zcl_cluster_id
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CLUSTER_ID_BASIC = 0x0000U, /*!< Basic cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_POWER_CONFIG = 0x0001U, /*!< Power configuration cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_DEVICE_TEMP_CONFIG = 0x0002U, /*!< Device temperature configuration cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_IDENTIFY = 0x0003U, /*!< Identify cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_GROUPS = 0x0004U, /*!< Groups cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_SCENES = 0x0005U, /*!< Scenes cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ON_OFF = 0x0006U, /*!< On/Off cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ON_OFF_SWITCH_CONFIG = 0x0007U, /*!< On/Off switch configuration cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL = 0x0008U, /*!< Level control cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ALARMS = 0x0009U, /*!< Alarms cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_TIME = 0x000aU, /*!< Time cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_RSSI_LOCATION = 0x000bU, /*!< RSSI location cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ANALOG_INPUT = 0x000cU, /*!< Analog input (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ANALOG_OUTPUT = 0x000dU, /*!< Analog output (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ANALOG_VALUE = 0x000eU, /*!< Analog value (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_BINARY_INPUT = 0x000fU, /*!< Binary input (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_BINARY_OUTPUT = 0x0010U, /*!< Binary output (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_BINARY_VALUE = 0x0011U, /*!< Binary value (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_MULTI_INPUT = 0x0012U, /*!< Multistate input (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_MULTI_OUTPUT = 0x0013U, /*!< Multistate output (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_MULTI_VALUE = 0x0014U, /*!< Multistate value (basic) cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_COMMISSIONING = 0x0015U, /*!< Commissioning cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_OTA_UPGRADE = 0x0019U, /*!< Over The Air cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_POLL_CONTROL = 0x0020U, /*!< Poll control cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_GREEN_POWER = 0x0021U, /*!< Green Power cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_KEEP_ALIVE = 0x0025U, /*!< Keep Alive cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_SHADE_CONFIG = 0x0100U, /*!< Shade configuration cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_DOOR_LOCK = 0x0101U, /*!< Door lock cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_WINDOW_COVERING = 0x0102U, /*!< Window covering cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_PUMP_CONFIG_CONTROL = 0x0200U, /*!< Pump configuration and control cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_THERMOSTAT = 0x0201U, /*!< Thermostat cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_FAN_CONTROL = 0x0202U, /*!< Fan control cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_DEHUMIDIFICATION_CONTROL = 0x0203U, /*!< Dehumidification control cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_THERMOSTAT_UI_CONFIG = 0x0204U, /*!< Thermostat user interface configuration cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_COLOR_CONTROL = 0x0300U, /*!< Color control cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_BALLAST_CONFIG = 0x0301U, /*!< Ballast configuration cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ILLUMINANCE_MEASUREMENT = 0x0400U, /*!< Illuminance measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT = 0x0402U, /*!< Temperature measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_PRESSURE_MEASUREMENT = 0x0403U, /*!< Pressure measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_FLOW_MEASUREMENT = 0x0404U, /*!< Flow measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT = 0x0405U, /*!< Relative humidity measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_OCCUPANCY_SENSING = 0x0406U, /*!< Occupancy sensing */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_PH_MEASUREMENT = 0x0409U, /*!< pH measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_EC_MEASUREMENT = 0x040aU, /*!< Electrical conductivity measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_WIND_SPEED_MEASUREMENT = 0x040bU, /*!< Wind speed measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_CARBON_DIOXIDE_MEASUREMENT = 0x040dU, /*!< Carbon dioxide measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_PM2_5_MEASUREMENT = 0x042aU, /*!< PM2.5 measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE = 0x0500U, /*!< IAS zone */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_IAS_ACE = 0x0501U, /*!< IAS ACE */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_IAS_WD = 0x0502U, /*!< IAS WD */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_PRICE = 0x0700U, /*!< Price cluster identifier. */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_DRLC = 0x0701U, /*!< Demand Response and Load Control cluster identifier */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_METERING = 0x0702U, /*!< Metering */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_METER_IDENTIFICATION = 0x0b01U, /*!< Meter Identification cluster identifier */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_ELECTRICAL_MEASUREMENT = 0x0b04U, /*!< Electrical measurement */
|
||||
ESP_ZB_ZCL_CLUSTER_ID_DIAGNOSTICS = 0x0b05U, /*!< Home Automation Diagnostics */
|
||||
} esp_zb_zcl_cluster_id_t;
|
||||
|
||||
/**
|
||||
* @brief ZCL status values
|
||||
* @anchor esp_zb_zcl_status
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_STATUS_SUCCESS = 0x00U, /*!< ZCL Success */
|
||||
ESP_ZB_ZCL_STATUS_FAIL = 0x01U, /*!< ZCL Fail */
|
||||
ESP_ZB_ZCL_STATUS_NOT_AUTHORIZED = 0x7EU, /*!< Server is not authorized to upgrade the client */
|
||||
ESP_ZB_ZCL_STATUS_MALFORMED_CMD = 0x80U, /*!< Malformed command */
|
||||
ESP_ZB_ZCL_STATUS_UNSUP_CLUST_CMD = 0x81U, /*!< Unsupported cluster command */
|
||||
ESP_ZB_ZCL_STATUS_UNSUP_GEN_CMD = 0x82U, /*!< Unsupported general command */
|
||||
ESP_ZB_ZCL_STATUS_UNSUP_MANUF_CLUST_CMD = 0x83U, /*!< Unsupported manuf-specific clust command */
|
||||
ESP_ZB_ZCL_STATUS_UNSUP_MANUF_GEN_CMD = 0x84U, /*!< Unsupported manuf-specific general command */
|
||||
ESP_ZB_ZCL_STATUS_INVALID_FIELD = 0x85U, /*!< Invalid field */
|
||||
ESP_ZB_ZCL_STATUS_UNSUP_ATTRIB = 0x86U, /*!< Unsupported attribute */
|
||||
ESP_ZB_ZCL_STATUS_INVALID_VALUE = 0x87U, /*!< Invalid value */
|
||||
ESP_ZB_ZCL_STATUS_READ_ONLY = 0x88U, /*!< Read only */
|
||||
ESP_ZB_ZCL_STATUS_INSUFF_SPACE = 0x89U, /*!< Insufficient space */
|
||||
ESP_ZB_ZCL_STATUS_DUPE_EXISTS = 0x8aU, /*!< Duplicate exists */
|
||||
ESP_ZB_ZCL_STATUS_NOT_FOUND = 0x8bU, /*!< Not found */
|
||||
ESP_ZB_ZCL_STATUS_UNREPORTABLE_ATTRIB = 0x8cU, /*!< Unreportable attribute */
|
||||
ESP_ZB_ZCL_STATUS_INVALID_TYPE = 0x8dU, /*!< Invalid type */
|
||||
ESP_ZB_ZCL_STATUS_WRITE_ONLY = 0x8fU, /*!< Write only */
|
||||
ESP_ZB_ZCL_STATUS_INCONSISTENT = 0x92U, /*!< Supplied values are inconsistent */
|
||||
ESP_ZB_ZCL_STATUS_ACTION_DENIED = 0x93U,
|
||||
ESP_ZB_ZCL_STATUS_TIMEOUT = 0x94U, /*!< Timeout */
|
||||
ESP_ZB_ZCL_STATUS_ABORT = 0x95U, /*!< Abort */
|
||||
ESP_ZB_ZCL_STATUS_INVALID_IMAGE = 0x96U, /*!< Invalid OTA upgrade image */
|
||||
ESP_ZB_ZCL_STATUS_WAIT_FOR_DATA = 0x97U, /*!< Server does not have data block available yet */
|
||||
ESP_ZB_ZCL_STATUS_NO_IMAGE_AVAILABLE = 0x98U,
|
||||
ESP_ZB_ZCL_STATUS_REQUIRE_MORE_IMAGE = 0x99U,
|
||||
ESP_ZB_ZCL_STATUS_NOTIFICATION_PENDING = 0x9AU,
|
||||
ESP_ZB_ZCL_STATUS_HW_FAIL = 0xc0U, /*!< Hardware failure */
|
||||
ESP_ZB_ZCL_STATUS_SW_FAIL = 0xc1U, /*!< Software failure */
|
||||
ESP_ZB_ZCL_STATUS_CALIB_ERR = 0xc2U, /*!< Calibration error */
|
||||
ESP_ZB_ZCL_STATUS_UNSUP_CLUST = 0xc3U, /*!< Cluster is not found on the target endpoint */
|
||||
ESP_ZB_ZCL_STATUS_LIMIT_REACHED = 0xc4U, /*!< Cluster is not found on the target endpoint */
|
||||
} esp_zb_zcl_status_t;
|
||||
|
||||
/**
|
||||
* @brief ZCL attribute data type values
|
||||
* @anchor esp_zb_zcl_attr_type
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_TYPE_NULL = 0x00U, /*!< Null data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_8BIT = 0x08U, /*!< 8-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_16BIT = 0x09U, /*!< 16-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_24BIT = 0x0aU, /*!< 24-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_32BIT = 0x0bU, /*!< 32-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_40BIT = 0x0cU, /*!< 40-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_48BIT = 0x0dU, /*!< 48-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_56BIT = 0x0eU, /*!< 56-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_64BIT = 0x0fU, /*!< 64-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_BOOL = 0x10U, /*!< Boolean data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_8BITMAP = 0x18U, /*!< 8-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_16BITMAP = 0x19U, /*!< 16-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_24BITMAP = 0x1aU, /*!< 24-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_32BITMAP = 0x1bU, /*!< 32-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_40BITMAP = 0x1cU, /*!< 40-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_48BITMAP = 0x1dU, /*!< 48-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_56BITMAP = 0x1eU, /*!< 56-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_64BITMAP = 0x1fU, /*!< 64-bit bitmap data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U8 = 0x20U, /*!< Unsigned 8-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U16 = 0x21U, /*!< Unsigned 16-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U24 = 0x22U, /*!< Unsigned 24-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U32 = 0x23U, /*!< Unsigned 32-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U40 = 0x24U, /*!< Unsigned 40-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U48 = 0x25U, /*!< Unsigned 48-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U56 = 0x26U, /*!< Unsigned 56-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_U64 = 0x27U, /*!< Unsigned 64-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S8 = 0x28U, /*!< Signed 8-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S16 = 0x29U, /*!< Signed 16-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S24 = 0x2aU, /*!< Signed 24-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S32 = 0x2bU, /*!< Signed 32-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S40 = 0x2cU, /*!< Signed 40-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S48 = 0x2dU, /*!< Signed 48-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S56 = 0x2eU, /*!< Signed 56-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_S64 = 0x2fU, /*!< Signed 64-bit value data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_8BIT_ENUM = 0x30U, /*!< 8-bit enumeration (U8 discrete) data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_16BIT_ENUM = 0x31U, /*!< 16-bit enumeration (U16 discrete) data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_SEMI = 0x38U, /*!< 2 byte floating point */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_SINGLE = 0x39U, /*!< 4 byte floating point */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_DOUBLE = 0x3aU, /*!< 8 byte floating point */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_OCTET_STRING = 0x41U, /*!< Octet string data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING = 0x42U, /*!< Character string (array) data type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_LONG_OCTET_STRING = 0x43U, /*!< Long octet string */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_LONG_CHAR_STRING = 0x44U, /*!< Long character string */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_ARRAY = 0x48U, /*!< Array data with 8bit type, size = 2 + sum of content len */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_16BIT_ARRAY = 0x49U, /*!< Array data with 16bit type, size = 2 + sum of content len */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_32BIT_ARRAY = 0x4aU, /*!< Array data with 32bit type, size = 2 + sum of content len */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_STRUCTURE = 0x4cU, /*!< Structure data type 2 + sum of content len */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_SET = 0x50U, /*!< Collection:set, size = sum of len of content */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_BAG = 0x51U, /*!< Collection:bag, size = sum of len of content */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_TIME_OF_DAY = 0xe0U, /*!< Time of day, 4 bytes */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_DATE = 0xe1U, /*!< Date, 4 bytes */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_UTC_TIME = 0xe2U, /*!< UTC Time, 4 bytes */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_CLUSTER_ID = 0xe8U, /*!< Cluster ID, 2 bytes */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_ATTRIBUTE_ID = 0xe9U, /*!< Attribute ID, 2 bytes */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_BACNET_OID = 0xeaU, /*!< BACnet OID, 4 bytes */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_IEEE_ADDR = 0xf0U, /*!< IEEE address (U64) type */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_128_BIT_KEY = 0xf1U, /*!< 128-bit security key */
|
||||
ESP_ZB_ZCL_ATTR_TYPE_INVALID = 0xffU, /*!< Invalid data type */
|
||||
} esp_zb_zcl_attr_type_t;
|
||||
|
||||
/**
|
||||
* @brief ZCL attribute access values
|
||||
* @anchor esp_zb_zcl_attr_access
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_ACCESS_READ_ONLY = 0x01U, /*!< Attribute is read only */
|
||||
ESP_ZB_ZCL_ATTR_ACCESS_WRITE_ONLY = 0x02U, /*!< Attribute is write only */
|
||||
ESP_ZB_ZCL_ATTR_ACCESS_READ_WRITE = 0x03U, /*!< Attribute is read/write */
|
||||
ESP_ZB_ZCL_ATTR_ACCESS_REPORTING = 0x04U, /*!< Attribute is allowed for reporting */
|
||||
ESP_ZB_ZCL_ATTR_ACCESS_SINGLETON = 0x08U, /*!< Attribute is singleton */
|
||||
ESP_ZB_ZCL_ATTR_ACCESS_SCENE = 0x10U, /*!< Attribute is accessed through scene */
|
||||
ESP_ZB_ZCL_ATTR_MANUF_SPEC = 0x20U, /*!< Attribute is manufacturer specific */
|
||||
ESP_ZB_ZCL_ATTR_ACCESS_INTERNAL = 0x40U, /*!< Internal access only Attribute */
|
||||
} esp_zb_zcl_attr_access_t;
|
||||
|
||||
/**
|
||||
* @brief The ZCL attribute location information struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zcl_attr_location_info_s {
|
||||
uint8_t endpoint_id; /*!< The endpoint identifier on which the cluster id is resident. */
|
||||
uint16_t cluster_id; /*!< The cluster identifier on which the attribute is resident, refer to esp_zb_zcl_cluster_id_t */
|
||||
uint8_t cluster_role; /*!< The role of cluster, refer to esp_zb_zcl_cluster_role_t */
|
||||
uint16_t manuf_code; /*!< The manufacturer code of attribute */
|
||||
uint16_t attr_id; /*!< The attribute identifier */
|
||||
} esp_zb_zcl_attr_location_info_t;
|
||||
|
||||
/**
|
||||
* @brief ZCL Cluster Check Attribute Value Handler, which should be called before attribute change and checks if new value is in correct range
|
||||
* and can be applied.
|
||||
*
|
||||
* @param[in] attr_id ZCL Attribute ID
|
||||
* @param[in] endpoint Device endpoint
|
||||
* @param[in] value Pointer to the new Attribute Value
|
||||
*
|
||||
* @return The result of check value whose value refer to esp_err_t
|
||||
*/
|
||||
typedef signed int (*esp_zb_zcl_cluster_check_value_callback_t)(uint16_t attr_id, uint8_t endpoint, uint8_t *value);
|
||||
|
||||
/**
|
||||
* @brief ZCL Cluster Write Attribute Handler, which should be called before attribute change (if any cluster-specific action needs to
|
||||
* be bound to attribute change, it can be placed in this handler).
|
||||
*
|
||||
* @param[in] endpoint Device endpoint
|
||||
* @param[in] attr_id ZCL Attribute ID
|
||||
* @param[in] new_value Pointer to the new Attribute Value
|
||||
* @param[in] manuf_code Manufacturer specific code
|
||||
*/
|
||||
typedef void (*esp_zb_zcl_cluster_write_attr_callback_t)(uint8_t endpoint, uint16_t attr_id, uint8_t *new_value, uint16_t manuf_code);
|
||||
|
||||
/**
|
||||
* @brief Get the size of ZCL attribute value
|
||||
*
|
||||
* @param[in] attr_type The data type of attribute value
|
||||
* @param[in] attr_value The value of attribute
|
||||
* @return
|
||||
* - 0x00 - 0xFFFE: The size of attribute value
|
||||
* - 0xFFFF: Invalid size
|
||||
*/
|
||||
uint16_t esp_zb_zcl_get_attribute_size(uint8_t attr_type, uint8_t *attr_value);
|
||||
|
||||
/**
|
||||
* @brief Put the ZCL attribute value to specific memory
|
||||
*
|
||||
* @param data_ptr A pointer of specific memory
|
||||
* @param type The data type of attribute value
|
||||
* @param value The value of attribute
|
||||
* @param value_size The size of attribute value
|
||||
* @return A pointer indicates the end location in specific memory after a value has been stored
|
||||
*/
|
||||
uint8_t *esp_zb_zcl_put_attribute_value(uint8_t *data_ptr, uint8_t type, uint8_t *value, uint16_t value_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Dehumidification Control cluster attribute identifiers */
|
||||
typedef enum esp_zb_zcl_dehumidification_control_attr_e {
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_ID = 0x0000, /*!< The RelativeHumidity attribute is an 8-bit value that represents the
|
||||
current relative humidity (in %) measured by a local or remote sensor. */
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_COOLING_ID = 0x0001, /*!< Dehumidification Cooling attribute */
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_RHDEHUMIDIFICATION_SETPOINT_ID = 0x0010, /*!< RHDehumidification Setpoint attribute */
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_MODE_ID = 0x0011, /*!< The RelativeHumidityMode attribute is an 8-bit value that specifies
|
||||
how the RelativeHumidity value is being updated. */
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_LOCKOUT_ID = 0x0012, /*!< The DehumidificationLockout attribute is an 8-bit value that specifies
|
||||
whether dehumidification is allowed or not. */
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_HYSTERESIS_ID = 0x0013, /*!< Dehumidification Hysteresis attribute */
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_MAX_COOL_ID = 0x0014, /*!< Dehumidification Max Cool attribute */
|
||||
ESP_ZB_ZCL_ATTR_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_DISPLAY_ID = 0x0015, /*!< The RelativeHumidityDisplay attribute is an 8-bit value that specifies
|
||||
whether the RelativeHumidity value is displayed to the user or not. */
|
||||
} esp_zb_zcl_dehumidification_control_attr_t;
|
||||
|
||||
|
||||
/** @brief Default value for Dehumidification Control cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_CLUSTER_REVISION_DEFAULT 0x0001
|
||||
|
||||
/** @brief Min value for RHDehumidification Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_RHDEHUMIDIFICATION_SETPOINT_MIN_VALUE 0x1e
|
||||
|
||||
/** @brief Max value for RHDehumidification Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_RHDEHUMIDIFICATION_SETPOINT_MAX_VALUE 0x64
|
||||
|
||||
/** @brief Default value for RHDehumidification Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_RHDEHUMIDIFICATION_SETPOINT_DEFAULT_VALUE 0x32
|
||||
|
||||
/** @brief Default value for RelativeHumidityMode attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_MODE_DEFAULT_VALUE ((uint8_t)ESP_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_MEASURED_LOCALLY)
|
||||
|
||||
/** @brief Default value for DehumidificationLockout attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_LOCKOUT_DEFAULT_VALUE ((uint8_t)ESP_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_LOCKOUT_ALLOWED)
|
||||
|
||||
/** @brief Min value for Dehumidification Hysteresis attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_HYSTERESIS_MIN_VALUE 0x02
|
||||
|
||||
/** @brief Max value for Dehumidification Hysteresis attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_HYSTERESIS_MAX_VALUE 0x14
|
||||
|
||||
/** @brief Default value for Dehumidification Hysteresis attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_HYSTERESIS_DEFAULT_VALUE 0x02
|
||||
|
||||
/** @brief Default value for Dehumidification Cool attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_COOL_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief Min value for Dehumidification Max Cool attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_MAX_COOL_MIN_VALUE 0x14
|
||||
|
||||
/** @brief Max value for Dehumidification Max Cool attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_MAX_COOL_MAX_VALUE 0x64
|
||||
|
||||
/** @brief Default value for Dehumidification Max Cool attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_MAX_COOL_DEFAULT_VALUE 0x14
|
||||
|
||||
/** @brief Default value for RelativeHumidityDisplay attribute */
|
||||
#define ESP_ZB_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_DISPLAY_DEFAULT_VALUE ((uint8_t)ESP_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_NOT_DISPLAYED)
|
||||
|
||||
/** @brief Enumerate the RelativeHumidityMode Attribute */
|
||||
typedef enum esp_zb_zcl_dehumidification_control_relative_humidity_mode_e {
|
||||
ESP_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_MEASURED_LOCALLY = 0x00, /*!< RelativeHumidity measured locally */
|
||||
ESP_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_UPDATED_OVER_THE_NETWORK, /*!< RelativeHumidity updated over the network */
|
||||
} esp_zb_zcl_dehumidification_control_relative_humidity_mode_t;
|
||||
|
||||
/** @brief Enumerate the DehumidificationLockout Attribute */
|
||||
typedef enum esp_zb_zcl_dehumidification_control_dehumidification_lockout_e {
|
||||
ESP_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_LOCKOUT_NOT_ALLOWED = 0x00, /*!< Dehumidification is not allowed */
|
||||
ESP_ZCL_DEHUMIDIFICATION_CONTROL_DEHUMIDIFICATION_LOCKOUT_ALLOWED, /*!< Dehumidification is allowed */
|
||||
} esp_zb_zcl_dehumidification_control_dehumidification_lockout_t;
|
||||
|
||||
/** @brief Enumerate the RelativeHumidityDisplay Attribute */
|
||||
typedef enum esp_zb_zcl_dehumidification_control_relative_humidity_display_e {
|
||||
ESP_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_NOT_DISPLAYED = 0x00, /*!< RelativeHumidity is not displayed */
|
||||
ESP_ZCL_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_DISPLAYED, /*!< RelativeHumidity is displayed */
|
||||
} esp_zb_zcl_dehumidification_control_relative_humidity_display_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Diagnostics cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_NUMBER_OF_RESETS_ID = 0x0000, /*!< Number Of Resets */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_PERSISTENT_MEMORY_WRITES_ID = 0x0001, /*!< Persistent Memory Writes */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_BCAST_ID = 0x0100, /*!< MAC Rx Broadcast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_BCAST_ID = 0x0101, /*!< MAC Tx Broadcast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_RX_UCAST_ID = 0x0102, /*!< MAC Rx Unicast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_ID = 0x0103, /*!< MAC Tx Unicast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_RETRY_ID = 0x0104, /*!< MAC Tx Unicast Retry */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_MAC_TX_UCAST_FAIL_ID = 0x0105, /*!< MAC Tx Unicast Fail */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_RX_BCAST_ID = 0x0106, /*!< APS Rx Broadcast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_BCAST_ID = 0x0107, /*!< APS Tx Broadcast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_RX_UCAST_ID = 0x0108, /*!< APS Rx Unicast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_SUCCESS_ID = 0x0109, /*!< APS Tx Unicast Success */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_RETRY_ID = 0x010A, /*!< APS Tx Unicast Retry */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_TX_UCAST_FAIL_ID = 0x010b, /*!< APS Tx Unicast Fail */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_ROUTE_DISC_INITIATED_ID = 0x010C, /*!< Route Disc Initiated */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_ADDED_ID = 0x010D, /*!< Neighbor Added */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_REMOVED_ID = 0x010E, /*!< Neighbor Removed */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_NEIGHBOR_STALE_ID = 0x010F, /*!< Neighbor Stale */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_JOIN_INDICATION_ID = 0x0110, /*!< Join Indication */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_CHILD_MOVED_ID = 0x0111, /*!< Child Moved */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_NWKFC_FAILURE_ID = 0x0112, /*!< NWKFC Failure */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APSFC_FAILURE_ID = 0x0113, /*!< APSFC Failure */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_UNAUTHORIZED_KEY_ID = 0x0114, /*!< APS Unauthorized Key */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_NWK_DECRYPT_FAILURES_ID = 0x0115, /*!< NWK Decrypt Failures */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_APS_DECRYPT_FAILURES_ID = 0x0116, /*!< APS Decrypt Failures */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_PACKET_BUFFER_ALLOCATE_FAILURES_ID = 0x0117, /*!< Packet Buffer Allocate Failures */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_RELAYED_UCAST_ID = 0x0118, /*!< Relayed Unicast */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_PHYTOMACQUEUELIMITREACHED_ID = 0x0119, /*!< Phytomacqueuelimitreached */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_PACKET_VALIDATEDROPCOUNT_ID = 0x011A, /*!< Packet Validatedropcount */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_AVERAGE_MAC_RETRY_PER_APS_ID = 0x011b, /*!< Average MAC Retry Per APS */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_LAST_LQI_ID = 0x011c, /*!< Last LQI */
|
||||
ESP_ZB_ZCL_ATTR_DIAGNOSTICS_LAST_RSSI_ID = 0x011d, /*!< Last RSSI */
|
||||
} esp_zb_zcl_diagnostics_attr_t;
|
||||
|
||||
/** @brief Default value for Diagnostics cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_CLUSTER_REVISION_DEFAULT ((uint16_t)0x0003u)
|
||||
|
||||
/** @brief Default value for number_of_resets attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_NUMBER_OF_RESETS_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for PersistentMemoryWrites attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_PERSISTENT_MEMORY_WRITES_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for MacRxBcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_MAC_RX_BCAST_DEFAULT_VALUE ((uint32_t)0)
|
||||
|
||||
/** @brief Default value for MacTxBcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_MAC_TX_BCAST_DEFAULT_VALUE ((uint32_t)0)
|
||||
|
||||
/** @brief Default value for MacRxUcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_MAC_RX_UCAST_DEFAULT_VALUE ((uint32_t)0)
|
||||
|
||||
/** @brief Default value for MacTxUcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_MAC_TX_UCAST_DEFAULT_VALUE ((uint32_t)0)
|
||||
|
||||
/** @brief Default value for MacTxUcastRetry attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_MAC_TX_UCAST_RETRY_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for MacTxUcastFail attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_MAC_TX_UCAST_FAIL_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for APSRxBcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_RX_BCAST_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for aps_tx_bcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_TX_BCAST_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for APSRxUcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_RX_UCAST_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for aps_tx_ucast_success attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_TX_UCAST_SUCCESS_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for APSTxUcastRetry attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_TX_UCAST_RETRY_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for aps_tx_ucast_fail attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_TX_UCAST_FAIL_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for RouteDiscInitiated attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_ROUTE_DISC_INITIATED_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for NeighborAdded attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_NEIGHBOR_ADDED_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for NeighborRemoved attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_NEIGHBOR_REMOVED_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for NeighborStale attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_NEIGHBOR_STALE_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for join_indication attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_JOIN_INDICATION_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for ChildMoved attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_CHILD_MOVED_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for nwk_fc_failure attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_NWKFC_FAILURE_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for aps_fc_failure attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APSFC_FAILURE_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for APSUnauthorizedKey attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_UNAUTHORIZED_KEY_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for NWKDecryptFailures attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_NWK_DECRYPT_FAILURES_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for APSDecryptFailures attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_APS_DECRYPT_FAILURES_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for packet_buffer_allocate_failures attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_PACKET_BUFFER_ALLOCATE_FAILURES_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for RelayedUcast attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_RELAYED_UCAST_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for PhytoMACqueuelimitreached attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_PHYTO_MA_CQUEUELIMITREACHED_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for PacketValidatedropcount attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_PACKET_VALIDATEDROPCOUNT_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for AverageMACRetryPerAPS attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_AVERAGE_MAC_RETRY_PER_APS_DEFAULT_VALUE ((uint16_t)0)
|
||||
|
||||
/** @brief Default value for LastLQI attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_LAST_LQI_DEFAULT_VALUE ((uint8_t)0)
|
||||
|
||||
/** @brief Default value for LastRSSI attribute */
|
||||
#define ESP_ZB_ZCL_DIAGNOSTICS_LAST_RSSI_DEFAULT_VALUE ((int8_t)0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Door Lock cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_ID = 0x0000, /*!< brief LockState attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_ID = 0x0001, /*!< brief LockType attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_ID = 0x0002, /*!< brief ActuatorEnabled attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ID = 0x0003, /*!< brief DoorState attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUM_OF_DOOR_OPEN_EVENTS_ID = 0x0004, /*!< brief DoorOpenEvents attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUM_OF_DOOR_CLOSED_EVENTS_ID = 0x0005, /*!< brief DoorClosedEvents attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_OPEN_PERIOD_ID = 0x0006, /*!< brief OpenPeriod attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUMBER_OF_LOG_RECORDS_SUPPORTED_ID = 0x0010, /*!< The number of available log records. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUM_TOTAL_USERS_ID = 0x0011, /*!< brief NumberOfTotalUsersSupported attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUM_PIN_USERS_ID = 0x0012, /*!< brief NumberOfPINUsersSupported attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUMBER_OF_RFID_USERS_SUPPORTED_ID = 0x0013, /*!< he number of RFID users supported. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUM_WEEK_DAY_SCHEDULE_PER_USER_ID = 0x0014, /*!< brief NumberOfWeekDaySchedulesSupportedPerUser attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUM_YEAR_DAY_SCHEDULE_PER_USER_ID = 0x0015, /*!< brief NumberOfYearDaySchedulesSupportedPerUser attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_NUM_HOLIDAY_SCHEDULE_ID = 0x0016, /*!< brief NumberOfHolidaySchedulesSupported attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_MAX_PIN_LEN_ID = 0x0017, /*!< brief Max PIN code length attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_MIN_PIN_LEN_ID = 0x0018, /*!< brief Min PIN code length attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_MAX_RFID_CODE_LENGTH_ID = 0x0019, /*!< An 8-bit value indicates the maximum length in bytes of a RFID Code on this device. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_MIN_RFID_CODE_LENGTH_ID = 0x001A, /*!< An 8-bit value indicates the minimum length in bytes of a RFID Code on this device. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_ENABLE_LOGGING_ID = 0x0020, /*!< Enable/disable event logging. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_LANGUAGE_ID = 0x0021, /*!< Modifies the language for the on-screen or audible user interface using three bytes from ISO-639-1. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_LED_SETTINGS_ID = 0x0022, /*!< The settings for the LED support three different modes. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_AUTO_RELOCK_TIME_ID = 0x0023, /*!< The number of seconds to wait after unlocking a lock before it automatically locks again. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_SOUND_VOLUME_ID = 0x0024, /*!< The sound volume on a door lock has three possible settings: silent, low and high volumes. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_OPERATING_MODE_ID = 0x0025, /*!< OperatingMode attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_OPERATION_MODES_SUPPORTED_ID = 0x0026, /*!< SupportedOperatingModes attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_DEFAULT_CONFIGURATION_REGISTER_ID = 0x0027, /*!< This attribute represents the default configurations as they are physically set on the device */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_ENABLE_LOCAL_PROGRAMMING_ID = 0x0028, /*!< EnableLocalProgramming attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_ENABLE_ONE_TOUCH_LOCKING_ID = 0x0029, /*!< Enable/disable the ability to lock the door lock with a single touch on the door lock. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_ENABLE_INSIDE_STATUS_LED_ID = 0x002A, /*!< Enable/disable an inside LED that allows the user to see at a glance if the door is locked. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_ENABLE_PRIVACY_MODE_BUTTON_ID = 0x002B, /*!< Enable/disable a button inside the door that is used to put the lock into privacy mode. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_WRONG_CODE_ENTRY_LIMIT_ID = 0x0030, /*!< The number of incorrect codes or RFID presentment attempts a user is allowed to enter before the door will enter a lockout state. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_USER_CODE_TEMPORARY_DISABLE_TIME_ID = 0x0031, /*!< The number of seconds that the lock shuts down following wrong code entry. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_SEND_PIN_OVER_THE_AIR_ID = 0x0032, /*!< Boolean set to True if it is ok for the door lock server to send PINs over the air. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_REQUIRE_PIN_RF_ID = 0x0033, /*!< Require PIN for RF operation attribute */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_SECURITY_LEVEL_ID = 0x0034, /*!< It allows the door lock manufacturer to indicate what level of security the door lock requires. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_ALARM_MASK_ID = 0x0040, /*!< The alarm mask is used to turn on/off alarms for particular functions */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_KEYPAD_OPERATION_EVENT_MASK_ID = 0x0041, /*!< Event mask used to turn on and off the transmission of keypad operation events. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_RF_OPERATION_EVENT_MASK_ID = 0x0042, /*!< Event mask used to turn on and off the transmission of RF operation events. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_MANUAL_OPERATION_EVENT_MASK_ID = 0x0043, /*!< Event mask used to turn on and off manual operation events. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_RFID_OPERATION_EVENT_MASK_ID = 0x0044, /*!< Event mask used to turn on and off RFID operation events. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_KEYPAD_PROGRAMMING_EVENT_MASK_ID = 0x0045, /*!< Event mask used to turn on and off keypad programming events. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_RF_PROGRAMMING_EVENT_MASK_ID = 0x0046, /*!< Event mask used to turn on and off RF programming events. */
|
||||
ESP_ZB_ZCL_ATTR_DOOR_LOCK_RFID_PROGRAMMING_EVENT_MASK_ID = 0x0047, /*!< Event mask used to turn on and off RFID programming events. */
|
||||
} esp_zb_zcl_door_lock_attr_t;
|
||||
|
||||
/** @brief Default value for Lock State attribute. */
|
||||
#define ESP_ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_DEFAULT_VALUE 0xff
|
||||
|
||||
/** @brief Default value for Lock Type attribute. */
|
||||
#define ESP_ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_DEFAULT_VALUE 0xff
|
||||
|
||||
/** @brief Default value for Actuator Enabled attribute. */
|
||||
#define ESP_ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_DEFAULT_VALUE 0x01
|
||||
|
||||
/** @brief Door Lock cluster commands
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_LOCK_DOOR = 0x00, /*!< This command causes the lock device to lock the door. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_DOOR = 0x01, /*!< This command causes the lock device to unlock the door. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_TOGGLE = 0x02, /*!< Request the status of the lock. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_WITH_TIMEOUT = 0x03, /*!< This command causes the lock device to unlock the door with a timeout parameter. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_LOG_RECORD = 0x04, /*!< Request a log record. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_PIN_CODE = 0x05, /*!< Set a PIN into the lock. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_PIN_CODE = 0x06, /*!< Retrieve a PIN Code. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_PIN_CODE = 0x07, /*!< Delete a PIN. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_ALL_PIN_CODES = 0x08, /*!< Clear out all PINs on the lock. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_USER_STATUS = 0x09, /*!< Set the status of a user ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_USER_STATUS = 0x0A, /*!< Get the status of a user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_WEEKDAY_SCHEDULE = 0x0B, /*!< Set a weekly repeating schedule for a specified user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_WEEKDAY_SCHEDULE = 0x0C, /*!< Retrieve the specific weekly schedule for the specific user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_WEEKDAY_SCHEDULE = 0x0D, /*!< Clear the specific weekly schedule for the specific user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_YEAR_DAY_SCHEDULE = 0x0E, /*!< Set a time-specific schedule ID for a specified user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_YEAR_DAY_SCHEDULE = 0x0F, /*!< Retrieve the specific year day schedule for the specific user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_YEAR_DAY_SCHEDULE = 0x10, /*!< Clears the specific year day schedule for the specific user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_HOLIDAY_SCHEDULE = 0x11, /*!< Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_HOLIDAY_SCHEDULE = 0x12, /*!< Get the holiday Schedule by specifying Holiday ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_HOLIDAY_SCHEDULE = 0x13, /*!< Clear the holiday Schedule by specifying Holiday ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_USER_TYPE = 0x14, /*!< Set the type byte for a specified user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_USER_TYPE = 0x15, /*!< Retrieve the type byte for a specific user. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_RFID_CODE = 0x16, /*!< Set an ID for RFID access into the lock. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_RFID_CODE = 0x17, /*!< Retrieve an ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_RFID_CODE = 0x18, /*!< Delete an ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_ALL_RFID_CODES = 0x19, /*!< Clear out all RFIDs on the lock. */
|
||||
} esp_zb_zcl_door_lock_cmd_id_t;
|
||||
|
||||
/** @brief Door Lock cluster response commands
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_LOCK_DOOR_RES = 0x00, /*!< This command is sent in response to a Lock command */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_DOOR_RES = 0x01, /*!< This command is sent in response to a Unlock command */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_TOGGLE_RESPONSE = 0x02, /*!< This command is sent in response to a Toggle command*/
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_WITH_TIMEOUT_RESPONSE = 0x03, /*!< This command is sent in response to an Unlock */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_LOG_RECORD_RESPONSE = 0x04, /*!< Returns the specified log record. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_PIN_CODE_RESPONSE = 0x05, /*!< Returns status of the PIN set command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_PIN_CODE_RESPONSE = 0x06, /*!< Returns the PIN for the specified user ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_PIN_CODE_RESPONSE = 0x07, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_ALL_PIN_CODES_RESPONSE = 0x08, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_USER_STATUS_RESPONSE = 0x09, /*!< Returns the pass or fail value for the setting of the user status. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_USER_STATUS_RESPONSE = 0x0A, /*!< Returns the user status for the specified user ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_WEEKDAY_SCHEDULE_RESPONSE = 0x0B, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_WEEKDAY_SCHEDULE_RESPONSE = 0x0C, /*!< Returns the weekly repeating schedule data for the specified schedule ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_WEEKDAY_SCHEDULE_RESPONSE = 0x0D, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_YEAR_DAY_SCHEDULE_RESPONSE = 0x0E, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_YEAR_DAY_SCHEDULE_RESPONSE = 0x0F, /*!< Returns the weekly repeating schedule data for the specified schedule ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_YEAR_DAY_SCHEDULE_RESPONSE = 0x10, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_HOLIDAY_SCHEDULE_RESPONSE = 0x11, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_HOLIDAY_SCHEDULE_RESPONSE = 0x12, /*!< Returns the Holiday Schedule Entry for the specified Holiday ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_HOLIDAY_SCHEDULE_RESPONSE = 0x13, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_USER_TYPE_RESPONSE = 0x14, /*!< Returns the pass or fail value for the setting of the user type. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_USER_TYPE_RESPONSE = 0x15, /*!< Returns the user type for the specified user ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_SET_RFID_CODE_RESPONSE = 0x16, /*!< Returns status of the Set RFID Code command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_GET_RFID_CODE_RESPONSE = 0x17, /*!< Returns the RFID code for the specified user ID. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_RFID_CODE_RESPONSE = 0x18, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_CLEAR_ALL_RFID_CODES_RESPONSE = 0x19, /*!< Returns pass/fail of the command. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_OPERATION_EVENT_NOTIFICATION_ID = 0x20, /*!< The door lock server sends out operation event notification when the event is triggered by the various event sources. */
|
||||
ESP_ZB_ZCL_CMD_DOOR_LOCK_PROGRAMMING_EVENT_NOTIFICATION = 0x21, /*!< The door lock server sends out a programming event notification whenever a programming event takes place on the door lock. */
|
||||
} esp_zb_zcl_door_lock_cmd_resp_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,209 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Demand response and load control client attribute enumeration */
|
||||
typedef enum esp_zb_zcl_drlc_cli_attr_e {
|
||||
ESP_ZB_ZCL_ATTR_DRLC_UTILITY_ENROLLMENT_GROUP = 0x0000, /*!< UtilityEnrollmentGroup attribute. Provides for
|
||||
utilities to assign devices to groups. */
|
||||
ESP_ZB_ZCL_ATTR_DRLC_START_RANDOMIZATION_MINUTES = 0x0001, /*!< StartRandomizationMinutes attribute. Represents
|
||||
the maximum number of minutes to be used when
|
||||
randomizing the start of an event. */
|
||||
ESP_ZB_ZCL_ATTR_DRLC_DURATION_RANDOMIZATION_MINUTES = 0x0002, /*!< DurationRandomizationMinutes attribute. Represents
|
||||
the maximum number of minutes to be used when randomizing
|
||||
the duration of an event. */
|
||||
ESP_ZB_ZCL_ATTR_DRLC_DEVICE_CLASS_VALUE = 0x0003, /*!< DeviceClassValue attribute. Identifies which bits the
|
||||
device will match in the Device Class fields. */
|
||||
} esp_zb_zcl_drlc_cli_attr_t;
|
||||
|
||||
/** @brief The default value of ESP_ZB_ZCL_ATTR_DRLC_UTILITY_ENROLLMENT_GROUP attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_UTILITY_ENROLLMENT_GROUP_DEFAULT_VALUE 0x00
|
||||
/** @brief The minimum value of ESP_ZB_ZCL_ATTR_DRLC_UTILITY_ENROLLMENT_GROUP attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_UTILITY_ENROLLMENT_GROUP_MIN_VALUE 0x00
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_UTILITY_ENROLLMENT_GROUP attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_UTILITY_ENROLLMENT_GROUP_MAX_VALUE 0xFF
|
||||
|
||||
/** @brief The default value of ESP_ZB_ZCL_ATTR_DRLC_START_RANDOMIZATION_MINUTES attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_START_RANDOMIZATION_MINUTES_DEFAULT_VALUE 0x1E
|
||||
/** @brief The minimum value of ESP_ZB_ZCL_ATTR_DRLC_START_RANDOMIZATION_MINUTES attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_START_RANDOMIZATION_MINUTES_MIN_VALUE 0x00
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_START_RANDOMIZATION_MINUTES attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_START_RANDOMIZATION_MINUTES_MAX_VALUE 0x3C
|
||||
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_DURATION_RANDOMIZATION_MINUTES attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_DURATION_RANDOMIZATION_MINUTES_DEFAULT_VALUE 0x00
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_DURATION_RANDOMIZATION_MINUTES attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_DURATION_RANDOMIZATION_MINUTES_MIN_VALUE 0x00
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_DURATION_RANDOMIZATION_MINUTES attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_DURATION_RANDOMIZATION_MINUTES_MAX_VALUE 0x3C
|
||||
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_DEVICE_CLASS_VALUE attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_DEVICE_CLASS_VALUE_DEFAULT_VALUE 0x0000
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_DEVICE_CLASS_VALUE attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_DEVICE_CLASS_VALUE_MIN_VALUE 0x0000
|
||||
/** @brief The maximum value of ESP_ZB_ZCL_ATTR_DRLC_DEVICE_CLASS_VALUE attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_DRLC_DEVICE_CLASS_VALUE_MAX_VALUE 0xFFFF
|
||||
|
||||
/** @brief DRLC device classes enumeration */
|
||||
typedef enum esp_zb_zcl_drlc_device_class_e {
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_HVAC = 1 << 0, /*!< HVAC Compressor or Furnace */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_STRIP_HEATER = 1 << 1, /*!< Strip Heaters/Baseboard Heaters */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_WATER_HEATER = 1 << 2, /*!< Water Heater */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_POOL_PUMP = 1 << 3, /*!< Pool Pump/Spa/Jacuzzi */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_SMART_APPLIANCE = 1 << 4, /*!< Smart Appliances */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_IRRIGATION_PUMP = 1 << 5, /*!< Irrigation Pump */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_MCI_LOADS = 1 << 6, /*!< Managed Commercial & Industrial (C&I) loads */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_SIMPLE_LOADS = 1 << 7, /*!< Simple misc. (Residential On/Off) loads */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_EXTERIOR_LIGHTNING = 1 << 8, /*!< Exterior Lighting */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_INTERIOR_LIGHTNING = 1 << 9, /*!< Interior Lighting */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_ELECTRIC_VEHICLE = 1 << 10, /*!< Electric Vehicle */
|
||||
ESP_ZB_ZCL_DRLC_DEVICE_CLASS_GENERATION_SYSTEMS = 1 << 11 /*!< Generation Systems */
|
||||
} esp_zb_zcl_drlc_device_class_t;
|
||||
|
||||
/** @brief DRLC Criticality Level value applied by the device */
|
||||
typedef enum esp_zb_zcl_drlc_criticality_levels_e {
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_LEVEL_0 = 0x00, /*!< Reserved */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_GREEN, /*!< Green */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_LEVEL_1, /*!< Level 1 */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_LEVEL_2, /*!< Level 2 */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_LEVEL_3, /*!< Level 3 */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_LEVEL_4, /*!< Level 4 */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_LEVEL_5, /*!< Level 5 */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_EMERGENCY, /*!< Emergency */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_PLANNED_OUTAGE, /*!< Planned Outage */
|
||||
ESP_ZB_ZCL_DRLC_CRITICALITY_SERVICE_DISCONNECT /*!< Service Disconnect */
|
||||
} esp_zb_zcl_drlc_criticality_levels_t;
|
||||
|
||||
/** @brief Commands are generated by DRLC Server */
|
||||
typedef enum esp_zb_zcl_drlc_srv_cmd_e {
|
||||
ESP_ZB_ZCL_DRLC_SRV_CMD_LOAD_CONTROL_EVENT = 0x00, /*!< LoadControlEvent is generated when the ESI wants to
|
||||
control one or more load control devices usually as
|
||||
the result of an energy curtailment command from the
|
||||
Smart Energy Network. @see esp_zb_zcl_drlc_load_control_event_payload_t */
|
||||
ESP_ZB_ZCL_DRLC_SRV_CMD_CANCEL_LOAD_CONTROL_EVENT = 0x01, /*!< CancelLoadControlEvent is generated when the ESI wants to
|
||||
cancel previously scheduled control of one or more load
|
||||
control devices, usually as the result of an energy curtailment
|
||||
command from the Smart Energy network @see esp_zb_zcl_drlc_cancel_load_control_event_payload_t */
|
||||
ESP_ZB_ZCL_DRLC_SRV_CMD_CANCEL_ALL_LOAD_CONTROL_EVENTS = 0x02, /*!< Cancel AllLoadControlEvents is generated when the ESI wants to cancel all
|
||||
events for control device(s) */
|
||||
} esp_zb_zcl_drlc_srv_cmd_t;
|
||||
|
||||
/** @brief Commands are generated by DRLC Client */
|
||||
typedef enum esp_zb_zcl_drlc_cli_cmd_e {
|
||||
ESP_ZB_ZCL_DRLC_CLI_CMD_REPORT_EVENT_STATUS = 0x00, /*!< ReportEventStatus is generated when the client device detects a change of
|
||||
state for an active LoadControl event. @see esp_zb_zcl_drlc_report_event_status_payload_t */
|
||||
ESP_ZB_ZCL_DRLC_CLI_CMD_GET_SCHEDULED_EVENTS = 0x01, /*!< GetScheduledEvents is generated when the client device wishes to verify the
|
||||
available LoadControl events. @see esp_zb_zcl_drlc_get_scheduled_events_payload_t */
|
||||
} esp_zb_zcl_drlc_cli_cmd_t;
|
||||
|
||||
/** @brief ESP_ZB_ZCL_DRLC_SRV_CMD_LOAD_CONTROL_EVENT LoadControlEvent command payload. */
|
||||
typedef struct esp_zb_zcl_drlc_load_control_event_payload_s {
|
||||
uint32_t issuer_event_id; /*!< Unique identifier generated by the Energy provider.
|
||||
The value of this field allows matching of Event
|
||||
reports with a specific Demand Response and Load
|
||||
Control event. */
|
||||
uint16_t device_class; /*!< Bit encoded field representing the Device Class to apply
|
||||
the current Load Control Event.Each bit, if set individually
|
||||
or in combination, indicates the class device(s) needing to
|
||||
participate in the event. */
|
||||
uint8_t utility_enrollment_group; /*!< This field can be used in conjunction with the Device
|
||||
Class bits for providing a mechanism to direct Load
|
||||
Control Events to groups of Devices. */
|
||||
uint32_t start_time; /*!< UTC Timestamp representing when the event is scheduled to start.
|
||||
A start time of 0x00000000 is a special time denoting now. */
|
||||
uint16_t duration_in_minutes; /*!< Duration of this event in number of minutes. Maximum value is
|
||||
1440 (one day). */
|
||||
uint8_t criticality_level; /*!< This field defines the level of criticality of event. The action
|
||||
for an event can be solely based on this value, or combination with
|
||||
other Load Control Event fields. */
|
||||
uint8_t cooling_temperature_offset; /*!< Requested offset to apply to the normal cooling setpoint at the
|
||||
time of the start of the event in + 0.1 Celsius. */
|
||||
uint8_t heating_temperature_offset; /*!< Requested offset to apply to the normal heating setpoint at the
|
||||
time of the start of the event in + 0.1 Celsius.*/
|
||||
int16_t cooling_temperature_set_point; /*!< Requested cooling set point in 0.01 degrees Celsius. */
|
||||
int16_t heating_temperature_set_point; /*!< Requested heating set point in 0.01 degrees Celsius. */
|
||||
int8_t average_load_adjustment_percentage;/*!< Defines a maximum energy usage limit as a percentage of
|
||||
the client implementations specific average energy usage. */
|
||||
uint8_t duty_cycle; /*!< Defines the maximum on state duty cycle as a percentage of
|
||||
time. */
|
||||
uint8_t event_control; /*!< Identifies additional control options for the event. */
|
||||
} esp_zb_zcl_drlc_load_control_event_payload_t;
|
||||
|
||||
/** @brief ESP_ZB_ZCL_DRLC_SRV_CMD_CANCEL_LOAD_CONTROL_EVENT CancelLoadControlEvent command payload. */
|
||||
typedef struct esp_zb_zcl_drlc_cancel_load_control_event_payload_s {
|
||||
uint32_t issuer_event_id; /*!< Unique identifier generated by the Energy provider.
|
||||
The value of this field allows matching of Event reports
|
||||
with a specific Demand Response and Load Control event. */
|
||||
uint16_t device_class; /*!< Bit encoded field representing the Device Class to apply
|
||||
the current Load Control Event. Each bit, if set individually
|
||||
or in combination, indicates the class device(s) needing to
|
||||
participate in the event. */
|
||||
uint8_t utility_enrollment_group; /*!< This field can be used in conjunction with the Device Class bits
|
||||
for providing a mechanism to direct Load Control Events to groups
|
||||
of Devices. */
|
||||
uint8_t cancel_control; /*!< This field is used to indicate that the Event is currently in process
|
||||
and a cancel command is received */
|
||||
uint32_t effective_time; /*!< UTC Timestamp representing when the canceling of the event is
|
||||
scheduled to start. An effective time of 0x00000000 is a special time
|
||||
denoting “now.” */
|
||||
} esp_zb_zcl_drlc_cancel_load_control_event_payload_t;
|
||||
|
||||
/** @brief ESP_ZB_ZCL_DRLC_SRV_CMD_CANCEL_ALL_LOAD_CONTROL_EVENTS CancelAllLoadControlEvents command payload. */
|
||||
typedef struct esp_zb_zcl_drlc_cancel_all_load_control_events_payload_s {
|
||||
uint8_t cancel_control; /*!< To be used when the Event is currently in process and a cancel command is received.
|
||||
0x00: indicates that randomization is overridden and the event should be terminated immediately.
|
||||
0x01: indicates the event should end using randomization settings in the original event.
|
||||
Otherwise, reserved. */
|
||||
} esp_zb_zcl_drlc_cancel_all_load_control_events_payload_t;
|
||||
|
||||
/** @brief ESP_ZB_ZCL_DRLC_CLI_CMD_REPORT_EVENT_STATUS ReportEventStatus command payload */
|
||||
typedef struct esp_zb_zcl_drlc_report_event_status_payload_s {
|
||||
uint32_t issuer_event_id; /*!< Unique identifier generated by the Energy provider.
|
||||
The value of this field allows matching of Event reports
|
||||
with a specific Demand Response and Load Control event. */
|
||||
uint8_t event_status; /*!< This field stores value from set of event statuses*/
|
||||
uint32_t event_status_time; /*!< UTC Timestamp representing when the event status occurred.
|
||||
This field shall not use the value of 0x00000000 */
|
||||
uint8_t criticality_level_applied; /*!< Criticality Level value applied by the device */
|
||||
uint16_t cooling_temperature_set_point_applied; /*!< Defines Cooling Temperature Set Point value applied by the
|
||||
device. The value 0x8000 means that this field has not been
|
||||
used by the end device. */
|
||||
uint16_t heating_temperature_set_point_applied; /*!< Defines Heating Temperature Set Point value applied by the
|
||||
device. The value 0x8000 means that this field has not been
|
||||
used by the end device. */
|
||||
int8_t average_load_adjustment_percentage_applied; /*!< Defines Average Load Adjustment Percentage value applied by
|
||||
the device. The value 0x80 means that this field has not been
|
||||
used by the end device. */
|
||||
uint8_t duty_cycle_applied; /*!< Defines the maximum on state duty cycle applied by the device.
|
||||
The value 0xFF means that this field has not been used by the
|
||||
end device. */
|
||||
uint8_t event_control; /*!< Identifies additional control options for the event. */
|
||||
uint8_t signature_type; /*!< This field is used to enumerate the type of algorithm use to
|
||||
create the signature.*/
|
||||
uint8_t signature[42]; /*!< A non-repudiation signature created by using the Matyas-Meyer-Oseas
|
||||
hash function used in conjunction with ECDSA. */
|
||||
} esp_zb_zcl_drlc_report_event_status_payload_t;
|
||||
|
||||
/** @brief ESP_ZB_ZCL_DRLC_CLI_CMD_GET_SCHEDULED_EVENTS GetScheduledEvents command payload */
|
||||
typedef struct esp_zb_zcl_drlc_get_scheduled_events_payload_s {
|
||||
uint32_t start_time; /*!< UTC Timestamp representing the minimum Start Time of events that shall be matched and
|
||||
sent by the Server. A Start Time of 0x00000000 has no special meaning. */
|
||||
uint8_t number_of_events; /*!< Represents the maximum number of events to be sent. A value of 0 indicates no maximum
|
||||
limit. */
|
||||
uint32_t issuer_event_id; /*!< Represents the minimum Issuer Event ID of events to be matched and sent by the server
|
||||
with the same Start Time as the Get Scheduled Events command. A value of 0xFFFFFFFF
|
||||
indicates this field will not be used. */
|
||||
} esp_zb_zcl_drlc_get_scheduled_events_payload_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief EC_Measurement cluster server attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_EC_MEASUREMENT_MEASURED_VALUE_ID = 0x0000, /**< MeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_EC_MEASUREMENT_MIN_MEASURED_VALUE_ID = 0x0001, /**< MinMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_EC_MEASUREMENT_MAX_MEASURED_VALUE_ID = 0x0002, /**< MaxMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_EC_MEASUREMENT_TOLERANCE_ID = 0x0003, /**< Tolerance Attribute */
|
||||
} esp_zb_zcl_ec_measurement_srv_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM ((uint16_t)0xfffd)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM ((uint16_t)0x0001)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM ((uint16_t)0xfffe)
|
||||
|
||||
/** @brief Minimum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_TOLERANCE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_TOLERANCE_MAXIMUM ((uint16_t)0x0064)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_EC_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
void esp_zb_zcl_ec_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_EC_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_ec_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_EC_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,217 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Electrical Measurement cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASUREMENT_TYPE_ID = 0x0000, /*!< This attribute indicates a device s measurement capabilities. */
|
||||
/* DC Measurement */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_VOLTAGE_ID = 0x0100, /*!< The DCVoltage attribute represents the most recent DC voltage reading in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_VOLTAGE_MIN_ID = 0x0101, /*!< The DCVoltageMin attribute represents the lowest DC voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_VOLTAGE_MAX_ID = 0x0102, /*!< The DCVoltageMax attribute represents the highest DC voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_CURRENT_ID = 0x0103, /*!< The DCCurrent attribute represents the most recent DC current reading in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_CURRENT_MIN_ID = 0x0104, /*!< The DCCurrentMin attribute represents the lowest DC current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_CURRENT_MAX_ID = 0x0105, /*!< The DCCurrentMax attribute represents the highest DC current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DCPOWER_ID = 0x0106, /*!< The @e DCPower attribute represents the most recent DC power reading in @e Watts (W) */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_POWER_MIN_ID = 0x0107, /*!< The DCPowerMin attribute represents the lowest DC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_POWER_MAX_ID = 0x0108, /*!< The DCPowerMax attribute represents the highest DC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_VOLTAGE_MULTIPLIER_ID = 0x0200, /*!< The DCVoltageMultiplier provides a value to be multiplied against the DCVoltage, DCVoltageMin, and DCVoltageMax attributes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_VOLTAGE_DIVISOR_ID = 0x0201, /*!< The DCVoltageDivisor provides a value to be divided against the DCVoltage, DCVoltageMin, and DCVoltageMax attributes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_CURRENT_MULTIPLIER_ID = 0x0202, /*!< The DCCurrentMultiplier provides a value to be multiplied against the DCCurrent, DCCurrentMin, and DCCurrentMax attributes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_CURRENT_DIVISOR_ID = 0x0203, /*!< The DCCurrentDivisor provides a value to be divided against the DCCurrent, DCCurrentMin, and DCCurrentMax attributes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_POWER_MULTIPLIER_ID = 0x0204, /*!< The DCPowerMultiplier provides a value to be multiplied against the DCPower, DCPowerMin, and DCPowerMax attributes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_POWER_DIVISOR_ID = 0x0205, /*!< The DCPowerDivisor provides a value to be divided against the DCPower, DCPowerMin, and DCPowerMax attributes. */
|
||||
/* AC Measurement (Non Phase) */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_FREQUENCY_ID = 0x0300, /*!< The ACFrequency attribute represents the most recent AC Frequency reading in Hertz (Hz). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_FREQUENCY_MIN_ID = 0x0301, /*!< The ACFrequencyMin attribute represents the lowest AC Frequency value measured in Hertz (Hz). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_FREQUENCY_MAX_ID = 0x0302, /*!< The ACFrequencyMax attribute represents the highest AC Frequency value measured in Hertz (Hz). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_NEUTRAL_CURRENT_ID = 0x0303, /*!< The NeutralCurrent attribute represents the AC neutral (Line-Out) current value at the moment in time the attribute is read, in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_TOTAL_ACTIVE_POWER_ID = 0x0304, /*!< Active power represents the current demand of active power delivered or received at the premises, in @e kW */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_TOTAL_REACTIVE_POWER_ID = 0x0305, /*!< Reactive power represents the current demand of reactive power delivered or received at the premises, in kVAr. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_TOTAL_APPARENT_POWER_ID = 0x0306, /*!< Represents the current demand of apparent power, in @e kVA */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED1ST_HARMONIC_CURRENT_ID = 0x0307, /*!< Attribute represent the most recent 1st harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED3RD_HARMONIC_CURRENT_ID = 0x0308, /*!< Attribute represent the most recent 3rd harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED5TH_HARMONIC_CURRENT_ID = 0x0309, /*!< Attribute represent the most recent 5th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED7TH_HARMONIC_CURRENT_ID = 0x030a, /*!< Attribute represent the most recent 7th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED9TH_HARMONIC_CURRENT_ID = 0x030b, /*!< Attribute represent the most recent 9th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED11TH_HARMONIC_CURRENT_ID = 0x030c, /*!< Attribute represent the most recent 11th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED_PHASE1ST_HARMONIC_CURRENT_ID = 0x030d, /*!< Attribute represent the most recent phase of the 1st harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED_PHASE3RD_HARMONIC_CURRENT_ID = 0x030e, /*!< Attribute represent the most recent phase of the 3rd harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED_PHASE5TH_HARMONIC_CURRENT_ID = 0x030f, /*!< Attribute represent the most recent phase of the 5th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED_PHASE7TH_HARMONIC_CURRENT_ID = 0x0310, /*!< Attribute represent the most recent phase of the 7th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED_PHASE9TH_HARMONIC_CURRENT_ID = 0x0311, /*!< Attribute represent the most recent phase of the 9th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_MEASURED_PHASE11TH_HARMONIC_CURRENT_ID = 0x0312, /*!< Attribute represent the most recent phase of the 11th harmonic current reading in an AC frequency. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_FREQUENCY_MULTIPLIER_ID = 0x0400, /*!< Provides a value to be multiplied against the ACFrequency attribute. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_FREQUENCY_DIVISOR_ID = 0x0401, /*!< Provides a value to be divided against the ACFrequency attribute. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_POWER_MULTIPLIER_ID = 0x0402, /*!< Provides a value to be multiplied against a raw or uncompensated sensor count of power being measured by the metering device. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_POWER_DIVISOR_ID = 0x0403, /*!< Provides a value to divide against the results of applying the @e Multiplier attribute against a raw or uncompensated sensor count of power being measured by the metering device. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_HARMONIC_CURRENT_MULTIPLIER_ID = 0x0404, /*!< Represents the unit value for the MeasuredNthHarmonicCurrent attribute in the format MeasuredNthHarmonicCurrent * 10 ^ HarmonicCurrentMultiplier amperes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_PHASE_HARMONIC_CURRENT_MULTIPLIER_ID = 0x0405, /*!< Represents the unit value for the MeasuredPhaseNthHarmonicCurrent attribute in the format MeasuredPhaseNthHarmonicCurrent * 10 ^ PhaseHarmonicCurrentMultiplier degrees. */
|
||||
/* AC Measurement (Phase A)*/
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_LINE_CURRENT_ID = 0x0501, /*!< Represents the single phase or Phase A, AC line current (Square root of active and reactive current) value at the moment in time the attribute is read, in @e Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_CURRENT_ID = 0x0502, /*!< Represents the single phase or Phase A, AC active/resistive current value at the moment in time the attribute is read, in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_REACTIVE_CURRENT_ID = 0x0503, /*!< Represents the single phase or Phase A, AC reactive current value at the moment in time the attribute is read, in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMSVOLTAGE_ID = 0x0505, /*!< Represents the most recent RMS voltage reading in @e Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_MIN_ID = 0x0506, /*!< Represents the lowest RMS voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_MAX_ID = 0x0507, /*!< Represents the highest RMS voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMSCURRENT_ID = 0x0508, /*!< Represents the most recent RMS current reading in @e Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_CURRENT_MIN_ID = 0x0509, /*!< Represents the lowest RMS current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_CURRENT_MAX_ID = 0x050a, /*!< Represents the highest RMS current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_ID = 0x050B, /*!< Represents the single phase or Phase A, current demand of active power delivered or received at the premises, in @e Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_MIN_ID = 0x050c, /*!< Represents the lowest AC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_MAX_ID = 0x050d, /*!< Represents the highest AC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_REACTIVE_POWER_ID = 0x050e, /*!< Represents the single phase or Phase A, current demand of reactive power delivered or received at the premises, in VAr. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_APPARENT_POWER_ID = 0x050F, /*!< Represents the single phase or Phase A, current demand of apparent (Square root of active and reactive power) power, in @e VA. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_POWER_FACTOR_ID = 0x0510, /*!< Contains the single phase or PhaseA, Power Factor ratio in 1/100th. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMSVOLTAGE_MEASUREMENT_PERIOD_ID = 0x0511, /*!< The Period in seconds that the RMS voltage is averaged over. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_OVER_VOLTAGE_COUNTER_ID = 0x0512, /*!< The number of times the average RMS voltage, has been above the AverageRMS OverVoltage threshold since last reset. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ID = 0x0513, /*!< The number of times the average RMS voltage, has been below the AverageRMS underVoltage threshold since last reset. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_OVER_VOLTAGE_PERIOD_ID = 0x0514, /*!< The duration in seconds used to measure an extreme over voltage condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ID = 0x0515, /*!< The duration in seconds used to measure an extreme under voltage condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SAG_PERIOD_ID = 0x0516, /*!< The duration in seconds used to measure a voltage sag condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SWELL_PERIOD_ID = 0x0517, /*!< The duration in seconds used to measure a voltage swell condition. */
|
||||
/* AC Formatting */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACVOLTAGE_MULTIPLIER_ID = 0x0600, /*!< Provides a value to be multiplied against the @e InstantaneousVoltage and RMSVoltage attributes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACVOLTAGE_DIVISOR_ID = 0x0601, /*!< Provides a value to be divided against the @e InstantaneousVoltage */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACCURRENT_MULTIPLIER_ID = 0x0602, /*!< Provides a value to be multiplied against the @e InstantaneousCurrent and @e RMSCurrent attributes */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACCURRENT_DIVISOR_ID = 0x0603, /*!< Provides a value to be divided against the @e ACCurrent, @e InstantaneousCurrent and @e RMSCurrent attributes. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACPOWER_MULTIPLIER_ID = 0x0604, /*!< Provides a value to be multiplied against the @e InstantaneousPower and @e ActivePower attributes */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACPOWER_DIVISOR_ID = 0x0605, /*!< Provides a value to be divided against the @e InstantaneousPower and @e ActivePower attributes. */
|
||||
/* DC Manufacturer Threshold Alarms */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_OVERLOAD_ALARMS_MASK_ID = 0x0700, /*!< Specifies which configurable alarms may be generated. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_VOLTAGE_OVERLOAD_ID = 0x0701, /*!< Specifies the alarm threshold, set by the manufacturer, for the maximum output voltage supported by device. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_DC_CURRENT_OVERLOAD_ID = 0x0702, /*!< Specifies the alarm threshold, set by the manufacturer, for the maximum output current supported by device. */
|
||||
/* AC Manufacturer Threshold Alarms */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_ALARMS_MASK_ID = 0x0800, /*!< Specifies which configurable alarms may be generated. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_VOLTAGE_OVERLOAD_ID = 0x0801, /*!< Specifies the alarm threshold, set by the manufacturer, for the maximum output voltage supported by device. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_CURRENT_OVERLOAD_ID = 0x0802, /*!< Specifies the alarm threshold, set by the manufacturer, for the maximum output current supported by device. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_ACTIVE_POWER_OVERLOAD_ID = 0x0803, /*!< Specifies the alarm threshold, set by the manufacturer, for the maximum output active power supported by device. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AC_REACTIVE_POWER_OVERLOAD_ID = 0x0804, /*!< Specifies the alarm threshold, set by the manufacturer, for the maximum output reactive power supported by device. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_OVER_VOLTAGE_ID = 0x0805, /*!< The average RMS voltage above which an over voltage condition is reported. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_UNDER_VOLTAGE_ID = 0x0806, /*!< The average RMS voltage below which an under voltage condition is reported. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_OVER_VOLTAGE_ID = 0x0807, /*!< The RMS voltage above which an extreme under voltage condition is reported. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_UNDER_VOLTAGE_ID = 0x0808, /*!< The RMS voltage below which an extreme under voltage condition is reported. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SAG_ID = 0x0809, /*!< The RMS voltage below which a sag condition is reported. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SWELL_ID = 0x080a, /*!< The RMS voltage above which a swell condition is reported. */
|
||||
/* AC Measurement (Phase B)*/
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_LINE_CURRENT_PH_B_ID = 0x0901, /*!< Represents the Phase B, AC line current (Square root sum of active and reactive currents) value at the moment in time the attribute is read, in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_CURRENT_PH_B_ID = 0x0902, /*!< Represents the Phase B, AC active/resistive current value at the moment in time */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_REACTIVE_CURRENT_PH_B_ID = 0x0903, /*!< Represents the Phase B, AC reactive current value at the moment in time the */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMSVOLTAGE_PHB_ID = 0x0905, /*!< Represents the most recent RMS voltage reading in @e Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_MIN_PH_B_ID = 0x0906, /*!< Represents the lowest RMS voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_MAX_PH_B_ID = 0x0907, /*!< Represents the highest RMS voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMSCURRENT_PHB_ID = 0x0908, /*!< Represents the most recent RMS current reading in @e Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_CURRENT_MIN_PH_B_ID = 0x0909, /*!< Represents the lowest RMS current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_CURRENT_MAX_PH_B_ID = 0x090a, /*!< Represents the highest RMS current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_PHB_ID = 0x090B, /*!< Represents the Phase B, current demand of active power delivered or received at the premises, in @e Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_MIN_PH_B_ID = 0x090c, /*!< Represents the lowest AC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_MAX_PH_B_ID = 0x090d, /*!< Represents the highest AC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_REACTIVE_POWER_PH_B_ID = 0x090e, /*!< Represents the Phase B, current demand of reactive power delivered or received at the premises, in VAr. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_APPARENT_POWER_PHB_ID = 0x090F, /*!< Represents the Phase B, current demand of apparent (Square root of active and reactive power) power, in @e VA. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_POWER_FACTOR_PH_B_ID = 0x0910, /*!< Contains the PhaseB, Power Factor ratio in 1/100th. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMSVOLTAGE_MEASUREMENT_PERIOD_PHB_ID = 0x0911, /*!< The number of times the average RMS voltage, has been above the @e AverageRMS @e OverVoltage threshold since last reset. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PH_B_ID = 0x0912, /*!< The number of times the average RMS voltage, has been above the AverageRMS OverVoltage threshold since last reset. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PH_B_ID = 0x0913, /*!< The number of times the average RMS voltage, has been below the AverageRMS underVoltage threshold since last reset. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_OVER_VOLTAGE_PERIOD_PH_B_ID = 0x0914, /*!< The duration in seconds used to measure an extreme over voltage condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PH_B_ID = 0x0915, /*!< The duration in seconds used to measure an extreme under voltage condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SAG_PERIOD_PH_B_ID = 0x0916, /*!< The duration in seconds used to measure a voltage sag condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SWELL_PERIOD_PH_B_ID = 0x0917, /*!< The duration in seconds used to measure a voltage swell condition. */
|
||||
/* AC Measurement (Phase C)*/
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_LINE_CURRENT_PH_C_ID = 0x0a01, /*!< Represents the Phase C, AC line current (Square root of active and reactive current) value at the moment in time the attribute is read, in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_CURRENT_PH_C_ID = 0x0a02, /*!< Represents the Phase C, AC active/resistive current value at the moment in time the attribute is read, in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_REACTIVE_CURRENT_PH_C_ID = 0x0a03, /*!< Represents the Phase C, AC reactive current value at the moment in time the attribute is read, in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMSVOLTAGE_PHC_ID = 0x0A05, /*!< Represents the most recent RMS voltage reading in @e Volts (V).*/
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_MIN_PH_C_ID = 0x0a06, /*!< Represents the lowest RMS voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_MAX_PH_C_ID = 0x0a07, /*!< Represents the highest RMS voltage value measured in Volts (V). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMSCURRENT_PHC_ID = 0x0A08, /*!< Represents the most recent RMS current reading in @e Amps (A).*/
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_CURRENT_MIN_PH_C_ID = 0x0a09, /*!< Represents the lowest RMS current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_CURRENT_MAX_PH_C_ID = 0x0a0a, /*!< Represents the highest RMS current value measured in Amps (A). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_PHC_ID = 0x0A0B, /*!< Represents the Phase C, current demand of active power delivered or received at the premises, in @e Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_MIN_PH_C_ID = 0x0a0c, /*!< Represents the lowest AC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_ACTIVE_POWER_MAX_PH_C_ID = 0x0a0d, /*!< Represents the highest AC power value measured in Watts (W). */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_REACTIVE_POWER_PH_C_ID = 0x0a0e, /*!< Represents the Phase C, current demand of reactive power delivered or received at the premises, in VAr. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_APPARENT_POWER_PHC_ID = 0x0A0F, /*!< Represents the Phase C, current demand of apparent (Square root of active and reactive power) power, in @e VA. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_POWER_FACTOR_PH_C_ID = 0x0a10, /*!< Contains the Phase C, Power Factor ratio in 1/100th. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMSVOLTAGE_MEASUREMENT_PERIOD_PHC_ID = 0x0A11, /*!< The Period in seconds that the RMS voltage is averaged over*/
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PH_C_ID = 0x0a12, /*!< The number of times the average RMS voltage, has been above the AverageRMS OverVoltage threshold since last reset. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PH_C_ID = 0x0a13, /*!< The number of times the average RMS voltage, has been below the AverageRMS underVoltage threshold since last reset. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_OVER_VOLTAGE_PERIOD_PH_C_ID = 0x0a14, /*!< The duration in seconds used to measure an extreme over voltage condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PH_C_ID = 0x0a15, /*!< The duration in seconds used to measure an extreme under voltage condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SAG_PERIOD_PH_C_ID = 0x0a16, /*!< The duration in seconds used to measure a voltage sag condition. */
|
||||
ESP_ZB_ZCL_ATTR_ELECTRICAL_MEASUREMENT_RMS_VOLTAGE_SWELL_PERIOD_PH_C_ID = 0x0a17, /*!< The duration in seconds used to measure a voltage swell condition. */
|
||||
}esp_zb_zcl_electrical_measurement_attr_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_ACTIVE_MEASUREMENT = 0x00000001, /*!< Active Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_REACTIVE_MEASUREMENT = 0x00000002, /*!< Reactive Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_APPARENT_MEASUREMENT = 0x00000004, /*!< Apparent Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PHASE_A_MEASUREMENT = 0x00000008, /*!< Phase A Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PHASE_B_MEASUREMENT = 0x00000010, /*!< Phase B Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PHASE_C_MEASUREMENT = 0x00000020, /*!< Phase C Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_DC_MEASUREMENT = 0x00000040, /*!< DC Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_HARMONIC_MEASUREMENT = 0x00000080, /*!< Harmonic Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_POWER_QUALITY_MEASUREMENT = 0x00000100, /*!< Power Quality Measurement bit */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_RESERVED = 0x00000200
|
||||
}esp_zb_zcl_electrical_measurement_measurement_type_t;
|
||||
|
||||
|
||||
typedef enum{
|
||||
ESP_ZB_ZCL_CMD_ELECTRICAL_MEASUREMENT_GET_PROFILE_INFO_RESPONSE_COMMAND = 0x00, /*!< This command is generated when the Client command GetProfileInfo is received. */
|
||||
ESP_ZB_ZCL_CMD_ELECTRICAL_MEASUREMENT_GET_MEASUREMENT_PROFILE_RESPONSE_COMMAND = 0x01, /*!< This command is generated when the Client command GetMeasurementProfile is received. */
|
||||
}esp_zb_zcl_electrical_measurement_srv_cmd_t;
|
||||
|
||||
typedef enum{
|
||||
ESP_ZB_ZCL_CMD_ELECTRICAL_MEASUREMENT_GET_PROFILE_INFO_COMMAND = 0x00, /*!< Get Profile Info Command */
|
||||
ESP_ZB_ZCL_CMD_ELECTRICAL_MEASUREMENT_GET_MEASUREMENT_PROFILE_COMMAND = 0x01, /*!< Get Measurement Profile Command */
|
||||
}esp_zb_zcl_electrical_measurement_cli_cmd_t;
|
||||
|
||||
typedef enum{
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_DAILY = 0x00, /*!< Represents the daily interval or time frame used to capture parameter for profiling purposes */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_60MINS = 0x01, /*!< Represents the 60 minutes interval or time frame used to capture parameter for profiling purposes */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_30MINS = 0x02, /*!< Represents the 30 minutes interval or time frame used to capture parameter for profiling purposes */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_15MINS = 0x03, /*!< Represents the 15 minutes interval or time frame used to capture parameter for profiling purposes */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_10MINS = 0x04, /*!< Represents the 10 minutes interval or time frame used to capture parameter for profiling purposes */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_7_5MINS = 0x05, /*!< Represents the 7.5 minutes interval or time frame used to capture parameter for profiling purposes */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_5MINS = 0x06, /*!< Represents the 5 minutes interval or time frame used to capture parameter for profiling purposes */
|
||||
ESP_ZB_ZCL_ELECTRICAL_MEASUREMENT_PROFILE_INTERVAL_PERIOD_2_5MINS = 0x07, /*!< Represents the 2.5 minutes interval or time frame used to capture parameter for profiling purposes */
|
||||
}esp_zb_zcl_electrical_measurement_profile_interval_period_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee electrical measurement cluster profile information command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_electrical_measurement_profile_info_s {
|
||||
uint8_t count; /*!< The counter for response command */
|
||||
esp_zb_zcl_electrical_measurement_profile_interval_period_t interval_period; /*!< The Profile interval period for profile information response command */
|
||||
uint8_t max_number_of_intervals; /*!< The Profile max number of intervals for profile information response command */
|
||||
uint16_t attributes_size; /*!< The Profile attributes size for profile information response command */
|
||||
uint16_t *attributes_list; /*!< The Profile attributes list for profile information response command */
|
||||
}esp_zb_electrical_measurement_profile_info_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee electrical measurement cluster profile command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_electrical_measurement_profile_s {
|
||||
uint32_t start_time; /*!< The start time for profile response command */
|
||||
uint32_t status; /*!< The status for profile response command */
|
||||
uint32_t interval_period; /*!< The interval period for profile response command */
|
||||
uint8_t interval_delivered_number; /*!< The interval delivered number for profile response command */
|
||||
uint8_t attributes_id; /*!< The interval attributes id for profile response command */
|
||||
void *intervals; /*!< The array of atttibute values intervals id for profile response command */
|
||||
}esp_zb_electrical_measurement_profile_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Fan Control cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_FAN_CONTROL_FAN_MODE_ID = 0x0000, /*!< Fan mode attribute */
|
||||
ESP_ZB_ZCL_ATTR_FAN_CONTROL_FAN_MODE_SEQUENCE_ID = 0x0001 /*!< Fan mode sequence attribute */
|
||||
} esp_zb_zcl_fan_control_attr_t;
|
||||
|
||||
/** @brief Values for Fan Mode attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_OFF = 0x00, /*! Off value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_LOW = 0x01, /*! Low value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_MEDIUM = 0x02, /*! Medium value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_HIGH = 0x03, /*! High value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_ON = 0x04, /*! On value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_AUTO = 0x05, /*! Auto value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_SMART = 0x06, /*! Smart value */
|
||||
} esp_zb_zcl_fan_control_fan_mode_t;
|
||||
|
||||
/** @brief Values for Fan Mode Sequence attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_LOW_MED_HIGH = 0x00, /*! Low/Med/High value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_LOW_HIGH = 0x01, /*! Low/High value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_LOW_MED_HIGH_AUTO = 0x02, /*! Low/Med/High/Auto value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_LOW_HIGH_AUTO = 0x03, /*! Low/High/Auto value */
|
||||
ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_ON_AUTO = 0x04, /*! On/Auto value */
|
||||
} esp_zb_zcl_fan_control_fan_mode_sequence_t;
|
||||
|
||||
/** @brief Default value for Fan Mode attribute */
|
||||
#define ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_DEFAULT_VALUE 0x05
|
||||
|
||||
/** @brief Default value for Fan Mode attribute */
|
||||
#define ESP_ZB_ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_DEFAULT_VALUE 0x02
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Flow measurement cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_FLOW_MEASUREMENT_VALUE_ID = 0x0000, /*!< MeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_FLOW_MEASUREMENT_MIN_VALUE_ID = 0x0001, /*!< MinMeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_FLOW_MEASUREMENT_MAX_VALUE_ID = 0x0002, /*!< MaxMeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_FLOW_MEASUREMENT_TOLERANCE_ID = 0x0003, /*!< Tolerance attribute */
|
||||
} esp_zb_zcl_flow_measurement_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM ((uint16_t)0xfffd)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM ((uint16_t)0x0001)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM ((uint16_t)0xffff)
|
||||
|
||||
/** @brief Minimum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_TOLERANCE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_TOLERANCE_MAXIMUM ((uint16_t)0x0800)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_FLOW_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
void esp_zb_zcl_flow_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_FLOW_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_flow_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_FLOW_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
#include "zgp/esp_zigbee_zgp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief The enumeration for attributes of the Zigbee Green Power cluster
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zgp_gp_attr_e {
|
||||
ESP_ZB_ZCL_ATTR_GPS_MAX_SINK_TABLE_ENTRIES_ID = 0x0000, /*!< Maximum number of Sink Table entries supported by this device */
|
||||
ESP_ZB_ZCL_ATTR_GPS_SINK_TABLE_ID = 0x0001, /*!< Sink Table, holding information about local bindings between a particular GPD and target‘s local endpoints */
|
||||
ESP_ZB_ZCL_ATTR_GPS_COMMUNICATION_MODE_ID = 0x0002, /*!< Default communication mode requested by this GPS */
|
||||
ESP_ZB_ZCL_ATTR_GPS_COMMISSIONING_EXIT_MODE_ID = 0x0003, /*!< Conditions for the GPS to exit the commissioning mode */
|
||||
ESP_ZB_ZCL_ATTR_GPS_COMMISSIONING_WINDOW_ID = 0x0004, /*!< Default duration of the Commissioning window duration, in seconds, as re- quested by this GPS */
|
||||
ESP_ZB_ZCL_ATTR_GPS_SECURITY_LEVEL_ID = 0x0005, /*!< The minimum required security level to be supported by the paired GPDs*/
|
||||
ESP_ZB_ZCL_ATTR_GPS_FUNCTIONALITY_ID = 0x0006, /*!< The optional GP functionality supported by this GPS */
|
||||
ESP_ZB_ZCL_ATTR_GPS_ACTIVE_FUNCTIONALITY_ID = 0x0007, /*!< The optional GP functionality supported by this GPS that is active */
|
||||
ESP_ZB_ZCL_ATTR_GPP_MAX_PROXY_TABLE_ENTRIES_ID = 0x0010, /*!< Maximum number of Proxy Table entries supported by this device */
|
||||
ESP_ZB_ZCL_ATTR_GPP_PROXY_TABLE_ID = 0x0011, /*!< Proxy Table, holding information about pairings between a particular GPD ID and GPSs in the network*/
|
||||
ESP_ZB_ZCL_ATTR_GPP_NOTIFICATION_RETRY_NUMBER_ID = 0x0012, /*!< Number of unicast GP Notification retries on lack of GP Notification Response */
|
||||
ESP_ZB_ZCL_ATTR_GPP_NOTIFICATION_RETRY_TIMER_ID = 0x0013, /*!< Time in ms between unicast GP Notification retries on lack of GP Notification Response */
|
||||
ESP_ZB_ZCL_ATTR_GPP_MAX_SEARCH_COUNTER_ID = 0x0014, /*!< The frequency of sink re-discovery for inactive Proxy Table entries */
|
||||
ESP_ZB_ZCL_ATTR_GPP_BLOCKED_GPDID_ID = 0x0015, /*!< A list holding information about blocked GPD IDs*/
|
||||
ESP_ZB_ZCL_ATTR_GPP_FUNCTIONALITY_ID = 0x0016, /*!< The optional GP functionality supported by this GPP */
|
||||
ESP_ZB_ZCL_ATTR_GPP_ACTIVE_FUNCTIONALITY_ID = 0x0017, /*!< The optional GP functionality supported by this GPP that is active */
|
||||
ESP_ZB_ZCL_ATTR_GP_SHARED_SECURITY_KEY_TYPE_ID = 0x0020, /*!< The security key type to be used for the communication with all paired 0b11 GPD in this network */
|
||||
ESP_ZB_ZCL_ATTR_GP_SHARED_SECURITY_KEY_ID = 0x0021, /*!< The security key to be used for the communication with all paired GPD in this network */
|
||||
ESP_ZB_ZCL_ATTR_GP_LINK_KEY_ID = 0x0022 /*!< The security key to be used to encrypt the key exchanged with the GPD */
|
||||
} esp_zgp_gp_attr_t;
|
||||
|
||||
/**
|
||||
* @brief Green power server command
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zgp_server_commands_e {
|
||||
ESP_ZGP_SERVER_CMD_GP_NOTIFICATION = 0x00,
|
||||
ESP_ZGP_SERVER_CMD_GP_PAIRING_SEARCH = 0x01,
|
||||
ESP_ZGP_SERVER_CMD_GP_TUNNELING_STOP = 0x03,
|
||||
ESP_ZGP_SERVER_CMD_GP_COMMISSIONING_NOTIFICATION = 0x04,
|
||||
ESP_ZGP_SERVER_CMD_GP_SINK_COMMISSIONING_MODE = 0x05,
|
||||
ESP_ZGP_SERVER_CMD_GP_TRANSLATION_TABLE_UPDATE_COMMAND = 0x07,
|
||||
ESP_ZGP_SERVER_CMD_GP_TRANSLATION_TABLE_REQUEST = 0x08,
|
||||
ESP_ZGP_SERVER_CMD_GP_PAIRING_CONFIGURATION = 0x09,
|
||||
ESP_ZGP_SERVER_CMD_GP_SINK_TABLE_REQUEST = 0x0a,
|
||||
ESP_ZGP_SERVER_CMD_GP_PROXY_TABLE_RESPONSE = 0x0b
|
||||
} esp_zgp_server_commands_t;
|
||||
|
||||
/**
|
||||
* @brief Green power client command
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zgp_client_commands_e {
|
||||
ESP_ZGP_CLIENT_CMD_GP_NOTIFICATION_RESPONSE = 0x00,
|
||||
ESP_ZGP_CLIENT_CMD_GP_PAIRING = 0x01,
|
||||
ESP_ZGP_CLIENT_CMD_GP_PROXY_COMMISSIONING_MODE = 0x02,
|
||||
ESP_ZGP_CLIENT_CMD_GP_RESPONSE = 0x06,
|
||||
ESP_ZGP_CLIENT_CMD_GP_SINK_TABLE_RESPONSE = 0x0a,
|
||||
ESP_ZGP_CLIENT_CMD_GP_PROXY_TABLE_REQUEST = 0x0b
|
||||
} esp_zgp_client_commands_t;
|
||||
|
||||
/**
|
||||
* @brief The Action sub-field of the zgp pairing configuration
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zgp_pairing_config_action_e {
|
||||
ESP_ZGP_PAIRING_CONFIG_NO_ACTION = 0xb000, /*!< No action */
|
||||
ESP_ZGP_PAIRING_CONFIG_EXTEND_SINK_TABLE_ENTRY = 0xb001, /*!< Extend Sink Table entry */
|
||||
ESP_ZGP_PAIRING_CONFIG_REPLACE_SINK_TABLE_ENTRY = 0xb010, /*!< Replace Sink Table entry */
|
||||
ESP_ZGP_PAIRING_CONFIG_REMOVE_A_PAIRING = 0xb011, /*!< Remove a pairing */
|
||||
ESP_ZGP_PAIRING_CONFIG_REMOVE_GPD = 0xb100, /*!< Remove GPD */
|
||||
} esp_zgp_pairing_config_action_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Groups cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_GROUPS_NAME_SUPPORT_ID = 0 /*!< NameSupport attribute */
|
||||
} esp_zb_zcl_groups_attr_t;
|
||||
|
||||
/** @brief Default value for groups attribute
|
||||
*/
|
||||
#define ESP_ZB_ZCL_GROUPS_NAME_SUPPORT_DEFAULT_VALUE 0x00
|
||||
|
||||
/**
|
||||
* @brief Groups cluster command identifiers.
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_GROUPS_ADD_GROUP = 0x00, /*!< Add group command identifier. */
|
||||
ESP_ZB_ZCL_CMD_GROUPS_VIEW_GROUP = 0x01, /*!< View group command identifier. */
|
||||
ESP_ZB_ZCL_CMD_GROUPS_GET_GROUP_MEMBERSHIP = 0x02, /*!< Get group membership command identifier.*/
|
||||
ESP_ZB_ZCL_CMD_GROUPS_REMOVE_GROUP = 0x03, /*!< Remove group command identifier. */
|
||||
ESP_ZB_ZCL_CMD_GROUPS_REMOVE_ALL_GROUPS = 0x04, /*!< Remove all groups command identifier. */
|
||||
ESP_ZB_ZCL_CMD_GROUPS_ADD_GROUP_IF_IDENTIFYING = 0x05 /*!< Add group if identifying command identifier. */
|
||||
} esp_zb_zcl_groups_cmd_id_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Water Content Measurement cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID = 0x0000, /*!< MeasuredValue */
|
||||
ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_MIN_VALUE_ID = 0x0001, /*!< MinMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_MAX_VALUE_ID = 0x0002, /*!< MaxMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_REL_HUMIDITY_TOLERANCE_ID = 0x0003, /*!< The Tolerance attribute SHALL indicate the magnitude of the possible error that is associated with MeasuredValue, using the same units and resolution.*/
|
||||
} esp_zb_zcl_rel_humidity_measurement_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM ((uint16_t)0x270f)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM ((uint16_t)0x0001)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM ((uint16_t)0x2710)
|
||||
|
||||
/** @brief Minimum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_TOLERANCE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_TOLERANCE_MAXIMUM ((uint16_t)0x0800)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_REL_HUMIDITY_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
void esp_zb_zcl_rel_humidity_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_rel_humidity_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,271 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Structure representation of IAS ACE Zone Table */
|
||||
typedef struct esp_zb_zcl_ias_ace_zone_table_s {
|
||||
uint8_t zone_id; /**< Zone ID */
|
||||
uint16_t zone_type; /**< Zone Type, see esp_zb_zcl_ias_zone_zonetype_t */
|
||||
esp_zb_ieee_addr_t zone_address; /**< Zone Address */
|
||||
uint8_t *zone_label; /**< The pointer to a string with Zone Label. NULL pointer means the Zone Label is not programmed */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_zone_table_t;
|
||||
|
||||
/** @brief Default value for IAS ACE cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_CLUSTER_REVISION_DEFAULT ((uint16_t)0x0001u)
|
||||
|
||||
/** @brief IAS ACE Zone Table maximum length */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH 255
|
||||
|
||||
/** @brief IAS ACE ZoneType attribute maximum value */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_ZONE_TYPE_MAX_VALUE 0xfffe
|
||||
|
||||
/** @brief IAS ACE ZoneID attribute maximum value */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_ZONE_ID_MAX_VALUE 0xfe
|
||||
|
||||
/** @brief IAS ACE ZoneID attribute default value */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_ZONE_ID_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief IAS ACE Set Zone Address default value */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_SET_ZONE_ADDRESS_DEFAULT_VALUE(ptr) (ZB_IEEE_ADDR_COPY(ptr, &g_unknown_ieee_addr))
|
||||
|
||||
/** @brief IAS Ace cluster command identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_ARM_ID = 0x00, /**< Arm command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_BYPASS_ID = 0x01, /**< Bypass command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_EMERGENCY_ID = 0x02, /**< Emergency command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_FIRE_ID = 0x03, /**< Fire command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_PANIC_ID = 0x04, /**< Panic command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_ID_MAP_ID = 0x05, /**< Get Zone ID Map command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_INFO_ID = 0x06, /**< Get Zone Information command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_PANEL_STATUS_ID = 0x07, /**< Get Panel Status command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_BYPASSED_ZONE_LIST_ID = 0x08, /**< Get Bypassed Zone List command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_STATUS_ID = 0x09, /**< Get Zone Status command */
|
||||
} esp_zb_zcl_ias_ace_cmd_t;
|
||||
|
||||
/** @brief IAS Ace cluster response command identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_ARM_RESP_ID = 0x00, /**< Arm Response command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_ID_MAP_RESP_ID = 0x01, /**< Get Zone ID Map Response command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_INFO_RESP_ID = 0x02, /**< Get Zone Information Response command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_ZONE_STATUS_CHANGED_ID = 0x03, /**< Updates ACE clients of changes to zone status recorded by the server. */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_PANEL_STATUS_CHANGED_ID = 0x04, /**< Updates ACE clients of changes to zone status recorded by the server. */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_PANEL_STATUS_RESPONSE_ID = 0x05, /**< Updates ACE clients of changes to panel status recorded by the server. */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_SET_BYPASSED_ZONE_LIST_ID = 0x06, /**< Sets the list of bypassed zones on the IAS ACE client. */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_BYPASS_RESPONSE_ID = 0x07, /**< Bypass Response command. */
|
||||
ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_STATUS_RESPONSE_ID = 0x08, /**< Get Zone Status Response Command. */
|
||||
} esp_zb_zcl_ias_ace_resp_cmd_t;
|
||||
|
||||
/******************************* Arm Command ******************************/
|
||||
|
||||
/** @brief Values of the Arm Mode */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_MODE_DISARM = 0x00, /**< Disarm */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_MODE_DAY = 0x01, /**< Arm Day/Home Zones Only */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_MODE_NIGHT = 0x02, /**< Arm Night/Sleep Zones Only */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_MODE_ALL = 0x03, /**< Arm All Zones */
|
||||
} esp_zb_zcl_ias_ace_arm_mode_t;
|
||||
|
||||
/** @brief Structure representation of Arm command */
|
||||
typedef struct esp_zb_zcl_ias_ace_arm_s {
|
||||
uint8_t arm_mode; /**< Arm Mode, see esp_zb_zcl_ias_ace_arm_mode_t */
|
||||
uint8_t arm_disarm_code[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Arm/Disarm Code */
|
||||
uint8_t zone_id; /**< Zone ID */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_arm_t;
|
||||
|
||||
/******************************* Bypass Command ******************************/
|
||||
|
||||
/** @brief Structure representation of Bypass command */
|
||||
typedef struct esp_zb_zcl_ias_ace_bypass_s {
|
||||
uint8_t length; /**< Number of Zones */
|
||||
uint8_t zone_id[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Zone ID array, see esp_zb_zcl_ias_ace_zone_table_s */
|
||||
uint8_t arm_disarm_code[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Arm/Disarm Code */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_bypass_t;
|
||||
|
||||
/******************************* Emergency Command ******************************/
|
||||
|
||||
/******************************* Fire Command ******************************/
|
||||
|
||||
/******************************* Panic Command ******************************/
|
||||
|
||||
/******************************* Get Zone ID Map command ******************************/
|
||||
|
||||
/******************************* Get Zone Information command ******************************/
|
||||
|
||||
/** @brief Structure representation of Get Zone Information command */
|
||||
typedef struct esp_zb_zcl_ias_ace_get_zone_info_s {
|
||||
uint8_t zone_id; /**< Zone ID, see @ref esp_zb_zcl_ias_ace_zone_table_s */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_info_t;
|
||||
|
||||
/******************************* Get Panel Status command ******************************/
|
||||
|
||||
/******************************* Get Bypassed Zone List command ******************************/
|
||||
|
||||
/******************************* Get Zone Status command ******************************/
|
||||
|
||||
/** @brief Structure representation of Get Zone Status command */
|
||||
typedef struct esp_zb_zcl_ias_ace_get_zone_status_s {
|
||||
uint8_t starting_zone_id; /**< Starting Zone ID, see esp_zb_zcl_ias_ace_zone_table_s */
|
||||
uint8_t max_num_zone_ids; /**< Max Number of Zone IDs Requested Field */
|
||||
uint8_t zone_status_mask_flag; /**< Zone Status Mask Flag Field */
|
||||
uint16_t zone_status_mask; /**< Zone Status Mask Field, see esp_zb_zcl_ias_zone_zonestatus_t */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_status_t;
|
||||
|
||||
/******************************* Arm Response command ******************************/
|
||||
|
||||
/** @brief Values of the Arm Notification */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ALL_ZONES_DISARMED = 0x00, /**< All Zones Disarmed */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ONLY_DAY_HOME_ZONES_ARMED = 0x01, /**< Only Day/Home Zones Armed */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ONLY_NIGHT_SLEEP_ZONES_ARMED = 0x02, /**< Only Night/Sleep Zones Armed */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ALL_ZONES_ARMED = 0x03, /**< All Zones Armed */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_INVALID_ARM_DISARM_CODE = 0x04, /**< Invalid Arm/Disarm Code */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_NOT_READY_TO_ARM = 0x05, /**< Not ready to arm */
|
||||
ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ALREADY_DISARMED = 0x06, /**< Already disarmed */
|
||||
} esp_zb_zcl_ias_ace_arm_notif_t;
|
||||
|
||||
/** @brief Structure representation of Arm Response command */
|
||||
typedef struct esp_zb_zcl_ias_ace_arm_resp_s {
|
||||
uint8_t arm_notification; /**< Arm Notification, see esp_zb_zcl_ias_ace_arm_notif_t */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_arm_resp_t;
|
||||
|
||||
/******************************* Get Zone ID Map Response command ******************************/
|
||||
|
||||
/** @brief Length of array of Bitmap of Zone ID Map */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_GET_ZONE_ID_MAP_LENGTH 16
|
||||
|
||||
/** @brief Structure representation of Get Zone ID Map Response command */
|
||||
typedef struct esp_zb_zcl_ias_ace_get_zone_id_map_resp_s {
|
||||
uint16_t zone_id_map[ESP_ZB_ZCL_IAS_ACE_GET_ZONE_ID_MAP_LENGTH]; /**< Zone ID Map */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_id_map_resp_t;
|
||||
|
||||
/******************* Get Zone Information Response command ******************************/
|
||||
|
||||
/** @brief Zone Type is empty */
|
||||
#define ESP_ZB_ZCL_IAS_ACE_GET_ZONE_INFO_TYPE_NONE 0xffff
|
||||
|
||||
/** @brief Structure representation of Get Zone Information Response command, see esp_zb_zcl_ias_ace_zone_table_s */
|
||||
typedef struct esp_zb_zcl_ias_ace_get_zone_info_resp_s {
|
||||
uint8_t zone_id; /**< Zone ID */
|
||||
uint16_t zone_type; /**< Zone Type, see esp_zb_zcl_ias_zone_zonetype_t */
|
||||
esp_zb_ieee_addr_t address; /**< Zone Address */
|
||||
uint8_t zone_label[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Zone Label Field */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_info_resp_t;
|
||||
|
||||
/******************* Zone Status Changed command ******************************/
|
||||
|
||||
/** @brief IAS ACE Audible Notification Field
|
||||
@see ZCL spec 8.3.2.4.4.4
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ACE_AUD_NOTIFICATION_MUTE = 0x00, /**< Mute (i.e., no audible notification) */
|
||||
ESP_ZB_ZCL_IAS_ACE_AUD_NOTIFICATION_DEF_SOUND = 0x01, /**< Default sound */
|
||||
ESP_ZB_ZCL_IAS_ACE_AUD_NOTIFICATION_MANUF_SPECIFIC = 0x80, /**< Manufacturer specific */
|
||||
} esp_zb_zcl_ias_ace_aud_notification_t;
|
||||
|
||||
/** @brief Structure representation of Zone Status Changed command */
|
||||
typedef struct esp_zb_zcl_ias_ace_zone_status_changed_s {
|
||||
uint8_t zone_id; /**< Zone ID */
|
||||
uint16_t zone_status; /**< Zone Status, see esp_zb_zcl_ias_zone_zonestatus_t */
|
||||
uint8_t aud_notification; /**< Audible Notification, see esp_zb_zcl_ias_ace_aud_notification_t */
|
||||
uint8_t zone_label[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Zone Label Field */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_zone_status_changed_t;
|
||||
|
||||
/******************* Panel Status Changed command ******************************/
|
||||
|
||||
/** @brief IAS ACE PanelStatus Parameter */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_DISARMED = 0x00, /**< Panel disarmed (all zones disarmed) and ready to arm */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMED_STAY = 0x01, /**< Armed stay */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMED_NIGHT = 0x02, /**< Armed night */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMED_AWAY = 0x03, /**< Armed away */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_EXIT_DELAY = 0x04, /**< Exit delay */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ENTRY_DELAY = 0x05, /**< Entry delay */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_NOT_READY = 0x06, /**< Not ready to arm */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_IN_ALARM = 0x07, /**< In alarm */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMING_STAY = 0x08, /**< Arming Stay */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMING_NIGHT = 0x09, /**< Arming Night */
|
||||
ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMING_AWAY = 0x0a, /**< Arming Away */
|
||||
} esp_zb_zcl_ias_ace_panel_status_t;
|
||||
|
||||
/** @brief IAS ACE Alarm Status Field */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_NO_ALARM = 0x00, /**< No alarm */
|
||||
ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_BURGLAR = 0x01, /**< Burglar */
|
||||
ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_FIRE = 0x02, /**< Fire */
|
||||
ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY = 0x03, /**< Emergency */
|
||||
ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_POLICE_PANIC = 0x04, /**< Police Panic */
|
||||
ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_FIRE_PANIC = 0x05, /**< Fire Panic */
|
||||
ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY_PANIC = 0x06, /**< Emergency Panic */
|
||||
} esp_zb_zcl_ias_ace_alarm_status_t;
|
||||
|
||||
/** @brief Structure representation of Panel Status Changed command */
|
||||
typedef struct esp_zb_zcl_ias_ace_panel_status_changed_s {
|
||||
uint8_t panel_status; /**< Panel Status, see esp_zb_zcl_ias_ace_panel_status_t */
|
||||
uint8_t seconds_remaining; /**< Seconds Remaining Parameter */
|
||||
uint8_t aud_notification; /**< Audible Notification, see esp_zb_zcl_ias_ace_aud_notification_t */
|
||||
uint8_t alarm_status; /**< Alarm Status Field, see esp_zb_zcl_ias_ace_alarm_status_t */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_panel_status_changed_t;
|
||||
|
||||
/******************* Get Panel Status Response command ******************************/
|
||||
|
||||
/** @brief Structure representation of Get Panel Status Response command */
|
||||
typedef struct esp_zb_zcl_ias_ace_get_panel_status_resp_s {
|
||||
uint8_t panel_status; /**< Panel Status, see esp_zb_zcl_ias_ace_panel_status_t */
|
||||
uint8_t seconds_remaining; /**< Seconds Remaining Parameter */
|
||||
uint8_t aud_notification; /**< Audible Notification, see esp_zb_zcl_ias_ace_aud_notification_t */
|
||||
uint8_t alarm_status; /**< Alarm Status Field, see esp_zb_zcl_ias_ace_alarm_status_t */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_panel_status_resp_t;
|
||||
|
||||
/******************* Set Bypassed Zone List command ******************************/
|
||||
|
||||
/** @brief Structure representation of Set Bypassed Zone List command */
|
||||
typedef struct esp_zb_zcl_ias_ace_set_bypassed_zone_list_s {
|
||||
uint8_t length; /**< Number of Zones */
|
||||
uint8_t zone_id[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Zone ID array, see esp_zb_zcl_ias_ace_zone_table_s */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_set_bypassed_zone_list_t;
|
||||
|
||||
/******************* Bypass Response command ******************************/
|
||||
|
||||
/** @brief IAS ACE Bypass Result */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_BYPASSED = 0x00, /**< Bypass request is successful. Zone is bypassed. */
|
||||
ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_NOT_BYPASSED = 0x01, /**< Bypass request is unsuccessful. Zone is not bypassed. */
|
||||
ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_NOT_ALLOWED = 0x02, /**< Bypass request is not allowed. Zone is not bypassed. */
|
||||
ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ZONE_ID = 0x03, /**< Invalid Zone ID in the request. */
|
||||
ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_UNKNOWN_ZONE_ID = 0x04, /**< Valid range of Zone ID, but unknown to server. */
|
||||
ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ARM_CODE = 0x05, /**< Arm/Disarm Code was entered incorrectly. */
|
||||
} esp_zb_zcl_ias_ace_bypass_result_t;
|
||||
|
||||
/** @brief Structure representation of Bypass Response command */
|
||||
typedef struct esp_zb_zcl_ias_ace_bypass_resp_s {
|
||||
uint8_t length; /**< Number of Zones */
|
||||
uint8_t bypass_result[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Bypass Result for Zone IDs, see esp_zb_zcl_ias_ace_bypass_result_t */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_bypass_resp_t;
|
||||
|
||||
/******************* Get Zone Status Response command ******************************/
|
||||
|
||||
/** @brief IAS ACE Zone Status structure */
|
||||
typedef struct esp_zb_zcl_ias_ace_zone_status_s {
|
||||
uint8_t zone_id; /**< Zone ID, see esp_zb_zcl_ias_ace_zone_table_s */
|
||||
uint16_t zone_status; /**< Zone Status, see esp_zb_zcl_ias_zone_zonestatus_t */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_zone_status_t;
|
||||
|
||||
/** @brief Structure representation of Get Zone Status Response command */
|
||||
typedef struct esp_zb_zcl_ias_ace_get_zone_status_resp_s {
|
||||
uint8_t zone_status_complete; /**< Zone Status Complete Field */
|
||||
uint8_t length; /**< Number of Zones */
|
||||
esp_zb_zcl_ias_ace_zone_status_t zone_id_status[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Status of Zone IDs */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_status_resp_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief IAS WD cluster attribute identifiers. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_ID = 0x0000, /**< Max Duration attribute */
|
||||
} esp_zb_zcl_ias_wd_attr_t;
|
||||
|
||||
/** @brief Default value for IAS WD cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_IAS_WD_CLUSTER_REVISION_DEFAULT ((uint16_t)0x0002u)
|
||||
|
||||
/** @brief Max Duration attribute default value */
|
||||
#define ESP_ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_DEF_VALUE 240
|
||||
|
||||
/** @brief Max Duration attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_MIN_VALUE 0
|
||||
|
||||
/** @brief Max Duration attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_MAX_VALUE 0xfffe
|
||||
|
||||
/** @brief IAS WD cluster command identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_IAS_WD_START_WARNING_ID = 0x00, /**< Start warning command. */
|
||||
ESP_ZB_ZCL_CMD_IAS_WD_SQUAWK_ID = 0x01, /**< Squawk command. */
|
||||
} esp_zb_zcl_ias_wd_cmd_t;
|
||||
|
||||
/******************************* Start warning command ******************************/
|
||||
|
||||
/** @brief Values of Warning Mode Field. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_WD_WARNING_MODE_STOP = 0x00, /**< Stop */
|
||||
ESP_ZB_ZCL_IAS_WD_WARNING_MODE_BURGLAR = 0x01, /**< Burglar */
|
||||
ESP_ZB_ZCL_IAS_WD_WARNING_MODE_FIRE = 0x02, /**< Fire */
|
||||
ESP_ZB_ZCL_IAS_WD_WARNING_MODE_EMERGENCY = 0x03, /**< Emergency */
|
||||
ESP_ZB_ZCL_IAS_WD_WARNING_MODE_POLICE_PANIC = 0x04, /**< Police panic */
|
||||
ESP_ZB_ZCL_IAS_WD_WARNING_MODE_FIRE_PANIC = 0x05, /**< Fire panic */
|
||||
ESP_ZB_ZCL_IAS_WD_WARNING_MODE_EMERGENCY_PANIC = 0x06, /**< Emergency panic (i.e., medical issue) */
|
||||
} esp_zb_zcl_ias_wd_warning_mode_t;
|
||||
|
||||
/** @brief Values of Strobe Field. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_WD_STROBE_NO_STROBE = 0x00, /**< No strobe */
|
||||
ESP_ZB_ZCL_IAS_WD_STROBE_USE_STROBE = 0x01, /**< Use strobe in parallel to warning */
|
||||
} esp_zb_zcl_ias_wd_strobe_t;
|
||||
|
||||
/** @brief Values of Siren Level Field. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_WD_SIREN_LEVEL_LOW = 0x00, /**< Low level sound */
|
||||
ESP_ZB_ZCL_IAS_WD_SIREN_LEVEL_MEDIUM = 0x01, /**< Medium level sound */
|
||||
ESP_ZB_ZCL_IAS_WD_SIREN_LEVEL_HIGH = 0x02, /**< High level sound */
|
||||
ESP_ZB_ZCL_IAS_WD_SIREN_LEVEL_VERY_HIGH = 0x03, /**< Very high level sound */
|
||||
} esp_zb_zcl_ias_wd_siren_level_t;
|
||||
|
||||
/** @brief Values of Strobe Level Field. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_WD_STROBE_LEVEL_LOW = 0x00, /**< Low level strobe */
|
||||
ESP_ZB_ZCL_IAS_WD_STROBE_LEVEL_MEDIUM = 0x01, /**< Medium level strobe */
|
||||
ESP_ZB_ZCL_IAS_WD_STROBE_LEVEL_HIGH = 0x02, /**< High level strobe */
|
||||
ESP_ZB_ZCL_IAS_WD_STROBE_LEVEL_VERY_HIGH = 0x03, /**< Very high level strobe */
|
||||
} esp_zb_zcl_ias_wd_strobe_level_t;
|
||||
|
||||
/** @brief Data in IAS_WD Start Warning command */
|
||||
typedef struct esp_zb_zcl_ias_wd_start_warning_s {
|
||||
uint8_t warning_mode; /**< Warning Mode */
|
||||
uint8_t strobe; /**< Strobe */
|
||||
uint8_t siren_level; /**< Siren level */
|
||||
uint16_t duration; /**< Duration */
|
||||
uint8_t strobe_duty_cycle; /**< Strobe duty cycle */
|
||||
uint8_t strobe_level; /**< Strobe level */
|
||||
} esp_zb_zcl_ias_wd_start_warning_t;
|
||||
|
||||
/******************************* Squawk command ******************************/
|
||||
|
||||
/** @brief Values of Squawk Mode Field. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_MODE_ARMED = 0x00, /**< Notification sound for "System is armed" */
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_MODE_DISARMED = 0x01, /**< Notification sound for "System is disarmed" */
|
||||
} esp_zb_zcl_ias_wd_squawk_mode_t;
|
||||
|
||||
/** @brief Values of Strobe Field. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_STROBE_NO_STROBE = 0x00, /**< No strobe*/
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_STROBE_USE_STROBE = 0x01, /**< Use strobe blink in parallel to squawk */
|
||||
} esp_zb_zcl_ias_wd_squawk_strobe_t;
|
||||
|
||||
/** @brief Values of Squawk level Field. */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_LEVEL_LOW = 0x00, /**< Low level sound */
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_LEVEL_MEDIUM = 0x01, /**< Medium level sound */
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_LEVEL_HIGH = 0x02, /**< High level sound */
|
||||
ESP_ZB_ZCL_IAS_WD_SQUAWK_LEVEL_VERY_HIGH = 0x03, /**< Very High level sound */
|
||||
} esp_zb_zcl_ias_wd_squawk_level_t;
|
||||
|
||||
/** @brief Data in IAS_WD Squawk command */
|
||||
typedef struct esp_zb_zcl_ias_wd_squawk_s {
|
||||
uint8_t squawk_mode; /**< Squawk Mode */
|
||||
uint8_t strobe; /**< Strobe */
|
||||
uint8_t squawk_level; /**< Squawk level */
|
||||
} esp_zb_zcl_ias_wd_squawk_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief IAS Zone cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONESTATE_ID = 0x0000, /*!< ZoneState attribute */
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONETYPE_ID = 0x0001, /*!< ZoneType attribute */
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONESTATUS_ID = 0x0002, /*!< ZoneStatus attribute */
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_IAS_CIE_ADDRESS_ID = 0x0010, /*!< IAS_CIE_Address attribute */
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONEID_ID = 0x0011, /*!< ZoneID attribute */
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_NUMBER_OF_ZONE_SENSITIVITY_LEVELS_SUPPORTED_ID = 0x0012, /*!< NumberOfZoneSensitivityLevelsSupported attribute */
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_CURRENT_ZONE_SENSITIVITY_LEVEL_ID = 0x0013, /*!< CurrentZoneSensitivityLevel attribute */
|
||||
ESP_ZB_ZCL_ATTR_CUSTOM_CIE_ADDR_IS_SET = 0xE000, /*!< Custom CIE address for checking establishment and authorization internally*/
|
||||
ESP_ZB_ZCL_ATTR_CUSTOM_CIE_EP = 0xE001, /*!< Custom CIE endpoint for checking establishment and authorization internally*/
|
||||
ESP_ZB_ZCL_ATTR_CUSTOM_CIE_SHORT_ADDR = 0xE002, /*!< Custom CIE short address for checking establishment and authorization internally*/
|
||||
ESP_ZB_ZCL_ATTR_IAS_ZONE_INT_CTX_ID = 0xeffe, /*!< Application context */
|
||||
} esp_zb_zcl_ias_zone_attr_t;
|
||||
|
||||
/** @brief IAS Zone ZoneState value
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONESTATE_NOT_ENROLLED = 0, /*!< ZoneState not enrolled value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONESTATE_ENROLLED = 1, /*!< ZoneState enrolled value */
|
||||
} esp_zb_zcl_ias_zone_zonestate_t;
|
||||
|
||||
/** @brief IAS Zone ZoneType value
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_STANDARD_CIE = 0x0000, /*!< ZoneType Standard CIE System Alarm value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_MOTION = 0x000d, /*!< ZoneType Motion value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_CONTACT_SWITCH = 0x0015, /*!< ZoneType Contact switch value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_FIRE_SENSOR = 0x0028, /*!< ZoneType Fire sensor value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_WATER_SENSOR = 0x002a, /*!< ZoneType Water sensor value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_GAS_SENSOR = 0x002b, /*!< ZoneType Gas sensor value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_PERSONAL_EMERGENCY = 0x002c, /*!< ZoneType Personal emergency value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_VIBRATION_MOVEMENT = 0x002d, /*!< ZoneType Vibration / Movement sensor value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_REMOTE_CONTROL = 0x010f, /*!< ZoneType Remote Control value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_KEY_FOB = 0x0115, /*!< ZoneType Key fob value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_KEYPAD = 0x021d, /*!< ZoneType Keypad value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_STANDARD_WARNING = 0x0225, /*!< ZoneType Standard Warning Device value */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_GLASS_BREAK = 0x0225, /*!< ZoneType Standard glass break sensor */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_INVALID = 0xffff, /*!< ZoneType Invalid Zone Type value */
|
||||
} esp_zb_zcl_ias_zone_zonetype_t;
|
||||
|
||||
/** @brief IAS Zone ZoneStatus attribute flags
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_ALARM1 = 1 << 0, /*!< Alarm 1 */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_ALARM2 = 1 << 1, /*!< Alarm 2 */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_TAMPER = 1 << 2, /*!< Tamper */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_BATTERY = 1 << 3, /*!< Battery */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_SUPERVISION = 1 << 4, /*!< Supervision reports */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_RESTORE = 1 << 5, /*!< Restore reports */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_TROUBLE = 1 << 6, /*!< Trouble */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_AC_MAINS = 1 << 7, /*!< AC (mains) */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_TEST = 1 << 8, /*!< Test */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_BATTERY_DEFECT = 1 << 9, /*!< Battery Defect */
|
||||
} esp_zb_zcl_ias_zone_zonestatus_t;
|
||||
|
||||
#define ESP_ZB_ZCL_ZONE_IAS_CIE_ADDR_DEFAULT {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
||||
|
||||
/** @brief IAS Zone cluster command identifiers for client
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_IAS_ZONE_ZONE_ENROLL_RESPONSE_ID = 0x00, /*!< "Zone Enroll Response" command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ZONE_INITIATE_NORMAL_OPERATION_MODE_ID = 0x01, /*!< "Initiate Normal Operation Mode" command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ZONE_INITIATE_TEST_MODE_ID = 0x02, /*!< "Initiate Test Mode" command */
|
||||
} esp_zb_zcl_ias_zone_cmd_t;
|
||||
|
||||
/** @brief IAS Zone cluster command identifiers for server
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_IAS_ZONE_ZONE_STATUS_CHANGE_NOT_ID = 0x00, /*!< "Zone Status Change Notification" command */
|
||||
ESP_ZB_ZCL_CMD_IAS_ZONE_ZONE_ENROLL_REQUEST_ID = 0x01 /*!< "Zone Enroll Request" command. */
|
||||
} esp_zb_zcl_ias_zone_resp_cmd_t;
|
||||
|
||||
/** @brief Values of the Enroll Response Code defintion
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_IAS_ZONE_ENROLL_RESPONSE_CODE_SUCCESS = 0x00, /*!< Success */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ENROLL_RESPONSE_CODE_NOT_SUPPORTED = 0x01, /*!< Not supported */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ENROLL_RESPONSE_CODE_NO_ENROLL = 0x02, /*!< No enroll permit */
|
||||
ESP_ZB_ZCL_IAS_ZONE_ENROLL_RESPONSE_CODE_TOO_MANY_ZONES = 0x03, /*!< Too many zones */
|
||||
} esp_zb_zcl_ias_zone_enroll_response_code_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Identify cluster attribute identifier
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_IDENTIFY_IDENTIFY_TIME_ID = 0x0000 /*!< Identify time attribute */
|
||||
} esp_zb_zcl_identify_attr_t;
|
||||
|
||||
/** @brief Default value for Identify attribute */
|
||||
#define ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE 0x0000
|
||||
|
||||
/** @brief Command identifiers for "Identify" cluster
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_IDENTIFY_IDENTIFY_ID = 0x00, /*!< Identify command */
|
||||
ESP_ZB_ZCL_CMD_IDENTIFY_IDENTIFY_QUERY_ID = 0x01, /*!< Identify query command */
|
||||
ESP_ZB_ZCL_CMD_IDENTIFY_TRIGGER_EFFECT_ID = 0x40, /*!< "Trigger effect" command identifier. */
|
||||
ESP_ZB_ZCL_CMD_IDENTIFY_IDENTIFY_QUERY_RSP_ID = 0x00 /*!< Identify query response */
|
||||
} esp_zb_zcl_identify_cmd_id_t;
|
||||
|
||||
/** @brief the values of the effect identifier field of the trigger effect command
|
||||
*/
|
||||
typedef enum esp_zb_zcl_identify_trigger_effect_s {
|
||||
ESP_ZB_ZCL_IDENTIFY_EFFECT_ID_BLINK = 0x00, /*!< Effect identifier field value: Light is turned on/off once */
|
||||
ESP_ZB_ZCL_IDENTIFY_EFFECT_ID_BREATHE = 0x01, /*!< Effect identifier field value: Light turned on/off over 1 second and repeated 15 times */
|
||||
ESP_ZB_ZCL_IDENTIFY_EFFECT_ID_OKAY = 0x02, /*!< Effect identifier field value: Colored light turns green for 1 second; non-colored light flashes twice */
|
||||
ESP_ZB_ZCL_IDENTIFY_EFFECT_ID_CHANNEL_CHANGE = 0x0b, /*!< Effect identifier field value: Colored light turns orange for 8 seconds; non-colored light
|
||||
switches to maximum brightness for 0.5s and then minimum brightness for 7.5s */
|
||||
ESP_ZB_ZCL_IDENTIFY_EFFECT_ID_FINISH_EFFECT = 0xfe, /*!< Effect identifier field value: Complete the current effect sequence before terminating. */
|
||||
ESP_ZB_ZCL_IDENTIFY_EFFECT_ID_STOP = 0xff, /*!< Effect identifier field value: Terminate the effect as soon as possible */
|
||||
} esp_zb_zcl_identify_trigger_effect_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Illuminance Measurement cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MEASURED_VALUE_ID = 0x0000, /*!< MeasuredValue */
|
||||
ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MIN_MEASURED_VALUE_ID = 0x0001, /*!< MinMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MAX_MEASURED_VALUE_ID = 0x0002, /*!< MaxMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_TOLERANCE_ID = 0x0003, /*!< The Tolerance attribute SHALL indicate the magnitude of the possible error that is associated with MeasuredValue, using the same units and resolution.*/
|
||||
ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_LIGHT_SENSOR_TYPE_ID = 0x0004 /*!< The LightSensorType attribute specifies the electronic type ofthe light sensor. */
|
||||
} esp_zb_zcl_illuminance_measurement_attr_t;
|
||||
|
||||
/** @brief Default value for Illuminance Measurement cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_REVISION_DEFAULT ((uint16_t)0x0002u)
|
||||
|
||||
/** @brief MeasuredValue attribute too-low value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MEASURED_VALUE_TOO_LOW 0
|
||||
|
||||
/** @brief MeasuredValue attribute invalid value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MEASURED_VALUE_INVALID 0xFFFF
|
||||
|
||||
/** @brief MeasuredValue attribute default value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MEASURED_VALUE_DEFAULT \
|
||||
ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MEASURED_VALUE_TOO_LOW
|
||||
|
||||
/** @brief Default value for LightSensorType attribute */
|
||||
#define ESP_ZB_ZCL_ILLUMINANCE_MEASUREMENT_LIGHT_SENSOR_TYPE_DEFAULT_VALUE ((uint8_t)0xFF)
|
||||
|
||||
/** @brief MinMeasuredValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MIN_MEASURED_VALUE_MIN_VALUE 0x0001
|
||||
|
||||
/** @brief MinMeasuredValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MIN_MEASURED_VALUE_MAX_VALUE 0xFFFD
|
||||
|
||||
/** @brief MinMeasuredValue attribute not-defined value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MIN_MEASURED_VALUE_UNDEFINED 0xFFFF
|
||||
|
||||
/** @brief MaxMeasuredValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MAX_MEASURED_VALUE_MIN_VALUE 0x0002
|
||||
|
||||
/** @brief MaxMeasuredValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MAX_MEASURED_VALUE_MAX_VALUE 0xFFFE
|
||||
|
||||
/** @brief MaxMeasuredValue attribute not-defined value */
|
||||
#define ESP_ZB_ZCL_ATTR_ILLUMINANCE_MEASUREMENT_MAX_MEASURED_VALUE_UNDEFINED 0xFFFF
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/**
|
||||
* @brief Level control attribute list
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID = 0x0000, /*!< Current Level attribute */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID = 0x0001, /*!< Remaining Time attribute */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_MIN_LEVEL_ID = 0x0002, /*!< The MinLevel attribute indicates the minimum value of CurrentLevel that is capable of being assigned. */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_MAX_LEVEL_ID = 0x0003, /*!< The MaxLevel attribute indicates the maximum value of CurrentLevel that is capable of being assigned. */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_FREQUENCY_ID = 0x0004, /*!< The CurrentFrequency attribute represents the frequency that the devices is at CurrentLevel. */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_MIN_FREQUENCY_ID = 0x0005, /*!< The MinFrequency attribute indicates the minimum value of CurrentFrequency that is capable of being assigned. */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_MAX_FREQUENCY_ID = 0x0006, /*!< The MaxFrequency attribute indicates the maximum value of CurrentFrequency that is capable of being assigned. */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_ON_OFF_TRANSITION_TIME_ID = 0x0010, /*!< On off transition time attribute */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_ON_LEVEL_ID = 0x0011, /*!< On Level attribute */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_ON_TRANSITION_TIME_ID = 0x0012, /*!< The OnTransitionTime attribute represents the time taken to move the current level */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_OFF_TRANSITION_TIME_ID = 0x0013, /*!< The OffTransitionTime attribute represents the time taken to move the current level */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_DEFAULT_MOVE_RATE_ID = 0x0014, /*!< The DefaultMoveRate attribute determines the movement rate, in units per second */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_OPTIONS_ID = 0x000F, /*!< The Options attribute is a bitmap that determines the default behavior of some cluster commands. */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_ID = 0x4000, /*!< The StartUpCurrentLevel attribute SHALL define the desired startup level */
|
||||
ESP_ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID = 0xefff /*!< Special Move Variables attribute Internal usage */
|
||||
} esp_zb_zcl_level_control_attr_t;
|
||||
|
||||
/** @brief Current Level attribute default value */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_DEFAULT_VALUE ((uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for RemainingTime attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_REMAINING_TIME_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for MinLevel attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_MIN_LEVEL_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for MaxLevel attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_MAX_LEVEL_DEFAULT_VALUE ((uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for CurrentFrequency attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_CURRENT_FREQUENCY_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for MinFrequency attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_MIN_FREQUENCY_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for MaxFrequency attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_MAX_FREQUENCY_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for OnOffTransitionTime attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_ON_OFF_TRANSITION_TIME_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for OnLevel attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_ON_LEVEL_DEFAULT_VALUE ((uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for OnTransitionTime attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_ON_TRANSITION_TIME_DEFAULT_VALUE ((uint16_t)0xFFFF)
|
||||
|
||||
/** @brief Default value for OffTransitionTime attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_OFF_TRANSITION_TIME_DEFAULT_VALUE ((uint16_t)0xFFFF)
|
||||
|
||||
/** @brief Default move rate */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_RATE_DEFAULT_VALUE ((uint8_t)0xff)
|
||||
|
||||
/** @brief Default value for Options attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_OPTIONS_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for OnLevel attribute */
|
||||
#define ESP_ZB_ZCL_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_USE_PREVIOUS_VALUE ((uint8_t)0xFF)
|
||||
|
||||
/*! @brief Level control cluster command identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL = 0x00, /*!< Move To Level command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_MOVE = 0x01, /*!< Move command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_STEP = 0x02, /*!< Step command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_STOP = 0x03, /*!< Stop command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL_WITH_ON_OFF = 0x04, /*!< Move To Level with On/Off command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_WITH_ON_OFF = 0x05, /*!< Move with On/Off command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_STEP_WITH_ON_OFF = 0x06, /*!< Step with On/Off command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_STOP_WITH_ON_OFF = 0x07, /*!< Step with On/Off command */
|
||||
ESP_ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_CLOSEST_FREQUENCY = 0x08, /*!< Upon receipt of "Move to Closest Frequency" command */
|
||||
} esp_zb_zcl_level_control_cmd_id_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Meter Identification server attributes identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_COMPANY_NAME_ID = 0x0000, /**< Company Name */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_METER_TYPE_ID_ID = 0x0001, /**< Meter Type Id */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_DATA_QUALITY_ID_ID = 0x0004, /**< Data Quality Id */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_CUSTOMER_NAME_ID = 0x0005, /**< Customer Name */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_MODEL_ID = 0x0006, /**< Model */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_PART_NUMBER_ID = 0x0007, /**< Part Number */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_PRODUCT_REVISION_ID = 0x0008, /**< Product Revision */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_SOFTWARE_REVISION_ID = 0x000A, /**< Software Revision */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_UTILITY_NAME_ID = 0x000B, /**< Utility Name */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_POD_ID = 0x000C, /**< Pod */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_AVAILABLE_POWER_ID = 0x000D, /**< Available Power */
|
||||
ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_POWER_THRESHOLD_ID = 0x000E, /**< Power Threshold */
|
||||
} esp_zb_zcl_meter_identification_attr_t;
|
||||
|
||||
/** @brief ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_METER_TYPE_ID "MeterTypeID" attribute values */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_METER_TYPE_UTILITY_PRIMARY = 0x0000, /**< Utility Primary Meter */
|
||||
ESP_ZB_ZCL_METER_TYPE_UTILITY_PRODUCTION = 0x0001, /**< Utility Production Meter */
|
||||
ESP_ZB_ZCL_METER_TYPE_UTILITY_SECONDARY = 0x0002, /**< Utility Secondary Meter */
|
||||
ESP_ZB_ZCL_METER_TYPE_PRIVATE_PRIMARY = 0x0100, /**< Private Primary Meter */
|
||||
ESP_ZB_ZCL_METER_TYPE_PRIVATE_PRODUCTION = 0x0101, /**< Private Production Meter */
|
||||
ESP_ZB_ZCL_METER_TYPE_PRIVATE_SECONDARY = 0x0102, /**< Private Secondary Meters */
|
||||
ESP_ZB_ZCL_METER_TYPE_GENERIC = 0x0110 /**< Generic Meter */
|
||||
} esp_zb_zcl_meter_identification_meter_type_t;
|
||||
|
||||
/** @brief ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_DATA_QUALITY_ID "DataQualityID" attribute values */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_DATA_QUALITY_ALL_DATA_CERTIFIED = 0x0000, /**< All Data Certified */
|
||||
ESP_ZB_ZCL_DATA_QUALITY_ONLY_INSTANTANEOUS_POWER_NOT_CERTIFIED = 0x0001, /**< Only Instantaneous Power not Certified */
|
||||
ESP_ZB_ZCL_DATA_QUALITY_ONLY_CUMULATED_CONSUMPTION_NOT_CERTIFIED = 0x0002, /**< Only Cumulated Consumption not Certified */
|
||||
ESP_ZB_ZCL_DATA_QUALITY_NOT_CERTIFIED_DATA = 0x0003 /**< Not Certified data */
|
||||
} esp_zb_zcl_meter_identification_data_quality_t;
|
||||
|
||||
/** @brief Default value for Meter Identification cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_METER_IDENTIFICATION_CLUSTER_REVISION_DEFAULT ((zb_uint16_t)0x0002u)
|
||||
|
||||
/** @brief Default value for Company Name attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_COMPANY_NAME_DEFAULT_VALUE { 0 }
|
||||
|
||||
/** @brief Default value for Meter Type ID attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_METER_TYPE_ID_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Default value for Data Quality ID attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_DATA_QUALITY_ID_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Default value for POD (Point of Delivery) attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_POD_DEFAULT_VALUE { 0 }
|
||||
|
||||
/** @brief Default value for Available Power attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_AVAILABLE_POWER_DEFAULT_VALUE ZB_INIT_UINT24(0,0)
|
||||
|
||||
/** @brief Default value for Power Threshold attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_POWER_THRESHOLD_DEFAULT_VALUE ZB_INIT_UINT24(0, 0)
|
||||
|
||||
/** @brief Max length of Company Name attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_COMPANY_NAME_MAX_LENGTH 16
|
||||
|
||||
/** @brief Max length of POD (Point of Delivery) attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_METER_IDENTIFICATION_POD_MAX_LENGTH 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTDESP_ZB_ZCL_
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Multistate Value cluster attribute identifiers */
|
||||
typedef enum {
|
||||
// TODO: Support Text attribute
|
||||
// ESP_ZB_ZCL_ATTR_MULTI_VALUE_STATE_TEXT_ID = 0x000e, /*!< Text attribute */
|
||||
ESP_ZB_ZCL_ATTR_MULTI_VALUE_DESCRIPTION_ID = 0x001c, /*!< Description attribute */
|
||||
// TODO: Support NumberOfStates attribute
|
||||
// ESP_ZB_ZCL_ATTR_MULTI_VALUE_NUMBER_OF_STATES_ID = 0x004a, /*!< NumberOfStates attribute */
|
||||
ESP_ZB_ZCL_ATTR_MULTI_VALUE_OUT_OF_SERVICE_ID = 0x0051, /*!< OutOfService attribute */
|
||||
ESP_ZB_ZCL_ATTR_MULTI_VALUE_PRESENT_VALUE_ID = 0x0055, /*!< PresentValue attribute */
|
||||
// TODO: Support PriorityArray attribute
|
||||
// ESP_ZB_ZCL_ATTR_MULTI_VALUE_PRIORITY_ARRAY_ID = 0x0057, /*!< PriorityArray attribute */
|
||||
ESP_ZB_ZCL_ATTR_MULTI_VALUE_RELIABILITY_ID = 0x0067, /*!< Reliability attribute */
|
||||
ESP_ZB_ZCL_ATTR_MULTI_VALUE_RELINQUISH_DEFAULT_ID = 0x0068, /*!< Reliability attribute */
|
||||
ESP_ZB_ZCL_ATTR_MULTI_VALUE_STATUS_FLAGS_ID = 0x006f, /*!< StatusFlags attribute */
|
||||
ESP_ZB_ZCL_ATTR_MULTI_VALUE_APPLICATION_TYPE_ID = 0x0100, /*!< ApplicationType attribute */
|
||||
} esp_zb_zcl_multi_value_attr_t;
|
||||
|
||||
/** @brief Values for StatusFlags attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_NORMAL = 0x00, /*!< Normal (default) . */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_IN_ALARM = 0x01, /*!< In alarm bit. */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_FAULT = 0x02, /*!< Fault bit. */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_OVERRIDDEN = 0x04, /*!< Overridden bit. */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_OUT_OF_SERVICE = 0x08, /*!< Out of service bit. */
|
||||
} esp_zb_zcl_multi_value_status_flags_value_t;
|
||||
|
||||
/** @brief Values for Reliability attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_NO_FAULT_DETECTED = 0x00, /*!< No fault detected */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_NO_SENSOR = 0x01, /*!< No sensor */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_OVER_RANGE = 0x02, /*!< Over range */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_UNDER_RANGE = 0x03, /*!< Under range */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_OPEN_LOOP = 0x04, /*!< Open loop */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_SHORTED_LOOP = 0x05, /*!< Shorted loop */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_NO_OUTPUT = 0x06, /*!< No output */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_UNRELIABLE_OTHER = 0x07, /*!< Unreliable other */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_PROCESS_ERROR = 0x08, /*!< Process error */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_MULTI_STATE_FAULT = 0x09, /*!< Mutlistate fault */
|
||||
ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_CONFIGURATION_ERROR = 0x0a, /*!< Configuration error */
|
||||
} esp_zb_zcl_multi_value_reliability_value_t;
|
||||
|
||||
/** Multistate Value cluster application types
|
||||
* The ApplicationType attribute indicates the specific application usage
|
||||
* for the cluster. ApplicationType is subdivided into Group, Type and
|
||||
* an Index number, as follows:
|
||||
*
|
||||
* Group = Bits 24 to 31
|
||||
* An indication of the cluster this attribute is part of. Multistate Value
|
||||
* clusters have Group = 0x0d.
|
||||
*
|
||||
* Type = Bits 16 to 23
|
||||
* The application usage domain.
|
||||
*
|
||||
* Index = Bits 0 to 15
|
||||
* The specific application usage of the cluster.
|
||||
*/
|
||||
|
||||
#define ESP_ZB_ZCL_MV_GROUP_ID 0x0d
|
||||
#define ESP_ZB_ZCL_MV_SET_APP_TYPE_WITH_ID(_type, _id) ((ESP_ZB_ZCL_MV_GROUP_ID << 24) | ((_type & 0xff) << 16) | (_id & 0xffff))
|
||||
|
||||
/** @brief Values for Multistate Value cluster applications type */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_MV_APP_TYPE_APP_DOMAIN_HVAC = 0x0000, /*!< Application Domain HVAC */
|
||||
/* All other group values are currently reserved. */
|
||||
} esp_zb_zcl_mv_application_types_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_0 /*!< On, Off, Auto state */
|
||||
= ESP_ZB_ZCL_MV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_MV_APP_TYPE_APP_DOMAIN_HVAC, 0x0000),
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_1, /*!< Off, Low, Medium, High state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_2, /*!< Auto, Heat, Cool, Off, Emergency Heat, Fan Only, Max Heat state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_3, /*!< Occupied, Unoccupied, Standby, Bypass state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_4, /*!< Inactive, Active, Hold state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_5, /*!< Auto, Warm-up, Water Flush, Autocalibration, Shutdown Open, Shutdown Closed, Low Limit, Test and Balance state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_6, /*!< Off, Auto, Heat Control, Heat Only, Cool Only, Fan Only state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_7, /*!< High, Normal, Low state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_8, /*!< Occupied, Unoccupied, Startup, Shutdown state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_9, /*!< Night, Day, Hold state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_10, /*!< Off, Cool, Heat, Auto, Emergency Heat state */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_STATES_GROUP_11, /*!< Shutdown Closed, Shutdown Open, Satisfied, Mixing, Cooling, Heating, Supplemental Heat state */
|
||||
/* 0x0200 to 0xfffe are Vendor defined */
|
||||
ESP_ZB_ZCL_MV_APP_DOMAIN_HVAC_OTHER /*!< Other */
|
||||
= ESP_ZB_ZCL_MV_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_MV_APP_TYPE_APP_DOMAIN_HVAC, 0xffff),
|
||||
} esp_zb_zcl_mv_app_domain_hvac_t;
|
||||
|
||||
/** @brief Default value for Description attribute */
|
||||
#define ESP_ZB_ZCL_MULTI_VALUE_DESCRIPTION_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Default value for OutOfService attribute */
|
||||
#define ESP_ZB_ZCL_MULTI_VALUE_OUT_OF_SERVICE_DEFAULT_VALUE false
|
||||
|
||||
/** @brief Default value for Reliability attribute */
|
||||
#define ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_DEFAULT_VALUE ESP_ZB_ZCL_MULTI_VALUE_RELIABILITY_NO_FAULT_DETECTED
|
||||
|
||||
/** @brief Default value for StatusFlags attribute */
|
||||
#define ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_DEFAULT_VALUE ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_NORMAL
|
||||
|
||||
/** @brief StatusFlags attribute minimum value */
|
||||
#define ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_MIN_VALUE 0
|
||||
|
||||
/** @brief StatusFlags attribute maximum value */
|
||||
#define ESP_ZB_ZCL_MULTI_VALUE_STATUS_FLAGS_MAX_VALUE 0x0f
|
||||
|
||||
/*! Maximum length of Description string field */
|
||||
#define ESP_ZB_ZCL_MULTI_VALUE_DESCRIPTION_MAX_LEN 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Occupancy Sensing cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_ID = 0x0000, /*!< Occupancy attribute identifier */
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ID = 0x0001, /*!< Occupancy Sensor Type attribute identifier */
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_BITMAP_ID = 0x0002, /*!< The OccupancySensorTypeBitmap attribute specifies the types of the occupancy sensor. */
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_ID = 0x0010, /*!< PIROccupiedToUnoccupiedDelay identifier */
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_ID = 0x0011, /*!< PIRUnoccupiedToOccupiedDelay identifier */
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_ID = 0x0012, /*!< PIRUnoccupiedToOccupiedThreshold identifier */
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ID = 0x0020,
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ID = 0x0021,
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ID = 0x0022,
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ID = 0x0030,
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ID = 0x0031,
|
||||
ESP_ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ID = 0x0032,
|
||||
}esp_zb_zcl_occupancy_sensing_attr_t;
|
||||
|
||||
/** @brief Default value for Occupancy Sensing cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_CLUSTER_REVISION_DEFAULT ((uint16_t)0x0002u)
|
||||
|
||||
/** @brief Minimal value for PIROccToUnoccDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_MIN_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximal value for PIROccToUnoccDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_MAX_VALUE ((uint16_t)0xfffe)
|
||||
|
||||
/** @brief Default value for PIROccToUnoccDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_DEFAULT_VALUE ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_MIN_VALUE
|
||||
|
||||
/** @brief Minimal value for PIRUnoccToOccDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_MIN_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximal value for PIRUnoccToOccDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_MAX_VALUE ((uint16_t)0xfffe)
|
||||
|
||||
/** @brief Default value for PIRUnoccToOccDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_DEFAULT_VALUE ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_MIN_VALUE
|
||||
|
||||
/** @brief Minimal value for PIRUnoccToOccThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_MIN_VALUE ((uint8_t)0x01)
|
||||
|
||||
/** @brief Maximal value for PIRUnoccToOccThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_MAX_VALUE ((uint8_t)0xfe)
|
||||
|
||||
/** @brief Default value for PIRUnoccToOccThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_DEFAULT_VALUE ESP_ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_MIN_VALUE
|
||||
|
||||
/** @brief Minimal value for UltrasonicOccupiedToUnoccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_MIN_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximal value for UltrasonicOccupiedToUnoccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_MAX_VALUE ((uint16_t)0xfffe)
|
||||
|
||||
/** @brief Default value for UltrasonicOccupiedToUnoccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_DEFAULT_VALUE ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_MIN_VALUE
|
||||
|
||||
/** @brief Minimal value for UltrasonicUnoccupiedToOccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_MIN_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximal value for UltrasonicUnoccupiedToOccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_MAX_VALUE ((uint16_t)0xfffe)
|
||||
|
||||
/** @brief Default value for UltrasonicUnoccupiedToOccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_DEFAULT_VALUE ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_MIN_VALUE
|
||||
|
||||
/** @brief Minimal value for UltrasonicUnoccupiedToOccupiedThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_MIN_VALUE ((uint8_t)0x01)
|
||||
|
||||
/** @brief Maximal value for UltrasonicUnoccupiedToOccupiedThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_MAX_VALUE ((uint8_t)0xfe)
|
||||
|
||||
/** @brief Default value for UltrasonicUnoccupiedToOccupiedThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_DEFAULT_VALUE ESP_ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_MIN_VALUE
|
||||
|
||||
/** @brief Default value for PhysicalContactOccupiedToUnoccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief No-reporting value for PhysicalContactOccupiedToUnoccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_NO_REPORTING_VALUE ((uint16_t)0xffff)
|
||||
|
||||
/** @brief Default value for PhysicalContactUnoccupiedToOccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief No-reporting value for PhysicalContactUnoccupiedToOccupiedDelay attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_NO_REPORTING_VALUE ((uint16_t)0xffff)
|
||||
|
||||
/** @brief Minimal value for PhysicalContactUnoccupiedToOccupiedThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_MIN_VALUE ((uint8_t)0x01)
|
||||
|
||||
/** @brief Maximal value for PhysicalContactUnoccupiedToOccupiedThreshold attribute */
|
||||
#define ESP_ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_MAX_VALUE ((uint8_t)0xfe)
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_UNOCCUPIED = 0, /*!< Unoccupied value */
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_OCCUPIED = 1 /*!< Occupied value */
|
||||
}esp_zb_zcl_occupancy_sensing_occupancy_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR = 0, /*!< PIR value */
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ULTRASONIC = 1, /*!< Ultrasonic value */
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR_AND_ULTRASONIC = 2, /*!< PIR and Ultrasonic value */
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_RESERVED = 3 /*!< Reserved value */
|
||||
}esp_zb_zcl_occupancy_sensing_occupancy_sensor_type_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CUSTOM_OCCUPANCY_SENSING_REPORING_MODE_TYPE_REGULAR_REPORTING = 0,
|
||||
ESP_ZB_ZCL_CUSTOM_OCCUPANCY_SENSING_REPORING_MODE_TYPE_LOW_POWER_REPORTING = 1
|
||||
}esp_zb_zcl_custom_reporting_mode_type_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_CUSTOM_DEBUG_MODE_TYPE_SHORT = 0,
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_CUSTOM_DEBUG_MODE_TYPE_ENHANCED = 1,
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_CUSTOM_DEBUG_MODE_TYPE_DEBUG = 2
|
||||
}esp_zb_zcl_custom_debug_mode_type_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_CUSTOM_LEARN_NOT_YET_PERFORMED = 0,
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_CUSTOM_LEARN_IN_PROGRESS = 1,
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_CUSTOM_LEARN_FINISHED_WITH_A_FAILURE = 2,
|
||||
ESP_ZB_ZCL_OCCUPANCY_SENSING_CUSTOM_LEARN_FINISHED_SUCCSESSFULLY = 3
|
||||
}esp_zb_zcl_custom_learn_type_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief On/Off cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID = 0, /*!< OnOff attribute */
|
||||
ESP_ZB_ZCL_ATTR_ON_OFF_GLOBAL_SCENE_CONTROL = 0x4000, /*!< Global Scene Control attribute identifier. */
|
||||
ESP_ZB_ZCL_ATTR_ON_OFF_ON_TIME = 0x4001, /*!< On Time attribute identifier. */
|
||||
ESP_ZB_ZCL_ATTR_ON_OFF_OFF_WAIT_TIME = 0x4002, /*!< Off Wait Time attribute identifier. */
|
||||
ESP_ZB_ZCL_ATTR_ON_OFF_START_UP_ON_OFF = 0x4003, /*!< Define the desired startup behavior */
|
||||
} esp_zb_zcl_on_off_attr_t;
|
||||
|
||||
/** @brief Default value for OnOff attribute */
|
||||
#define ESP_ZB_ZCL_ON_OFF_ON_OFF_DEFAULT_VALUE ((bool)0x00)
|
||||
|
||||
/** @brief Default value for GlobalSceneControl attribute */
|
||||
#define ESP_ZB_ZCL_ON_OFF_GLOBAL_SCENE_CONTROL_DEFAULT_VALUE ((bool)0x01)
|
||||
|
||||
/** @brief Default value for OnTime attribute */
|
||||
#define ESP_ZB_ZCL_ON_OFF_ON_TIME_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for OffWaitTime attribute */
|
||||
#define ESP_ZB_ZCL_ON_OFF_OFF_WAIT_TIME_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief On/Off cluster command identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_ON_OFF_OFF_ID = 0x00, /*!< "Turn off" command. */
|
||||
ESP_ZB_ZCL_CMD_ON_OFF_ON_ID = 0x01, /*!< "Turn on" command. */
|
||||
ESP_ZB_ZCL_CMD_ON_OFF_TOGGLE_ID = 0x02, /*!< "Toggle state" command. */
|
||||
ESP_ZB_ZCL_CMD_ON_OFF_OFF_WITH_EFFECT_ID = 0x40, /*!< "Off with effect" command. */
|
||||
ESP_ZB_ZCL_CMD_ON_OFF_ON_WITH_RECALL_GLOBAL_SCENE_ID = 0x41, /*!< "On with recall global scene" command. */
|
||||
ESP_ZB_ZCL_CMD_ON_OFF_ON_WITH_TIMED_OFF_ID = 0x42, /*!< "On with timed off" command. */
|
||||
} esp_zb_zcl_on_off_cmd_id_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief on-off switch type attribute
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_TYPE_TOGGLE = 0, /*!< Toggle switch */
|
||||
ESP_ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_TYPE_MOMENTARY = 1, /*!< Momentary switch */
|
||||
ESP_ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_TYPE_MULTIFUNCTION = 2 /*!< Multifunction switch */
|
||||
} esp_zb_zcl_on_off_switch_configuration_switch_type_t;
|
||||
|
||||
|
||||
/** @brief on-off switch actions attribute
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_ACTIONS_TYPE1 = 0, /*!< First type command pattern */
|
||||
ESP_ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_ACTIONS_TYPE2 = 1, /*!< Second type command pattern */
|
||||
ESP_ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_ACTIONS_TOGGLE = 2 /*!< Toggle command pattern */
|
||||
} esp_zb_zcl_on_off_switch_configuration_switch_actions_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief OTA upgrade cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ID = 0x0000, /*!< Indicates the address of the upgrade server */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_FILE_OFFSET_ID = 0x0001, /*!< Indicates the the current location in the OTA upgrade image */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID = 0x0002, /*!< Indicates the file version of the running firmware image on the device */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_STACK_VERSION_ID = 0x0003, /*!< Brief CurrentZigbeeStackVersion attribute */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_ID = 0x0004, /*!< Indicates the file version of the downloaded image on the device */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_STACK_VERSION_ID = 0x0005, /*!< Brief DownloadedZigbeeStackVersion attribute */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STATUS_ID = 0x0006, /*!< Indicates the image upgrade status of the client device */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_MANUFACTURE_ID = 0x0007, /*!< Indicates the value for the manufacturer of the device */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID = 0x0008, /*!< Indicates the the image type of the file that the client is currently downloading */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_MIN_BLOCK_REQUE_ID = 0x0009, /*!< Indicates the delay between Image Block Request commands in milliseconds */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STAMP_ID = 0x000a, /*!< Brief Image Stamp attribute */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_UPGRADE_ACTIVATION_POLICY_ID = 0x000b, /*!< Indicates what behavior the client device supports for activating a fully downloaded but not installed upgrade image */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_UPGRADE_TIMEOUT_POLICY_ID = 0x000c, /*!< Indicates what behavior the client device supports for activating a fully downloaded image when the OTA server cannot be reached */
|
||||
/* Server variables and Custom data */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ENDPOINT_ID = 0xfff3, /*!< Brief OTA server endpoint custom attribute */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ADDR_ID = 0xfff2, /*!< Brief OTA server addr custom attribute */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_CLIENT_DATA_ID = 0xfff1, /*!< Brief OTA client data attribute, its type can refer to esp_zb_zcl_ota_upgrade_client_variable_t */
|
||||
ESP_ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_DATA_ID = 0xfff0, /*!< Brief OTA server data attribute, its type can refer to esp_zb_zcl_ota_upgrade_server_variable_t */
|
||||
} esp_zb_zcl_ota_upgrade_attr_t;
|
||||
|
||||
/** @brief Default value for UpgradeServerID attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_SERVER_DEF_VALUE { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
|
||||
|
||||
/** @brief Default value for FileOffset attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_FILE_OFFSET_DEF_VALUE 0xffffffff
|
||||
|
||||
/** @brief Default value for CurrentFileVersion attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_FILE_VERSION_DEF_VALUE 0xffffffff
|
||||
|
||||
/** @brief Default value for CurrentZigbeeStackVersion attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_STACK_VERSION_DEF_VALUE 0xffff
|
||||
|
||||
/** @brief Default value for DownloadedFileVersion attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_DEF_VALUE 0xffffffff
|
||||
|
||||
/** @brief Default value for DownloadedZigbeeStackVersion attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_DOWNLOADED_STACK_DEF_VALUE 0xffff
|
||||
|
||||
/** @brief Default value for ManufacturerCode attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_MANUFACTURER_CODE_DEF_VALUE 0x131B
|
||||
|
||||
/** @brief Default value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_IMAGE_TYPE_DEF_VALUE 0xffbf
|
||||
|
||||
/** @brief Manufacturer Specific minimun value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_MANUFACTURER_SPECIFIC_IMAGE_TYPE_MIN_VALUE 0x0000
|
||||
|
||||
/** @brief Manufacturer Specific maximum value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_MANUFACTURER_SPECIFIC_IMAGE_TYPE_MAX_VALUE 0xffbf
|
||||
|
||||
/** @brief Client Security credentials value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_CLI_SECURITY_CREDENTIALS_IMAGE_TYPE_VALUE 0xffc0
|
||||
|
||||
/** @brief Client Configuration value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_CLI_CONFIG_IMAGE_TYPE_VALUE 0xffc1
|
||||
|
||||
/** @brief Server Log value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_SERVER_LOG_IMAGE_TYPE_VALUE 0xffc2
|
||||
|
||||
/** @brief Picture value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_PICTURE_IMAGE_TYPE_VALUE 0xffc3
|
||||
|
||||
/** @brief Wild card value for ImageType attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_WILD_CARD_IMAGE_TYPE_VALUE 0xffff
|
||||
|
||||
/** @brief Default value for ImageUpgradeStatus attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DEF_VALUE 0x00
|
||||
|
||||
/** @brief Default value for MinimumBlockPeriod attribute */
|
||||
#define ESP_ZB_OTA_UPGRADE_MIN_BLOCK_PERIOD_DEF_VALUE 0x0000
|
||||
|
||||
/** @brief Maximum value for ImageStamp attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_IMAGE_STAMP_DEF_VALUE 0xffffffff
|
||||
|
||||
/** @brief Default value for OTA server endpoint custom attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_SERVER_ENDPOINT_DEF_VALUE 0xff
|
||||
|
||||
/** @brief Default value for OTA server addr custom attribute */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_SERVER_ADDR_DEF_VALUE 0xffff
|
||||
|
||||
/** @brief Default Frequency request server about new upgrade file (minutes) */
|
||||
#define ESP_ZB_ZCL_OTA_UPGRADE_QUERY_TIMER_COUNT_DEF (24*60)
|
||||
|
||||
/** @brief Possible statuses of OTA upgrade
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_START = 0x0000, /*!< Starts OTA upgrade */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_APPLY = 0x0001, /*!< Checks for manufacturer, image type etc are ok last step before actual upgrade */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_RECEIVE = 0x0002, /*!< Process image block */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_FINISH = 0x0003, /*!< OTA upgrade completed */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_ABORT = 0x0004, /*!< OTA upgrade aborted */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_CHECK = 0x0005, /*!< Downloading is finished, do additional checks if needed etc before upgrade end request */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_OK = 0x0006, /*!< OTA upgrade end response is ok */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_ERROR = 0x0007, /*!< OTA upgrade return error code */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_NORMAL = 0x0008, /*!< Accepted new image */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_BUSY = 0x0009, /*!< Another download is in progress, deny new image */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_STATUS_SERVER_NOT_FOUND = 0x000A /*!< Notify an application that OTA Upgrade server not found */
|
||||
} esp_zb_zcl_ota_upgrade_status_t;
|
||||
|
||||
/** @brief The status of OTA upgrade server */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_SERVER_STARTED = 0x00, /*!< Start OTA */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_SERVER_ABORTED = 0x01, /*!< Abort OTA */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_SERVER_END = 0x02, /*!< End OTA */
|
||||
} esp_zb_ota_upgrade_server_status_t;
|
||||
|
||||
/** @brief OTA File header - fc fields bitmasks */
|
||||
typedef enum esp_zb_zcl_ota_upgrade_file_header_fc_e {
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_CREDENTIAL_VER = 1 << 0, /*!< Indicate that the Security Credential Version field will be included. */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_DEVICE_SPECIFIC = 1 << 1, /*!< Indicate that the Device Specific field will be included. */
|
||||
ESP_ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_HW_VER = 1 << 2, /*!< Indicate that the Hardware Versions Present field will be included. */
|
||||
} esp_zb_zcl_ota_upgrade_file_header_fc_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief pH_Measurement cluster server attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_PH_MEASUREMENT_MEASURED_VALUE_ID = 0x0000, /**< MeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_PH_MEASUREMENT_MIN_MEASURED_VALUE_ID = 0x0001, /**< MinMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_PH_MEASUREMENT_MAX_MEASURED_VALUE_ID = 0x0002, /**< MaxMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_PH_MEASUREMENT_TOLERANCE_ID = 0x0003, /**< Tolerance Attribute */
|
||||
} esp_zb_zcl_ph_measurement_srv_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM ((uint16_t)0x0577)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM ((uint16_t)0x0001)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM ((uint16_t)0x0578)
|
||||
|
||||
/** @brief Minimum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_TOLERANCE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_TOLERANCE_MAXIMUM ((uint16_t)0x00c8)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PH_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
void esp_zb_zcl_ph_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_PH_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_ph_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_PH_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief PM2.5 Measurement cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_PM2_5_MEASUREMENT_MEASURED_VALUE_ID = 0x0000, /*!< MeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_PM2_5_MEASUREMENT_MIN_MEASURED_VALUE_ID = 0x0001, /*!< MinMeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_PM2_5_MEASUREMENT_MAX_MEASURED_VALUE_ID = 0x0002, /*!< MaxMeasuredValue attribute */
|
||||
ESP_ZB_ZCL_ATTR_PM2_5_MEASUREMENT_TOLERANCE_ID = 0x0003, /*!< Tolerance attribute */
|
||||
} esp_zb_zcl_pm2_5_measurement_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM (0.0)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM (1.0)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM (0.0)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM (1.0)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_PM2_5_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_NaN
|
||||
|
||||
void esp_zb_zcl_pm2_5_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_PM2_5_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_pm2_5_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_PM2_5_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Power configuration cluster information attribute set identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_ID = 0x0000, /*!< MainsVoltage attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_MAINS_FREQUENCY_ID = 0x0001, /*!< MainsFrequency attribute */
|
||||
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_MAINS_ALARM_MASK_ID = 0x0010, /*!< MainsAlarmMask attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_MIN_THRESHOLD = 0x0011, /*!< MainsVoltageMinThreshold attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_MAX_THRESHOLD = 0x0012, /*!< MainsVoltageMaxThreshold attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_MAINS_DWELL_TRIP_POINT = 0x0013, /*!< MainsVoltageDwellTripPoint attribute */
|
||||
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_ID = 0x0020, /*!< BatteryVoltage attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_REMAINING_ID = 0x0021, /*!< BatteryPercentageRemaining attribute */
|
||||
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_MANUFACTURER_ID = 0x0030, /*!< Name of the battery manufacturer as a character string. */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_SIZE_ID = 0x0031, /*!< BatterySize attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_A_HR_RATING_ID = 0x0032, /*!< The Ampere-hour rating of the battery, measured in units of 10mAHr. */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_QUANTITY_ID = 0x0033, /*!< BatteryQuantity attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_RATED_VOLTAGE_ID = 0x0034, /*!< BatteryRatedVoltage attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_ALARM_MASK_ID = 0x0035, /*!< BatteryAlarmMask attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_MIN_THRESHOLD_ID = 0x0036, /*!< BatteryVoltageMinThreshold attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD1_ID = 0x0037, /*!< BatteryVoltageThreshold1 attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD2_ID = 0x0038, /*!< BatteryVoltageThreshold2 attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD3_ID = 0x0039, /*!< BatteryVoltageThreshold3 attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_MIN_THRESHOLD_ID = 0x003a, /*!< BatteryPercentageMinThreshold attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD1_ID = 0x003b, /*!< BatteryPercentageThreshold1 attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD2_ID = 0x003c, /*!< BatteryPercentageThreshold2 attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD3_ID = 0x003d, /*!< BatteryPercentageThreshold3 attribute */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_ALARM_STATE_ID = 0x003e, /*!< BatteryAlarmState attribute */
|
||||
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_ID = 0x0040, /*!< Battery Information 2 attribute set */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_REMAINING_ID = 0x0041,
|
||||
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_MANUFACTURER_ID = 0x0050, /*!< Battery Settings 2 attribute set */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_SIZE_ID = 0x0051,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_A_HR_RATING_ID = 0x0052,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_QUANTITY_ID = 0x0053,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_RATED_VOLTAGE_ID = 0x0054,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_ALARM_MASK_ID = 0x0055,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_MIN_THRESHOLD_ID = 0x0056,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_THRESHOLD1_ID = 0x0057,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_THRESHOLD2_ID = 0x0058,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_THRESHOLD3_ID = 0x0059,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_MIN_THRESHOLD_ID = 0x005a,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_THRESHOLD1_ID = 0x005b,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_THRESHOLD2_ID = 0x005c,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_THRESHOLD3_ID = 0x005d,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_ALARM_STATE_ID = 0x005e,
|
||||
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_ID = 0x0060, /*!< Battery Information 3 attribute set */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_REMAINING_ID = 0x0061,
|
||||
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_MANUFACTURER_ID = 0x0070, /*!< Battery Settings 3 attribute set */
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_SIZE_ID = 0x0071,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_A_HR_RATING_ID = 0x0072,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_QUANTITY_ID = 0x0073,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_RATED_VOLTAGE_ID = 0x0074,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_ALARM_MASK_ID = 0x0075,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_MIN_THRESHOLD_ID = 0x0076,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_THRESHOLD1_ID = 0x0077,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_THRESHOLD2_ID = 0x0078,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_THRESHOLD3_ID = 0x0079,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_MIN_THRESHOLD_ID = 0x007a,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_THRESHOLD1_ID = 0x007b,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_THRESHOLD2_ID = 0x007c,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_THRESHOLD3_ID = 0x007d,
|
||||
ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_ALARM_STATE_ID = 0x007e,
|
||||
} esp_zb_zcl_power_config_attr_t;
|
||||
|
||||
/**
|
||||
* @brief Power Configuration MainsAlarmMask value
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_LOW = 0x01, /*!< MainsAlarmMask - Mains Voltage too low */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_HIGH = 0x02, /*!< MainsAlarmMask - Mains Voltage too high */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_UNAVAIL = 0x04, /*!< MainsAlarmMask - Mains power supply lost/unavailable */
|
||||
} esp_zb_zcl_power_config_mains_alarm_mask_t;
|
||||
|
||||
/**
|
||||
* @brief Power Configuration BatterySize value
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_NO_BATTERY = 0, /*!< BatterySize - no battery*/
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_BUILT_IN = 1, /*!< BatterySize - built in */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_OTHER = 2, /*!< BatterySize - other */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_AA = 3, /*!< BatterySize - AA */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_AAA = 4, /*!< BatterySize - AAA */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_C = 5, /*!< BatterySize - C */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_D = 6, /*!< BatterySize - D */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_CR2 = 7, /*!< BatterySize - CR2 */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_CR123A = 8, /*!< BatterySize - CR123A */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_UNKNOWN = 0xff, /*!< BatterySize - unknown */
|
||||
} esp_zb_zcl_power_config_battery_size_t;
|
||||
|
||||
/**
|
||||
* @brief Power Configuration BatteryAlarmMask value
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_VOLTAGE_LOW = 0, /*!< BatteryAlarmMask - Battery voltage too low */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM1 = 1, /*!< BatteryAlarmMask - Alarm1 */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM2 = 2, /*!< BatteryAlarmMask - Alarm2 */
|
||||
ESP_ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM3 = 3, /*!< BatteryAlarmMask - Alarm3 */
|
||||
} esp_zb_zcl_power_config_battery_alarm_mask_t;
|
||||
|
||||
/** @brief Default value for MainsAlarmMask attribute */
|
||||
#define ESP_ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_DEFAULT_VALUE ((uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for MainsVoltageMinThreshold attribute */
|
||||
#define ESP_ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_MIN_THRESHOLD_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for MainsVoltageMaxThreshold attribute */
|
||||
#define ESP_ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_MAX_THRESHOLD_DEFAULT_VALUE ((uint16_t)0xFFFF)
|
||||
|
||||
/** @brief Default value for MainsDwellTripPoint attribute */
|
||||
#define ESP_ZB_ZCL_POWER_CONFIG_MAINS_DWELL_TRIP_POINT_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Pressure Measurement cluster attribute identifiers
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_VALUE_ID = 0x0000, /*!< MeasuredValue */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_VALUE_ID = 0x0001, /*!< MinMeasuredValue */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_VALUE_ID = 0x0002, /*!< MaxMeasuredValue */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_TOLERANCE_ID = 0x0003, /*!< MeasuredTolerance */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_SCALED_VALUE_ID = 0x0010, /*!< ScaledValue */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_SCALED_VALUE_ID = 0x0011, /*!< MinScaledValue */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_SCALED_VALUE_ID = 0x0012, /*!< MaxScaledValue */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_SCALED_TOLERANCE_ID = 0x0013, /*!< ScaledTolerance */
|
||||
ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_SCALE_ID = 0x0014, /*!< Scale */
|
||||
}esp_zb_zcl_pressure_measurement_attr_t;
|
||||
|
||||
/** @brief Default value for Pressure Measurement cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_PRESSURE_MEASUREMENT_CLUSTER_REVISION_DEFAULT ((zb_uint16_t)0x0002u)
|
||||
|
||||
/** @brief MeasuredValue attribute unknown value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_VALUE_UNKNOWN ((int16_t)0x8000)
|
||||
|
||||
/** @brief MinMeasuredValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_VALUE_MIN_VALUE ((int16_t)0x954d)
|
||||
|
||||
/** @brief MinMeasuredValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_VALUE_MAX_VALUE ((int16_t)0x7ffe)
|
||||
|
||||
/** @brief MinMeasuredValue attribute invalid value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_VALUE_INVALID ((int16_t)0x8000)
|
||||
|
||||
/** @brief MaxMeasuredValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_VALUE_MIN_VALUE ((int16_t)0x954e)
|
||||
|
||||
/** @brief MaxMeasuredValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_VALUE_MAX_VALUE ((int16_t)0x7fff)
|
||||
|
||||
/** @brief MaxMeasuredValue attribute invalid value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_VALUE_INVALID ((int16_t)0x8000)
|
||||
|
||||
/** @brief Tolerance attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_TOLERANCE_MIN_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Tolerance attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_TOLERANCE_MAX_VALUE ((uint16_t)0x0800)
|
||||
|
||||
/** @brief Default value for Value attribute */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_VALUE_DEFAULT_VALUE ((int16_t)0xFFFF)
|
||||
|
||||
/** @brief Default value for MinValue attribute */
|
||||
#define ESP_ZB_ZCL_PATTR_RESSURE_MEASUREMENT_MIN_VALUE_DEFAULT_VALUE ((int16_t)0x8000)
|
||||
|
||||
/** @brief Default value for MaxValue attribute */
|
||||
#define ESP_ZB_ZCL_PATTR_RESSURE_MEASUREMENT_MAX_VALUE_DEFAULT_VALUE ((int16_t)0x8000)
|
||||
|
||||
/** @brief MinScaledValue attribute unknown value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_SCALED_VALUE_UNKNOWN ((int16_t)0x8000)
|
||||
|
||||
/** @brief MinScaledValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_SCALED_VALUE_MIN_VALUE ((int16_t)0x8001)
|
||||
|
||||
/** @brief MinScaledValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_SCALED_VALUE_MAX_VALUE ((int16_t)0x7ffe)
|
||||
|
||||
/** @brief MaxScaledValue attribute unknown value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_SCALED_VALUE_UNKNOWN ((int16_t)0x8000)
|
||||
|
||||
/** @brief MaxScaledValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_SCALED_VALUE_MIN_VALUE ((int16_t)0x8002)
|
||||
|
||||
/** @brief MaxScaledValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_SCALED_VALUE_MAX_VALUE ((int16_t)0x7fff)
|
||||
|
||||
/** @brief MaxScaledValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_SCALED_TOLERANCE_MIN_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief MaxScaledValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_SCALED_TOLERANCE_MAX_VALUE ((uint16_t)0x0800)
|
||||
|
||||
/** @brief MaxScaledValue attribute minimum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_SCALE_MIN_VALUE ((int8_t)0x81)
|
||||
|
||||
/** @brief MaxScaledValue attribute maximum value */
|
||||
#define ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_SCALE_MAX_VALUE ((int8_t)0x7f)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Scene cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID = 0x0000, /*!< Number of scenes currently in the device's scene table */
|
||||
ESP_ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID = 0x0001, /*!< Scene ID of the scene last invoked */
|
||||
ESP_ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID = 0x0002, /*!< Group ID of the scene last invoked */
|
||||
ESP_ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID = 0x0003, /*!< Indicates whether the state of the device corresponds to CurrentScene and CurrentGroup attributes */
|
||||
ESP_ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID = 0x0004, /*!< The most significant bit of the NameSupport attribute indicates whether or not scene names are supported */
|
||||
ESP_ZB_ZCL_ATTR_SCENES_LAST_CONFIGURED_BY_ID = 0x0005 /*!< specifies the IEEE address of the device that last configured the scene table */
|
||||
} esp_zb_zcl_scene_attr_t;
|
||||
|
||||
/** @brief Default value for Scene count attribute */
|
||||
#define ESP_ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Default value for Current scene attribute */
|
||||
#define ESP_ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Default value for Current group attribute */
|
||||
#define ESP_ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Default value for Scene valid attribute */
|
||||
#define ESP_ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Default value for Name support attribute */
|
||||
#define ESP_ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE 0
|
||||
|
||||
/** @brief Command identifiers for Scenes Cluster
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_SCENES_ADD_SCENE = 0x00, /*!< Add scene command */
|
||||
ESP_ZB_ZCL_CMD_SCENES_VIEW_SCENE = 0x01, /*!< View scene command */
|
||||
ESP_ZB_ZCL_CMD_SCENES_REMOVE_SCENE = 0x02, /*!< Remove scene command */
|
||||
ESP_ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES = 0x03, /*!< Remove all scenes command */
|
||||
ESP_ZB_ZCL_CMD_SCENES_STORE_SCENE = 0x04, /*!< Store scene command */
|
||||
ESP_ZB_ZCL_CMD_SCENES_RECALL_SCENE = 0x05, /*!< Recall scene command */
|
||||
ESP_ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP = 0x06, /*!< Get scene membership command */
|
||||
ESP_ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE = 0x40, /*!< The Enhanced Add Scene command allows a scene to be added using a finer scene transition time than the Add Scene command. */
|
||||
ESP_ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE = 0x41, /*!< The Enhanced View Scene command allows a scene to be retrieved using a finer scene transition time than the View Scene command. */
|
||||
ESP_ZB_ZCL_CMD_SCENES_COPY_SCENE = 0x42, /*!< The Copy Scene command allows a device to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
|
||||
} esp_zb_zcl_scenes_cmd_id_t;
|
||||
|
||||
/** @brief Response command identifiers for Scenes Cluster
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_SCENES_ADD_SCENE_RESPONSE = 0x00, /*!< Add scene response */
|
||||
ESP_ZB_ZCL_CMD_SCENES_VIEW_SCENE_RESPONSE = 0x01, /*!< View scene response */
|
||||
ESP_ZB_ZCL_CMD_SCENES_REMOVE_SCENE_RESPONSE = 0x02, /*!< Remove scene response */
|
||||
ESP_ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES_RESPONSE = 0x03, /*!< Remove all scenes response */
|
||||
ESP_ZB_ZCL_CMD_SCENES_STORE_SCENE_RESPONSE = 0x04, /*!< Store scene response */
|
||||
ESP_ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP_RESPONSE = 0x06, /*!< Get scene membership response */
|
||||
ESP_ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE_RESPONSE = 0x40, /*!< The Enhanced Add Scene Response command allows a device to respond to an Enhanced Add Scene command.*/
|
||||
ESP_ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE_RESPONSE = 0x41, /*!< The Enhanced View Scene Response command allows a device to respond to an Enhanced View Scene command
|
||||
using a finer scene transition time that was available in the ZCL. */
|
||||
ESP_ZB_ZCL_CMD_SCENES_COPY_SCENE_RESPONSE = 0x42, /*!< The Copy Scene Response command allows a device to respond to a Copy Scene command.*/
|
||||
} esp_zb_zcl_scenes_cmd_resp_id_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Shade Configuration cluster information attribute set identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_SHADE_CONFIG_PHYSICAL_CLOSED_LIMIT_ID = 0x0000, /*!< It indicates the most closed (numerically lowest) position that the shade can physically move to. */
|
||||
ESP_ZB_ZCL_ATTR_SHADE_CONFIG_MOTOR_STEP_SIZE_ID = 0x0001, /*!< It indicates the angle the shade motor moves for one step, measured in 1/10ths of a degree. */
|
||||
ESP_ZB_ZCL_ATTR_SHADE_CONFIG_STATUS_ID = 0x0002 /*!< Status attribute */
|
||||
} esp_zb_zcl_shade_config_info_attr_t;
|
||||
|
||||
/** @brief Shade Configuration Status attribute default value */
|
||||
#define ESP_ZB_ZCL_SHADE_CONFIG_STATUS_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief ClosedLimit attribute default value */
|
||||
#define ESP_ZB_ZCL_SHADE_CONFIG_CLOSED_LIMIT_DEFAULT_VALUE 0x0001
|
||||
|
||||
/** @brief Mode attribute default value */
|
||||
#define ESP_ZB_ZCL_SHADE_CONFIG_MODE_DEFAULT_VALUE 0x00
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Temperature Measurement cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID = 0x0000, /*!< MeasuredValue */
|
||||
ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MIN_VALUE_ID = 0x0001, /*!< MinMeasuredValue*/
|
||||
ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MAX_VALUE_ID = 0x0002, /*!< MaxMeasuredValue */
|
||||
ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_TOLERANCE_ID = 0x0003, /*!< Tolerance */
|
||||
} esp_zb_zcl_temp_measurement_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM ((int16_t)0x954d)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM ((int16_t)0x7ffe)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM ((int16_t)0x954e)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM ((int16_t)0x7fff)
|
||||
|
||||
/** @brief Minimum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_TOLERANCE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_TOLERANCE_MAXIMUM ((uint16_t)0x0800)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_S16_NONE
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_S16_NONE
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_S16_NONE
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_S16_NONE
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_S16_NONE
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_TEMP_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_S16_NONE
|
||||
|
||||
void esp_zb_zcl_temp_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_temp_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,556 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Thermostat cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_LOCAL_TEMPERATURE_ID = 0x0000, /*!< Local Temperature attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_OUTDOOR_TEMPERATURE_ID = 0x0001, /*!< Outdoor Temperature attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_OCCUPANCY_ID = 0x0002, /*!< Occupancy attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_ABS_MIN_HEAT_SETPOINT_LIMIT_ID = 0x0003, /*!< The AbsMinHeatSetpointLimit attribute specifies the absolute minimum level that the heating setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_ABS_MAX_HEAT_SETPOINT_LIMIT_ID = 0x0004, /*!< The AbsMaxHeatSetpointLimit attribute specifies the absolute maximum level that the heating setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_ABS_MIN_COOL_SETPOINT_LIMIT_ID = 0x0005, /*!< The AbsMinCoolSetpointLimit attribute specifies the absolute minimum level that the cooling setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_ABS_MAX_COOL_SETPOINT_LIMIT_ID = 0x0006, /*!< The AbsMaxCoolSetpointLimit attribute specifies the absolute maximum level that the cooling setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_PI_COOLING_DEMAND_ID = 0x0007, /*!< The PICoolingDemand attribute is 8 bits in length and specifies the level of cooling demanded by the PI (proportional integral) control loop in use by the thermostat (if any), in percent */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_PI_HEATING_DEMAND_ID = 0x0008, /*!< The PIHeatingDemand attribute is 8 bits in length and specifies the level of heating demanded by the PI loop in percent */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_HVAC_SYSTEM_TYPE_CONFIGURATION_ID = 0x0009, /*!< The HVACSystemTypeConfiguration attribute specifies the HVAC system type controlled by the thermostat */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_LOCAL_TEMPERATURE_CALIBRATION_ID = 0x0010, /*!< Local Temperature Calibration */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_OCCUPIED_COOLING_SETPOINT_ID = 0x0011, /*!< Occupied Cooling Setpoint attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_OCCUPIED_HEATING_SETPOINT_ID = 0x0012, /*!< Occupied Heating Setpoint attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UNOCCUPIED_COOLING_SETPOINT_ID = 0x0013, /*!< Unoccupied Cooling Setpoint attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UNOCCUPIED_HEATING_SETPOINT_ID = 0x0014, /*!< Unoccupied Heating Setpoint attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_MIN_HEAT_SETPOINT_LIMIT_ID = 0x0015, /*!< The MinHeatSetpointLimit attribute specifies the minimum level that the heating setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_MAX_HEAT_SETPOINT_LIMIT_ID = 0x0016, /*!< The MaxHeatSetpointLimit attribute specifies the maximum level that the heating setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_MIN_COOL_SETPOINT_LIMIT_ID = 0x0017, /*!< The MinCoolSetpointLimit attribute specifies the minimum level that the cooling setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_MAX_COOL_SETPOINT_LIMIT_ID = 0x0018, /*!< The MaxCoolSetpointLimit attribute specifies the maximum level that the cooling setpoint MAY be set to */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_MIN_SETPOINT_DEAD_BAND_ID = 0x0019, /*!< The MinSetpointDeadBand attribute specifies the minimum difference between the Heat Setpoint and the Cool SetPoint, in steps of 0.1C */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_REMOTE_SENSING_ID = 0x001a, /*!< The RemoteSensing attribute is an 8-bit bitmap that specifies whether the local temperature, outdoor temperature and occupancy are being sensed by internal sensors or remote networked sensors */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_CONTROL_SEQUENCE_OF_OPERATION_ID = 0x001b, /*!< Control Sequence Of Operation attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_SYSTEM_MODE_ID = 0x001c, /*!< System Mode attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_ALARM_MASK_ID = 0x001d, /*!< The AlarmMask attribute specifies whether each of the alarms is enabled */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_RUNNING_MODE_ID = 0x001e, /*!< Thermostat Running Mode attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_START_OF_WEEK_ID = 0x0020, /*!< Start of Week attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_NUMBER_OF_WEEKLY_TRANSITIONS_ID = 0x0021, /*!< NumberOfWeeklyTransitions attribute determines how many weekly schedule transitions the thermostat is capable of handling */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_NUMBER_OF_DAILY_TRANSITIONS_ID = 0x0022, /*!< NumberOfDailyTransitions attribute determines how many daily schedule transitions the thermostat is capable of handling */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_ID = 0x0023, /*!< TemperatureSetpointHold specifies the temperature hold status on the thermostat */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_DURATION_ID = 0x0024, /*!< TemperatureSetpointHoldDuration sets the period in minutes for which a setpoint hold is active */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_THERMOSTAT_PROGRAMMING_OPERATION_MODE_ID = 0x0025, /*!< The ThermostatProgrammingOperationMode attribute determines the operational state of the thermostats programming */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_THERMOSTAT_RUNNING_STATE_ID = 0x0029, /*!< ThermostatRunningState represents the current relay state of the heat, cool, and fan relays */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_SETPOINT_CHANGE_SOURCE_ID = 0x0030, /*!< The SetpointChangeSource attribute specifies the source of the current active OccupiedCoolingSetpoint or OccupiedHeatingSetpoint (i.e., who or what determined the current setpoint) */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_SETPOINT_CHANGE_AMOUNT_ID = 0x0031, /*!< The SetpointChangeAmount attribute specifies the delta between the current active OccupiedCoolingSetpoint or OccupiedHeatingSetpoint and the previous active setpoint */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_SETPOINT_CHANGE_SOURCE_TIMESTAMP_ID = 0x0032, /*!< The SetpointChangeSourceTimestamp attribute specifies the time in UTC at which the SetpointChangeSourceAmount attribute change was recorded */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_OCCUPIED_SETBACK_ID = 0x0034, /*!< Specifies the degrees Celsius, in 0.1 degree increments, the Thermostat server will allow the LocalTemperature attribute to float above the OccupiedCooling setpoint or below the OccupiedHeating setpoint before initiating a state change to bring the temperature back to the users desired setpoint */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_OCCUPIED_SETBACK_MIN_ID = 0x0035, /*!< Specifies the minimum degrees Celsius, in 0.1 degree increments, the Thermostat server will allow the OccupiedSetback attribute to be configured by a user */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_OCCUPIED_SETBACK_MAX_ID = 0x0036, /*!< Specifies the maximum degrees Celsius, in 0.1 degree increments, the Thermostat server will allow the OccupiedSetback attribute to be configured by a user */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UNOCCUPIED_SETBACK_ID = 0x0037, /*!< Specifies the degrees Celsius, in 0.1 degree increments, the Thermostat server will allow the LocalTemperature attribute to float above the UnoccupiedCooling setpoint or below the UnoccupiedHeating setpoint before initiating a state change to bring the temperature back to the users desired setpoint */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UNOCCUPIED_SETBACK_MIN_ID = 0x0038, /*!< Specifies the minimum degrees Celsius, in 0.1 degree increments, the Thermostat server will allow the UnoccupiedSetback attribute to be configured by a user */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UNOCCUPIED_SETBACK_MAX_ID = 0x0039, /*!< Specifies the maximum degrees Celsius, in 0.1 degree increments, the Thermostat server will allow the UnoccupiedSetback attribute to be configured by a user. */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_EMERGENCY_HEAT_DELTA_ID = 0x003a, /*!< Specifies the delta, in 0.1 degrees Celsius, between LocalTemperature and the OccupiedHeatingSetpoint or UnoccupiedHeatingSetpoint attributes at which the Thermostat server will operate in emergency heat mode */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_TYPE_ID = 0x0040, /*!< Indicates the type of Mini Split ACType of Mini Split AC is defined depending on how Cooling and Heating condition is achieved by Mini Split AC */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_CAPACITY_ID = 0x0041, /*!< Indicates capacity of Mini Split AC in terms of the format defined by the ACCapacityFormat attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_REFRIGERANT_TYPE_ID = 0x0042, /*!< Indicates type of refrigerant used within the Mini Split AC */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_COMPRESSOR_TYPE_ID = 0x0043, /*!< This indicates type of Compressor used within the Mini Split AC */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_ERROR_CODE_ID = 0x0044, /*!< This indicates the type of errors encountered within the Mini Split AC */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_LOUVER_POSITION_ID = 0x0045, /*!< AC Louver position attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_COIL_TEMPERATURE_ID = 0x0046, /*!< ACCoilTemperature represents the temperature in degrees Celsius, as measured locally or remotely (over the network) */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_AC_CAPACITY_FORMAT_ID = 0x0047, /*!< This is the format for the ACCapacity attribute */
|
||||
} esp_zb_zcl_thermostat_attr_t;
|
||||
|
||||
/** @brief Thermostat cluster command identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_THERMOSTAT_SETPOINT_RAISE_LOWER = 0x00, /*!< Setpoint Raise/Lower command */
|
||||
ESP_ZB_ZCL_CMD_THERMOSTAT_SET_WEEKLY_SCHEDULE = 0x01, /*!< Set Weekly Schedule command */
|
||||
ESP_ZB_ZCL_CMD_THERMOSTAT_GET_WEEKLY_SCHEDULE = 0x02, /*!< Get Weekly Schedule command */
|
||||
ESP_ZB_ZCL_CMD_THERMOSTAT_CLEAR_WEEKLY_SCHEDULE = 0x03, /*!< Clear Weekly Schedule command */
|
||||
ESP_ZB_ZCL_CMD_THERMOSTAT_GET_RELAY_STATUS_LOG = 0x04 /*!< Get Relay Status Log command */
|
||||
} esp_zb_zcl_thermostat_cmd_id_t;
|
||||
|
||||
/** @brief Thermostat cluster command identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_CMD_THERMOSTAT_GET_WEEKLY_SCHEDULE_RESP = 0x00, /*!< Get Weekly Schedule response command */
|
||||
ESP_ZB_ZCL_CMD_THERMOSTAT_GET_RELAY_STATUS_LOG_RESP = 0x01 /*!< Get Relay Status Log response command */
|
||||
} esp_zb_zcl_thermostat_cmd_resp_id_t;
|
||||
|
||||
/** @brief Values for Control Sequence Of Operation attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_COOLING_ONLY = 0x00, /*!< Cooling Only value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_COOLING_WITH_REHEAT = 0x01, /*!< Cooling With Reheat value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_HEATING_ONLY = 0x02, /*!< Heating Only value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_HEATING_WITH_REHEAT = 0x03, /*!< Heating With Reheat value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_COOLING_AND_HEATING_4_PIPES = 0x04, /*!< Cooling and Heating 4-pipes value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_COOLING_AND_HEATING_4_PIPES_WITH_REHEAT = 0x05, /*!< Cooling and Heating 4-pipes with Reheat value */
|
||||
} esp_zb_zcl_thermostat_control_sequence_of_operation_t;
|
||||
|
||||
/** @brief Values for System Mode attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_OFF = 0x00, /*!< Off value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_AUTO = 0x01, /*!< Auto value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_COOL = 0x03, /*!< Cool value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_HEAT = 0x04, /*!< Heat value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_EMERGENCY_HEATING = 0x05, /*!< Emergency Heating value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_PRECOOLING = 0x06, /*!< Precooling value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_FAN_ONLY = 0x07, /*!< Fan Only value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_DRY = 0x08, /*!< Dry value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_SLEEP = 0x09, /*!< Sleep value */
|
||||
} esp_zb_zcl_thermostat_system_mode_t;
|
||||
|
||||
|
||||
/** @brief Values for AC Louver position attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_LOUVER_FULLY_CLOSED = 0x01, /*!< Fully close */
|
||||
ESP_ZB_ZCL_THERMOSTAT_LOUVER_FULLY_OPEN = 0x02, /*!< Fully open */
|
||||
ESP_ZB_ZCL_THERMOSTAT_LOUVER_QUARTER_OPEN = 0x03, /*!< Qyarter open */
|
||||
ESP_ZB_ZCL_THERMOSTAT_LOUVER_HALF_OPEN = 0x04, /*!< Half open */
|
||||
ESP_ZB_ZCL_THERMOSTAT_LOUVER_THREE_QUARTERS_OPEN = 0x05, /*!< Three quaters open */
|
||||
} esp_zb_zcl_thermostat_ac_louver_position_t;
|
||||
|
||||
/** @brief Values for Start of Week attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_SUNDAY = 0x00, /*!< Sunday value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_MONDAY = 0x01, /*!< Monday value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_TUESDAY = 0x02, /*!< Tuesday value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_WEDNESDAY = 0x03, /*!< Wednesday value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_THURSDAY = 0x04, /*!< Thursday value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_FRIDAY = 0x05, /*!< Friday value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_SATURDAY = 0x06, /*!< Saturday value */
|
||||
} esp_zb_zcl_thermostat_start_of_week_t;
|
||||
|
||||
/** @brief Values for Temperature Setpoint Hold attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_OFF = 0x00, /*!< Off value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_ON = 0x01, /*!< On value */
|
||||
} esp_zb_zcl_thermostat_temperature_setpoint_hold_t;
|
||||
|
||||
/** @brief Values for AlarmMask attribute */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_ALARM_CODE_INITIALIZATION_FAILURE = 0x00, /*!< MainsVoltageAlarmCode - MainsVoltageMinThreshold reached for Mains Voltage**/
|
||||
ESP_ZB_ZCL_THERMOSTAT_ALARM_CODE_HARDWARE_FAILURE = 0x01, /*!< MainsVoltageAlarmCode - MainsVoltageMaxThreshold reached for Mains Voltage**/
|
||||
ESP_ZB_ZCL_THERMOSTAT_ALARM_CODE_SELFCALIBRATION_FAILURE = 0x02, /*!< BatteryAlarmCode - BatteryVoltageMinThreshold or BatteryPercentageMinThreshold reached for Battery Source 1 */
|
||||
} esp_zb_zcl_thermostat_alarm_code_t;
|
||||
|
||||
/** @brief Bits of ThermostatProgrammingOperationMode */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_SCHEDULE_PROGRAMMING_MODE_BIT = 0x01, /*!< Schedule programming bit */
|
||||
ESP_ZB_ZCL_THERMOSTAT_AUTO_RECOVERY_PROGRAMMING_MODE_BIT = 0x02, /*!< Auto/recovery bit */
|
||||
ESP_ZB_ZCL_THERMOSTAT_ECONOMY_ENERGY_START_PROGRAMMING_MODE_BIT = 0x04, /*!< Economy/energy star bit */
|
||||
} esp_zb_zcl_thermostat_programming_operation_mode_bit_t;
|
||||
|
||||
/** @brief Values for Mode field for SetpointRaiseLower*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_SETPOINT_RAISE_LOWER_MODE_HEAT = 0x00, /*!< Heat value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SETPOINT_RAISE_LOWER_MODE_COOL = 0x01, /*!< Cool value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_SETPOINT_RAISE_LOWER_MODE_BOTH = 0x02, /*!< Both (Heat and Cool) value */
|
||||
} esp_zb_zcl_thermostat_setpoint_raise_lower_mode_t;
|
||||
|
||||
/** @brief Values for Mode for Sequence field */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_WEEKLY_SCHEDULE_MODE_FOR_SEQ_HEAT = 0x01, /*!< Heat value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_WEEKLY_SCHEDULE_MODE_FOR_SEQ_COOL = 0x02, /*!< Cool value */
|
||||
ESP_ZB_ZCL_THERMOSTAT_WEEKLY_SCHEDULE_MODE_FOR_SEQ_BOTH = 0x03, /*!< Both (Heat and Cool) value */
|
||||
} esp_zb_zcl_thermostat_weekly_schedule_mode_for_seq_t;
|
||||
|
||||
/** @brief Value for Day of Week */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_SUNDAY = (1 << 0), /*!< SUNDAY */
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_MONDAY = (1 << 1), /*!< MONDAY */
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_TUESDAY = (1 << 2), /*!< TUESDAY */
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_WEDNESDAY = (1 << 3), /*!< WEDNESDAY */
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_THURSDAY = (1 << 4), /*!< THURSDAY */
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_FRIDAY = (1 << 5), /*!< FRIDAY */
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_SATURDAY = (1 << 6), /*!< SATURDAY */
|
||||
ESP_ZB_ZCL_THERMOSTAT_DAY_OF_WEEK_VACATION = (1 << 7), /*!< VACATION */
|
||||
} esp_zb_zcl_thermostat_day_of_week_t;
|
||||
|
||||
/* Default value for Start Of Week attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_START_OF_WEEK_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief Min value for Local Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_MIN_VALUE 0x954d
|
||||
|
||||
/** @brief Max value for Local Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_MAX_VALUE 0x7fff
|
||||
|
||||
/** @brief Min value for Outdoor Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OUTDOOR_TEMPERATURE_MIN_VALUE 0x954d
|
||||
|
||||
/** @brief Max value for Outdoor Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OUTDOOR_TEMPERATURE_MAX_VALUE 0x7fff
|
||||
|
||||
/** @brief Invalid value for Local Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_INVALID ((zb_int16_t)0x8000)
|
||||
|
||||
/** @brief Default value for Local Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_DEFAULT_VALUE (ESP_ZB_ZCL_VALUE_FF)
|
||||
|
||||
/** @brief Min value for Local Temperature Calibration attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_CALIBRATION_MIN_VALUE 0xe7
|
||||
|
||||
/** @brief Max value for Local Temperature Calibration attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_CALIBRATION_MAX_VALUE 0x19
|
||||
|
||||
/** @brief Default value for Occupied Cooling Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_COOLING_SETPOINT_DEFAULT_VALUE 0x0a28
|
||||
|
||||
/** @brief Min value for Occupied Cooling Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_COOLING_SETPOINT_MIN_VALUE 0x954d
|
||||
|
||||
/** @brief Max value for Occupied Cooling Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_COOLING_SETPOINT_MAX_VALUE 0x7fff
|
||||
|
||||
/** @brief Default value for Occupied Heating Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_HEATING_SETPOINT_DEFAULT_VALUE 0x07d0
|
||||
|
||||
/** @brief Min value for Occupied Heating Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_HEATING_SETPOINT_MIN_VALUE 0x954d
|
||||
|
||||
/** @brief Max value for Occupied Heating Setpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_HEATING_SETPOINT_MAX_VALUE 0x7fff
|
||||
|
||||
/** @brief Min value for Min Setpoint Dead Band attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_MIN_SETPOINT_DEAD_BAND_MIN_VALUE 0x0a
|
||||
|
||||
/** @brief Max value for Min Setpoint Dead Band attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_MIN_SETPOINT_DEAD_BAND_MAX_VALUE 0x19
|
||||
|
||||
/** @brief Local Temperature Sensed Remotely bit of Remote Sensing attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_REMOTE_SENSING_LOCAL_TEMPERATURE_SENSED_REMOTELY_BIT (1 << 0)
|
||||
|
||||
/** @brief Outdoor Temperature Sensed Remotely bit of Remote Sensing attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_REMOTE_SENSING_OUTDOOR_TEMPERATURE_SENSED_REMOTELY_BIT (1 << 1)
|
||||
|
||||
/** @brief Occupancy Sensed Sensed Remotely bit of Remote Sensing attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_REMOTE_SENSING_OCCUPANCY_SENSED_REMOTELY_BIT (1 << 2)
|
||||
|
||||
/** @brief Default value for Control Sequence Of Operation attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQ_OF_OPERATION_DEFAULT_VALUE 0x04
|
||||
|
||||
/** @brief Default value for System Mode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_CONTROL_SYSTEM_MODE_DEFAULT_VALUE 0x01
|
||||
|
||||
/** @brief Default value for Occupancy attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPANCY_DEFAULT_VALUE ((zb_uint8_t)1U)
|
||||
|
||||
/** @brief Bitmask for Occupancy attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPANCY_BITMASK ((zb_uint8_t)0x01)
|
||||
|
||||
/** @brief Default value for AbsMinHeatSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ABS_MIN_HEAT_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x02BC)
|
||||
|
||||
/** @brief Default value for AbsMaxHeatSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ABS_MAX_HEAT_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x0BB8)
|
||||
|
||||
/** @brief Default value for AbsMinCoolSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ABS_MIN_COOL_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x0640)
|
||||
|
||||
/** @brief Default value for AbsMaxCoolSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ABS_MAX_COOL_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x0C80)
|
||||
|
||||
/** @brief Min value for PICoolingDemand attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_PI_COOLING_DEMAND_MIN_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Max value for PICoolingDemand attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_PI_COOLING_DEMAND_MAX_VALUE ((zb_uint8_t)0x64)
|
||||
|
||||
/** @brief Min value for PIHeatingDemand attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_PI_HEATING_DEMAND_MIN_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Max value for PIHeatingDemand attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_PI_HEATING_DEMAND_MAX_VALUE ((zb_uint8_t)0x64)
|
||||
|
||||
/** @brief Default value for HVACSystemTypeConfiguration attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_HVAC_SYSTEM_TYPE_CONFIGURATION_DEFAULT_VALUE ((zb_uint8_t)0)
|
||||
|
||||
/** @brief Default value for LocalTemperatureCalibration attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_CALIBRATION_DEFAULT_VALUE ((zb_int8_t)0x00)
|
||||
|
||||
/** @brief Default value for UnoccupiedCoolingSetpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UNOCCUPIED_COOLING_SETPOINT_DEFAULT_VALUE ((zb_int16_t)0x0A28)
|
||||
|
||||
/** @brief Default value for UnoccupiedHeatingSetpoint attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UNOCCUPIED_HEATING_SETPOINT_DEFAULT_VALUE ((zb_int16_t)0x07D0)
|
||||
|
||||
/** @brief Default value for MinHeatSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_MIN_HEAT_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x02BC)
|
||||
|
||||
/** @brief Default value for MaxHeatSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_MAX_HEAT_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x0BB8)
|
||||
|
||||
/** @brief Default value for MinCoolSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_MIN_COOL_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x0640)
|
||||
|
||||
/** @brief Default value for MaxCoolSetpointLimit attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_MAX_COOL_SETPOINT_LIMIT_DEFAULT_VALUE ((zb_int16_t)0x0C80)
|
||||
|
||||
/** @brief Default value for MinSetpointDeadBand attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_MIN_SETPOINT_DEAD_BAND_DEFAULT_VALUE ((zb_int8_t)0x19)
|
||||
|
||||
/** @brief Default value for RemoteSensing attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_REMOTE_SENSING_DEFAULT_VALUE ((zb_uint8_t)0)
|
||||
|
||||
/** @brief Default value for ControlSequenceOfOperation attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_CONTROL_SEQUENCE_OF_OPERATION_DEFAULT_VALUE ((zb_uint8_t)0x04)
|
||||
|
||||
/** @brief Default value for SystemMode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_SYSTEM_MODE_DEFAULT_VALUE ((zb_uint8_t)0x01)
|
||||
|
||||
/** @brief Default value for AlarmMask attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ALARM_MASK_DEFAULT_VALUE ((zb_uint8_t)0)
|
||||
|
||||
/** @brief Default value for RunningMode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNING_MODE_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Off value for RunningMode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNING_MODE_OFF_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Cool value for RunningMode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNING_MODE_COOL_VALUE ((zb_uint8_t)0x03)
|
||||
|
||||
/** @brief Heat value for RunningMode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNING_MODE_HEAT_VALUE ((zb_uint8_t)0x04)
|
||||
|
||||
/** @brief Default value for TemperatureSetpointHold attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for TemperatureSetpointHoldDuration attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_DURATION_DEFAULT_VALUE ((zb_uint16_t)0xFFFF)
|
||||
|
||||
/** @brief Min value for TemperatureSetpointHoldDuration attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_DURATION_MIN_VALUE ((zb_uint16_t)0x0000)
|
||||
|
||||
/** @brief Max value for TemperatureSetpointHoldDuration attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_TEMPERATURE_SETPOINT_HOLD_DURATION_MAX_VALUE ((zb_uint16_t)0x05a0)
|
||||
|
||||
/** @brief Default value for ThermostatProgrammingOperationMode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_THERMOSTAT_PROGRAMMING_OPERATION_MODE_DEFAULT_VALUE ((zb_uint8_t)0)
|
||||
|
||||
/** @brief Default value for SetpointChangeSource attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_SETPOINT_CHANGE_SOURCE_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Default value for SetpointChangeAmount attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_SETPOINT_CHANGE_AMOUNT_DEFAULT_VALUE ((zb_int16_t)0x8000)
|
||||
|
||||
/** @brief Default value for SetpointChangeSourceTimestamp attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_SETPOINT_CHANGE_SOURCE_TIMESTAMP_DEFAULT_VALUE ((zb_time_t)0x00000000)
|
||||
|
||||
/** @brief Default value for OccupiedSetback attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_SETBACK_DEFAULT_VALUE ((zb_uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for OccupiedSetbackMin attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_SETBACK_MIN_DEFAULT_VALUE ((zb_uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for OccupiedSetbackMax attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_OCCUPIED_SETBACK_MAX_DEFAULT_VALUE ((zb_uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for UnoccupiedSetback attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UNOCCUPIED_SETBACK_DEFAULT_VALUE ((zb_uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for UnoccupiedSetbackMin attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UNOCCUPIED_SETBACK_MIN_DEFAULT_VALUE ((zb_uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for UnoccupiedSetbackMax attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UNOCCUPIED_SETBACK_MAX_DEFAULT_VALUE ((zb_uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for EmergencyHeatDelta attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_EMERGENCY_HEAT_DELTA_DEFAULT_VALUE ((zb_uint8_t)0xFF)
|
||||
|
||||
/** @brief Default value for ACType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_TYPE_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Unknown value for ACType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_TYPE_UNKNOWN_VALUE ESP_ZB_ZCL_THERMOSTAT_AC_TYPE_DEFAULT_VALUE
|
||||
|
||||
/** @brief Cooling and Fixed Speed value for ACType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_TYPE_COOLING_AND_FIXED_SPEED_VALUE ((zb_uint8_t)0x01)
|
||||
|
||||
/** @brief Heat Pump and Fixed Speed value for ACType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_TYPE_HEAT_PUMP_AND_FIXED_SPEED_VALUE ((zb_uint8_t)0x02)
|
||||
|
||||
/** @brief Cooling and Inverter value for ACType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_TYPE_COOLING_AND_INVERTER_VALUE ((zb_uint8_t)0x03)
|
||||
|
||||
/** @brief Heat Pump and Inverter value value for ACType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_TYPE_HEAT_PUMP_AND_INVERTER_VALUE ((zb_uint8_t)0x04)
|
||||
|
||||
/** @brief Default value for ACCapacity attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_CAPACITY_DEFAULT_VALUE ((zb_uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for ACRefrigerantType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_REFRIGERANT_TYPE_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Unknown value for ACRefrigerantType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_REFRIGERANT_TYPE_UNKNOWN_VALUE ESP_ZB_ZCL_THERMOSTAT_AC_REFRIGERANT_TYPE_DEFAULT_VALUE
|
||||
|
||||
/** @brief R22 value for ACRefrigerantType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_REFRIGERANT_TYPE_R22_VALUE ((zb_uint8_t)0x01)
|
||||
|
||||
/** @brief R410a value for ACRefrigerantType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_REFRIGERANT_TYPE_R410A_VALUE ((zb_uint8_t)0x02)
|
||||
|
||||
/** @brief R407c value for ACRefrigerantType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_REFRIGERANT_TYPE_R407C_VALUE ((zb_uint8_t)0x03)
|
||||
|
||||
/** @brief Default value for ACCompressorType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_COMPRESSOR_TYPE_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Unknown value for ACCompressorType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_COMPRESSOR_TYPE_UNKNOWN_VALUE ESP_ZB_ZCL_THERMOSTAT_AC_COMPRESSOR_TYPE_DEFAULT_VALUE
|
||||
|
||||
/** @brief T1(Max working ambient 43 ºC) value for ACCompressorType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_COMPRESSOR_TYPE_T1_VALUE ((zb_uint8_t)0x01)
|
||||
|
||||
/** @brief T2(Max working ambient 35 ºC) value for ACCompressorType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_COMPRESSOR_TYPE_T2_VALUE ((zb_uint8_t)0x02)
|
||||
|
||||
/** @brief T3(Max working ambient 52 ºC) value for ACCompressorType attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_COMPRESSOR_TYPE_T3_VALUE ((zb_uint8_t)0x03)
|
||||
|
||||
/** @brief Default value for ACErrorCode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_ERROR_CODE_DEFAULT_VALUE ((zb_uint32_t)0x00000000)
|
||||
|
||||
/** @brief Compressor Failure or Refrigerant Leakage bit of AC Error Code attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_ERROR_CODE_COMPRESSOR_FAILURE_OR_REFRIGERANT_LEAKAGE_BIT (1 << 0)
|
||||
|
||||
/** @brief Room Temperature Sensor Failure bit of AC Error Code attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_ERROR_CODE_ROOM_TEMPERATURE_SENSOR_FAILURE_BIT (1 << 1)
|
||||
|
||||
/** @brief Outdoor Temperature Sensor Failure bit of AC Error Code attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_ERROR_CODE_OUTDOOR_TEMPERATURE_SENSOR_FAILURE_BIT (1 << 2)
|
||||
|
||||
/** @brief Indoor Coil Temperature Sensor Failure bit of AC Error Code attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_ERROR_CODE_INDOOR_COIL_TEMPERATURE_SENSOR_FAILURE_BIT (1 << 3)
|
||||
|
||||
/** @brief Fan Failure bit of AC Error Code attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_ERROR_CODE_FAN_FAILURE_BIT (1 << 4)
|
||||
|
||||
/** @brief Default value for ACLouverPosition attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_LOUVER_POSITION_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief Fully Closed value for ACLouverPosition attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_LOUVER_POSITION_FULLY_CLOSED_VALUE ((zb_uint8_t)0x01)
|
||||
|
||||
/** @brief Fully Open value for ACLouverPosition attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_LOUVER_POSITION_FULLY_OPEN_VALUE ((zb_uint8_t)0x02)
|
||||
|
||||
/** @brief Quarter Open value for ACLouverPosition attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_LOUVER_POSITION_QUARTER_OPEN_VALUE ((zb_uint8_t)0x03)
|
||||
|
||||
/** @brief Three Quarters Open value for ACLouverPosition attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_LOUVER_POSITION_THREE_QUARTERS_OPEN_VALUE ((zb_uint8_t)0x05)
|
||||
|
||||
/** @brief Half Open value for ACLouverPosition attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_LOUVER_POSITION_HALF_OPEN_VALUE ((zb_uint8_t)0x04)
|
||||
|
||||
/** @brief Min value for AC Coil Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_COIL_TEMPERATURE_MIN_VALUE 0x954d
|
||||
|
||||
/** @brief Max value for AC Coil Temperature attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_COIL_TEMPERATURE_MAX_VALUE 0x7fff
|
||||
|
||||
/** @brief Default value for AC Capacity Format attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_CAPACITY_FORMAT_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
/** @brief BTUh value for AC Capacity Format attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_AC_CAPACITY_FORMAT_BTUH_VALUE ESP_ZB_ZCL_THERMOSTAT_AC_CAPACITY_FORMAT_DEFAULT_VALUE
|
||||
|
||||
/** @brief Initialization failure bit of Alarm Mask attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ALARM_MASK_INITIALIZATION_FAILURE_BIT (1 << 0)
|
||||
|
||||
/** @brief Hardware Failure bit of Alarm Mask attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ALARM_MASK_HARDWARE_FAILURE_BIT (1 << 1)
|
||||
|
||||
/** @brief Self-Calibration Failure bit of Alarm Mask attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_ALARM_MASK_SELFCALIBRATION_FAILURE_BIT (1 << 2)
|
||||
|
||||
/** @brief Simple/Setpoint(0) or Schedule_Programming(1) mode bit of Thermostat Programming Operation Mode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_PROGRAMMING_OPERATION_MODE_SIMPLE_SETPOINT_OR_PROGRAMMING_MODE_BIT (1 << 0)
|
||||
|
||||
/** @brief Auto/recovery mode bit of Thermostat Programming Operation Mode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_PROGRAMMING_OPERATION_MODE_AUTO_RECOVERY_MODE_BIT (1 << 1)
|
||||
|
||||
/** @brief Economy/EnergyStar mode bit of Thermostat Programming Operation Mode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_PROGRAMMING_OPERATION_MODE_ECONOMY_ENERGY_STAR_MODE_BIT (1 << 2)
|
||||
|
||||
/** @brief Heat State On bit of Thermostat Running State attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNNING_STATE_HEAT_STATE_ON_BIT (1 << 0)
|
||||
|
||||
/** @brief Cool State On bit of Thermostat Running State attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNNING_STATE_COOL_STATE_ON_BIT (1 << 1)
|
||||
|
||||
/** @brief Fan State On bit of Thermostat Running State attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNNING_STATE_FAN_STATE_ON_BIT (1 << 2)
|
||||
|
||||
/** @brief Heat 2nd Stage State On bit of Thermostat Running State attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNNING_STATE_HEAT_2ND_STAGE_STATE_ON_BIT (1 << 3)
|
||||
|
||||
/** @brief Cool 2nd Stage State On bit of Thermostat Running State attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNNING_STATE_COOL_2ND_STAGE_STATE_ON_BIT (1 << 4)
|
||||
|
||||
/** @brief Fan 2nd Stage State On bit of Thermostat Running State attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNNING_STATE_FAN_2ND_STAGE_STATE_ON_BIT (1 << 5)
|
||||
|
||||
/** @brief Fan 3rd Stage State On bit of Thermostat Running State attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_RUNNNING_STATE_FAN_3RD_STAGE_STATE_ON_BIT (1 << 6)
|
||||
|
||||
/**
|
||||
* @brief Structure for Thermostat Weekly Schedule Transition field
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zcl_thermostat_weekly_schedule_transition_s {
|
||||
uint16_t transition_time; /*!< This field represents the start time of the schedule transition during the associated day. */
|
||||
uint16_t heat_setpoint; /*!< This field represents the heat setpoint to be applied at this associated transition start time. */
|
||||
uint16_t cool_setpoint; /*!< this field represents the cool setpoint to be applied at this associated transition start time.*/
|
||||
} esp_zb_zcl_thermostat_weekly_schedule_transition_t;
|
||||
|
||||
/**
|
||||
* @brief Structure for the record in Thermostat Weekly Schedule Table
|
||||
*/
|
||||
typedef struct esp_zb_zcl_thermostat_weekly_schedule_record_s {
|
||||
uint8_t day_of_week; /*!< Day of week, refer to esp_zb_zcl_thermostat_day_of_week_t */
|
||||
uint8_t mode_for_seq; /*!< Mode for Sequence, refer to esp_zb_zcl_thermostat_weekly_schedule_mode_for_seq_t */
|
||||
uint16_t transition_time; /*!< Transition time in minutes after midnight */
|
||||
uint16_t heat_setpoint; /*!< Heat Set Point */
|
||||
uint16_t cool_setpoint; /*!< Cool Set Point */
|
||||
} esp_zb_zcl_thermostat_weekly_schedule_record_t;
|
||||
|
||||
/**
|
||||
* @brief Start thermostat weekly schedule
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: On success, otherwise, failure.
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_thermostat_weekly_schedule_start(void);
|
||||
|
||||
/**
|
||||
* @brief Stop thermostat weekly schedule
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: On success, otherwise, failure.
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_thermostat_weekly_schedule_stop(void);
|
||||
|
||||
/**
|
||||
* @brief Get the next scheduled record from the thermostat weekly schedule table
|
||||
*
|
||||
* @param[in] iterator An iterator used to iterate through the thermostat weekly schedule table
|
||||
* @param[out] record The next record in the thermostat weekly schedule table, refer to esp_zb_zcl_thermostat_weekly_schedule_record_t
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
* - ESP_ERR_INVALID_ARG: Invalid arguments
|
||||
* - ESP_ERR_NOT_FOUND: End of the table reached
|
||||
* - Otherwise: Failure
|
||||
*/
|
||||
esp_err_t esp_zb_zcl_thermostat_weekly_schedule_get_next_record(uint16_t *iterator, esp_zb_zcl_thermostat_weekly_schedule_record_t *record);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/*! @brief Thermostat UI Configuration cluster attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UI_CONFIG_TEMPERATURE_DISPLAY_MODE_ID = 0x0000, /*!< Temperature Display Mode attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UI_CONFIG_KEYPAD_LOCKOUT_ID = 0x0001, /*!< Keypad Lockout attribute */
|
||||
ESP_ZB_ZCL_ATTR_THERMOSTAT_UI_CONFIG_SCHEDULE_PROGRAMMING_VISIBILITY_ID = 0x0002, /*!< The Schedule ProgrammingVisibility attribute is used to hide the weekly schedule programming functionality or menu on a thermostat from a user to prevent local user programming of the weekly schedule. */
|
||||
} esp_zb_zcl_thermostat_ui_config_attr_t;
|
||||
|
||||
/** @brief Default value for Temperature Display Mode attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UI_CONFIG_TEMPERATURE_DISPLAY_MODE_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief Default value for Keypad Lockout attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UI_CONFIG_KEYPAD_LOCKOUT_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief Default value for ScheduleProgrammingVisibility attribute */
|
||||
#define ESP_ZB_ZCL_THERMOSTAT_UI_CONFIG_SCHEDULE_PROGRAMMING_VISIBILITY_DEFAULT_VALUE ((zb_uint8_t)0x00)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Time cluster attribute identifiers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_TIME_TIME_ID = 0x0000, /*!< Time attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_TIME_STATUS_ID = 0x0001, /*!< Time Status attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_TIME_ZONE_ID = 0x0002, /*!< Time Zone attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_DST_START_ID = 0x0003, /*!< Dst Start attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_DST_END_ID = 0x0004, /*!< Dst End attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_DST_SHIFT_ID = 0x0005, /*!< Dst Shift attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_STANDARD_TIME_ID = 0x0006, /*!< Standard Time attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_LOCAL_TIME_ID = 0x0007, /*!< Local Time attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_LAST_SET_TIME_ID = 0x0008, /*!< Last Set Time attribute */
|
||||
ESP_ZB_ZCL_ATTR_TIME_VALID_UNTIL_TIME_ID = 0x0009 /*!< Valid Until Time attribute */
|
||||
} esp_zb_zcl_time_attr_t;
|
||||
|
||||
/** @brief Default value for Time attribute */
|
||||
#define ESP_ZB_ZCL_TIME_TIME_DEFAULT_VALUE 0xffffffff
|
||||
|
||||
/** @brief Default value for Time Status attribute */
|
||||
#define ESP_ZB_ZCL_TIME_TIME_STATUS_DEFAULT_VALUE 0x00
|
||||
|
||||
/** @brief Default value for Time Zone attribute */
|
||||
#define ESP_ZB_ZCL_TIME_TIME_ZONE_DEFAULT_VALUE 0x00000000
|
||||
|
||||
/** @brief Default value for DstStart attribute */
|
||||
#define ESP_ZB_ZCL_TIME_DST_START_DEFAULT_VALUE ((uint32_t)0xFFFFFFFF)
|
||||
|
||||
/** @brief Default value for DstEnd attribute */
|
||||
#define ESP_ZB_ZCL_TIME_DST_END_DEFAULT_VALUE ((uint32_t)0xFFFFFFFF)
|
||||
|
||||
/** @brief Default value for Dst Shift attribute */
|
||||
#define ESP_ZB_ZCL_TIME_DST_SHIFT_DEFAULT_VALUE 0x00000000
|
||||
|
||||
/** @brief Default value for StandardTime attribute */
|
||||
#define ESP_ZB_ZCL_TIME_STANDARD_TIME_DEFAULT_VALUE ((uint32_t)0xFFFFFFFF)
|
||||
|
||||
/** @brief Default value for LocalTime attribute */
|
||||
#define ESP_ZB_ZCL_TIME_LOCAL_TIME_DEFAULT_VALUE ((uint32_t)0xFFFFFFFF)
|
||||
|
||||
/** @brief Default value for Last Set Time attribute */
|
||||
#define ESP_ZB_ZCL_TIME_LAST_SET_TIME_DEFAULT_VALUE 0xffffffff
|
||||
|
||||
/** @brief Default value for Valid Until Time attribute */
|
||||
#define ESP_ZB_ZCL_TIME_VALID_UNTIL_TIME_DEFAULT_VALUE 0xffffffff
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Wind_Speed_Measurement cluster server attribute identifiers */
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_WIND_SPEED_MEASUREMENT_MEASURED_VALUE_ID = 0x0000, /**< MeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_WIND_SPEED_MEASUREMENT_MIN_MEASURED_VALUE_ID = 0x0001, /**< MinMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_WIND_SPEED_MEASUREMENT_MAX_MEASURED_VALUE_ID = 0x0002, /**< MaxMeasuredValue Attribute */
|
||||
ESP_ZB_ZCL_ATTR_WIND_SPEED_MEASUREMENT_TOLERANCE_ID = 0x0003, /**< Tolerance Attribute */
|
||||
} esp_zb_zcl_wind_speed_measurement_srv_attr_t;
|
||||
|
||||
/** @brief Minimum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MIN_MEASURED_VALUE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MIN_MEASURED_VALUE_MAXIMUM ((uint16_t)0xfffd)
|
||||
|
||||
/** @brief Minimum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MAX_MEASURED_VALUE_MINIMUM ((uint16_t)0x0001)
|
||||
|
||||
/** @brief Maximum value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MAX_MEASURED_VALUE_MAXIMUM ((uint16_t)0xfffe)
|
||||
|
||||
/** @brief Minimum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_TOLERANCE_MINIMUM ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Maximum value for Tolerance attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_TOLERANCE_MAXIMUM ((uint16_t)0x0308)
|
||||
|
||||
/** @brief Unknown value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MIN_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Unknown value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MAX_MEASURED_VALUE_UNKNOWN ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MinMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MIN_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
/** @brief Default value for MaxMeasuredValue attribute */
|
||||
#define ESP_ZB_ZCL_WIND_SPEED_MEASUREMENT_MAX_MEASURED_VALUE_DEFAULT ESP_ZB_ZCL_VALUE_U16_NONE
|
||||
|
||||
void esp_zb_zcl_wind_speed_measurement_init_server(void);
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_WIND_SPEED_MEASUREMENT_SERVER_ROLE_INIT esp_zb_zcl_wind_speed_measurement_init_server
|
||||
#define ESP_ZB_ZCL_CLUSTER_ID_WIND_SPEED_MEASUREMENT_CLIENT_ROLE_INIT NULL
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
/** @brief Window Covering cluster attribute identifiers
|
||||
*/
|
||||
typedef enum{
|
||||
ESP_ZB_ZCL_WINDOW_COVERING_INFORMATION = 0x000, /*!< Window Covering Information attribute set */
|
||||
ESP_ZB_ZCL_WINDOW_COVERING_SETTINGS = 0x001 /*!< Window Covering Settings attribute set */
|
||||
}esp_zb_zcl_window_covering_attribute_sets_t;
|
||||
|
||||
typedef enum{
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_WINDOW_COVERING_TYPE_ID = 0x0000, /*!< Window Covering Type attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_PHYSICAL_CLOSED_LIMIT_LIFT_ID = 0x0001, /*!< PhysicalClosedLimit Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_PHY_CLOSED_LIMIT_TILT_ID = 0x0002, /*!< PhysicalClosedLimit Tilt attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_LIFT_ID = 0x0003, /*!< CurrentPosition Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_TILT_ID = 0x0004, /*!< CurrentPosition Tilt attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_NUMBER_OF_ACTUATIONS_LIFT_ID = 0x0005, /*!< Number of Actuations Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_NUMBER_OF_ACTUATIONS_TILT_ID = 0x0006, /*!< Number of Actuations Tilt attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_STATUS_ID = 0x0007, /*!< Config/Status attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_ID = 0x0008, /*!< Current Position Lift Percentage attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_ID = 0x0009 /*!< Current Position Tilt Percentage attribute */
|
||||
}esp_zb_zcl_window_covering_info_attr_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_ROLLERSHADE = 0x00, /*!< Rollershade value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_ROLLERSHADE_2_MOTOR = 0x01, /*!< Rollershade - 2 Motor value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_ROLLERSHADE_EXTERIOR = 0x02, /*!< Rollershade - Exterior value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_ROLLERSHADE_EXTERIOR_2_MOTOR = 0x03, /*!< Rollershade - Exterior - 2 Motor value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_DRAPERY = 0x04, /*!< Drapery value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_AWNING = 0x05, /*!< Awning value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_SHUTTER = 0x06, /*!< Shutter value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_TILT_BLIND_TILT_ONLY = 0x07, /*!< Tilt Blind - Tilt Only value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_TILT_BLIND_LIFT_AND_TILT = 0x08, /*!< Tilt Blind - Lift and Tilt value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_PROJECTOR_SCREEN = 0x09 /*!< Projector screen value */
|
||||
}esp_zb_zcl_window_covering_window_covering_type_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_OPERATIONAL = 0x01, /*!< Operational value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_ONLINE = 0x02, /*!< Online value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_REVERSE_COMMANDS = 0x04, /*!< Open/Up Commands have been reversed value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_LIFT_CONTROL_IS_CLOSED_LOOP = 0x08, /*!< Lift control is Closed Loop value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_TILT_CONTROL_IS_CLOSED_LOOP = 0x10, /*!< Tilt control is Closed Loop value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_LIFT_ENCODER_CONTROLLED = 0x20, /*!< Lift Encoder Controlled value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_TILT_ENCODER_CONTROLLED = 0x40 /*!< Tilt Encoder Controlled value */
|
||||
}esp_zb_zcl_window_covering_config_status_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_INSTALLED_OPEN_LIMIT_LIFT_ID = 0x0010, /*!< InstalledOpenLimit - Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_INSTALLED_CLOSED_LIMIT_LIFT_ID = 0x0011, /*!< InstalledClosedLimit - Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_INSTALLED_OPEN_LIMIT_TILT_ID = 0x0012, /*!< InstalledOpenLimit - Tilt attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_INSTALLED_CLOSED_LIMIT_TILT_ID = 0x0013, /*!< InstalledClosedLimit - Tilt attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_VELOCITY_ID = 0x0014, /*!< Velocity - Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_ACCELERATION_TIME_ID = 0x0015, /*!< Acceleration Time - Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_DECELERATION_TIME_ID = 0x0016, /*!< Deceleration Time - Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_MODE_ID = 0x0017, /*!< Mode attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_INTERMEDIATE_SETPOINTS_LIFT_ID = 0x0018, /*!< Intermediate Setpoints - Lift attribute */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_INTERMEDIATE_SETPOINTS_TILT_ID = 0x0019 /*!< Intermediate Setpoints - Tilt attribute */
|
||||
}esp_zb_zcl_window_covering_settings_attr_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_REVERSED_MOTOR_DIRECTION = 0x01, /*!< Reversed motor direction value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_RUN_IN_CALIBRATION_MODE = 0x02, /*!< Run in calibration mode value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_MOTOR_IS_RUNNING_IN_MAINTENANCE_MODE = 0x04, /*!< Motor is running in maintenance mode value */
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_LEDS_WILL_DISPLAY_FEEDBACK = 0x08 /*!< LEDs will display feedback value */
|
||||
}esp_zb_zcl_window_covering_mode_t;
|
||||
|
||||
typedef enum{
|
||||
ESP_ZB_ZCL_CMD_WINDOW_COVERING_UP_OPEN = 0x00, /*!< Up/Open command */
|
||||
ESP_ZB_ZCL_CMD_WINDOW_COVERING_DOWN_CLOSE = 0x01, /*!< Down/Close command */
|
||||
ESP_ZB_ZCL_CMD_WINDOW_COVERING_STOP = 0x02, /*!< Stop command */
|
||||
ESP_ZB_ZCL_CMD_WINDOW_COVERING_GO_TO_LIFT_VALUE = 0x04, /*!< Go to Lift Value command */
|
||||
ESP_ZB_ZCL_CMD_WINDOW_COVERING_GO_TO_LIFT_PERCENTAGE = 0x05, /*!< Go to Lift Percentage command */
|
||||
ESP_ZB_ZCL_CMD_WINDOW_COVERING_GO_TO_TILT_VALUE = 0x07, /*!< Go to Tilt Value command */
|
||||
ESP_ZB_ZCL_CMD_WINDOW_COVERING_GO_TO_TILT_PERCENTAGE = 0x08 /*!< Go to Tilt Percentage command */
|
||||
}esp_zb_zcl_window_covering_cmd_t;
|
||||
|
||||
/** @brief Default value for Window Covering cluster revision global attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CLUSTER_REVISION_DEFAULT ((uint16_t)0x0003u)
|
||||
|
||||
/** @brief Default value for PhysicalClosedLimitLift attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_PHYSICAL_CLOSED_LIMIT_LIFT_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for PhyClosedLimitTilt attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_PHY_CLOSED_LIMIT_TILT_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for CurrentPositionLift attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_LIFT_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for CurrentPositionTilt attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_TILT_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for NumberOfActuationsLift attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_NUMBER_OF_ACTUATIONS_LIFT_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for NumberOfActuationsTilt attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_NUMBER_OF_ACTUATIONS_TILT_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Window covering type attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_WINDOW_COVERING_TYPE_DEFAULT_VALUE 0x00
|
||||
|
||||
|
||||
/** @brief Config/status attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CONFIG_STATUS_DEFAULT_VALUE \
|
||||
ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_OPERATIONAL \
|
||||
| ESP_ZB_ZCL_ATTR_WINDOW_COVERING_CONFIG_ONLINE
|
||||
|
||||
/** @brief Current position lift percentage attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_DEFAULT_VALUE 0xff
|
||||
|
||||
/** @brief Current position lift percentage attribute max value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_MAX_VALUE 0x64
|
||||
|
||||
/** @brief Current position tilt percentage attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_DEFAULT_VALUE 0xff
|
||||
|
||||
/** @brief Current position tilt percentage attribute max value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_MAX_VALUE 0x64
|
||||
|
||||
/** @brief Installed open limit lift attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_INSTALLED_OPEN_LIMIT_LIFT_DEFAULT_VALUE 0x0000
|
||||
|
||||
/** @brief Installed closed limit lift attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_INSTALLED_CLOSED_LIMIT_LIFT_DEFAULT_VALUE 0xffff
|
||||
|
||||
/** @brief Installed open limit tilt attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_INSTALLED_OPEN_LIMIT_TILT_DEFAULT_VALUE 0x0000
|
||||
|
||||
/** @brief Installed closed limit tilt attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_INSTALLED_CLOSED_LIMIT_TILT_DEFAULT_VALUE 0xffff
|
||||
|
||||
/** @brief Default value for Velocity attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_VELOCITY_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for AccelerationTime attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_ACCELERATION_TIME_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
/** @brief Default value for DecelerationTime attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_DECELERATION_TIME_DEFAULT_VALUE ((uint16_t)0x0000)
|
||||
|
||||
|
||||
/** @brief Mode attribute default value */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_MODE_DEFAULT_VALUE ESP_ZB_ZCL_ATTR_WINDOW_COVERING_TYPE_MOTOR_IS_RUNNING_IN_MAINTENANCE_MODE
|
||||
|
||||
/** @brief Default value for IntermediateSetpointsLift attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_INTERMEDIATE_SETPOINTS_LIFT_DEFAULT_VALUE {0x31, 0x2C, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x00}
|
||||
|
||||
/** @brief Default value for IntermediateSetpointsTilt attribute */
|
||||
#define ESP_ZB_ZCL_WINDOW_COVERING_INTERMEDIATE_SETPOINTS_TILT_DEFAULT_VALUE {0x31, 0x2C, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x00}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,616 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
#include "esp_zigbee_zdo_common.h"
|
||||
|
||||
/* MATCH DESC REQ ZCL configuration */
|
||||
#define ESP_ZB_MATCH_DESC_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for finding */
|
||||
#define ESP_ZB_MATCH_DESC_REQ_ROLE ESP_ZB_NWK_BROADCAST_RX_ON_WHEN_IDLE /* find non-sleep Zigbee device, 0xFFFD */
|
||||
|
||||
#define ESP_ZB_IEEE_ADDR_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for ieee address request */
|
||||
#define ESP_ZB_NWK_ADDR_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for nwk address request */
|
||||
#define ESP_ZB_NODE_DESC_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for node descriptor request */
|
||||
#define ESP_ZB_BIND_DEVICE_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for binding request */
|
||||
#define ESP_ZB_ACTIVE_EP_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for active endpoint request */
|
||||
#define ESP_ZB_SIMPLE_DESC_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for simple descriptor request */
|
||||
#define ESP_ZB_PERMIT_JOIN_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for permit join request */
|
||||
#define ESP_ZB_DEVICE_LEAVE_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for device leave request */
|
||||
#define ESP_ZB_DEVICE_BIND_TABLE_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for device bind table request */
|
||||
#define ESP_ZB_DEVICE_MGMT_LQI_REQ_TIMEOUT (5 * ESP_ZB_TIME_ONE_SECOND) /* timeout for zdo mgmt lqi request */
|
||||
|
||||
/**
|
||||
* @brief The network address list of assocaited devices.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_nwk_addr_list_s {
|
||||
uint8_t start_index; /*!< Starting index into the list of associated devices for this report. */
|
||||
uint8_t total; /*!< Count of the number of 16-bit short addresses to follow.*/
|
||||
uint8_t count; /*!< Number of short addresses in the list. */
|
||||
uint16_t *nwk_addresses; /*!< Array of network address. */
|
||||
} esp_zb_zdo_nwk_addr_list_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO nwk_addr response struct.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_nwk_addr_rsp_s {
|
||||
esp_zb_ieee_addr_t ieee_addr; /*!< 64-bit address for the Remote Device. */
|
||||
uint16_t nwk_addr; /*!< 16-bit address for the Remote Device. */
|
||||
esp_zb_zdo_nwk_addr_list_t *ext_resp; /*!< Extended response: network address of assosicated devices.
|
||||
This field only existed when the request was sent with RequestType = 1. */
|
||||
} esp_zb_zdo_nwk_addr_rsp_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO ieee_addr response struct.
|
||||
*
|
||||
* @anchor esp_zb_zdo_ieee_addr_rsp_t
|
||||
*/
|
||||
typedef esp_zb_zdo_nwk_addr_rsp_t esp_zb_zdo_ieee_addr_rsp_t;
|
||||
|
||||
/** Find device callback
|
||||
*
|
||||
* @brief A ZDO match desc request callback for user to get response info.
|
||||
*
|
||||
* @note User's callback get response from the remote device that local node wants to find a particular device on endpoint.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] addr A short address of the device response, 0xFFFF - invalid address
|
||||
* @param[in] endpoint An endpoint of the device response, 0xFF - invalid endpoint
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_find_xxx()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_match_desc_callback_t)(esp_zb_zdp_status_t zdo_status, uint16_t addr, uint8_t endpoint, void *user_ctx);
|
||||
|
||||
/** IEEE address request callback
|
||||
*
|
||||
* @brief A ZDO ieee address request callback for user to get response info.
|
||||
*
|
||||
* @note User's callback get response from the remote device that local node wants to get ieee address.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] resp The response of ieee address request, see @ref esp_zb_zdo_ieee_addr_rsp_t.
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_ieee_addr_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_ieee_addr_callback_t)(esp_zb_zdp_status_t zdo_status, esp_zb_zdo_ieee_addr_rsp_t *resp, void *user_ctx);
|
||||
|
||||
/** Network address request callback
|
||||
*
|
||||
* @brief A ZDO network address request callback for user to get response info.
|
||||
*
|
||||
* @note User's callback gets response from the remote device that local node wants to get network address.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] resp The response of network address request, see @ref esp_zb_zdo_nwk_addr_rsp_s.
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_nwk_addr_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_nwk_addr_callback_t)(esp_zb_zdp_status_t zdo_status, esp_zb_zdo_nwk_addr_rsp_t *resp, void *user_ctx);
|
||||
|
||||
/** Node descriptor callback
|
||||
*
|
||||
* @brief A ZDO Node descriptor request callback for user to get node desc info.
|
||||
*
|
||||
* @note User's callback get response from the remote device that local node wants to get node descriptor response.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] addr A short address of the device response, 0xFFFF - invalid address
|
||||
* @param[in] node_desc A pointer to the node desc @ref esp_zb_af_node_desc_s
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_node_desc_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_node_desc_callback_t)(esp_zb_zdp_status_t zdo_status, uint16_t addr, esp_zb_af_node_desc_t *node_desc, void *user_ctx);
|
||||
|
||||
/** Bind request callback
|
||||
*
|
||||
* @brief A ZDO bind request callback for user to get response info.
|
||||
*
|
||||
* @note user's callback get response from the remote device that local node wants to bind.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_device_bind_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_bind_callback_t)(esp_zb_zdp_status_t zdo_status, void *user_ctx);
|
||||
|
||||
/** Active endpoint callback
|
||||
*
|
||||
* @brief A ZDO active endpoint request callback for user to get response info.
|
||||
*
|
||||
* @note User's callback get response from the remote device that local node wants to get active endpoint.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] ep_count A number of active endpoint
|
||||
* @param[in] ep_id_list A pointer of the endpoint id list
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_active_ep_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_active_ep_callback_t)(esp_zb_zdp_status_t zdo_status, uint8_t ep_count, uint8_t *ep_id_list, void *user_ctx);
|
||||
|
||||
/** Simple descriptor callback
|
||||
*
|
||||
* @brief A ZDO simple descriptor request callback for user to get simple desc info.
|
||||
*
|
||||
* @note User's callback get response from the remote device that local node wants to get simple desc.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] simple_desc A pointer to the simple desc @ref esp_zb_af_simple_desc_1_1_s
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_simple_desc_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_simple_desc_callback_t)(esp_zb_zdp_status_t zdo_status, esp_zb_af_simple_desc_1_1_t *simple_desc, void *user_ctx);
|
||||
|
||||
/** Permit join request callback
|
||||
*
|
||||
* @brief A ZDO permit join request callback for user to get permit join response info.
|
||||
*
|
||||
* @note User's callback get response from the node requested to permit join.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_permit_joining_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_permit_join_callback_t)(esp_zb_zdp_status_t zdo_status, void *user_ctx);
|
||||
|
||||
/** Leave request callback
|
||||
*
|
||||
* @brief A ZDO leave request callback for user to get leave status.
|
||||
*
|
||||
* @note User's callback get response from the device that wants to leave.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to `esp_zb_zdp_status`
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_device_leave_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_leave_callback_t)(esp_zb_zdp_status_t zdo_status, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO bind command struct
|
||||
*
|
||||
* @note Current implementation of the API ONLY supports 64 bit extended address's address mode. Other address mode will support later.
|
||||
*
|
||||
* @note Be aware of the one req_dst_addr is address that command send to, while dst_address is the destination of the binding entry.
|
||||
*
|
||||
* @note NOW the dst_addr_mode is default by ZB_BIND_DST_ADDR_MODE_64_BIT_EXTENDED. Later SDK will support other address mode.
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_bind_req_param_s {
|
||||
esp_zb_ieee_addr_t src_address; /*!< The IEEE address for the source */
|
||||
uint8_t src_endp; /*!< The source endpoint for the binding entry */
|
||||
uint16_t cluster_id; /*!< The identifier of the cluster on the source device that is bound to the destination */
|
||||
uint8_t dst_addr_mode; /*!< The destination address mode ref to esp_zb_zdo_bind_dst_addr_mode_t*/
|
||||
esp_zb_addr_u dst_address_u; /*!< The destination address for the binding entry */
|
||||
uint8_t dst_endp; /*!< This field shall be present only if the
|
||||
* DstAddrMode field has a value of
|
||||
* refer to ZB_BIND_DST_ADDR_MODE_64_BIT_EXTENDED refer to bind_dst_addr_mode
|
||||
* and, if present, shall be the
|
||||
* destination endpoint for the binding entry. */
|
||||
uint16_t req_dst_addr; /*!< Destination address of the request send to */
|
||||
} esp_zb_zdo_bind_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO match descriptor command struct
|
||||
*/
|
||||
typedef struct esp_zb_zdo_match_desc_req_param_s {
|
||||
uint16_t dst_nwk_addr; /*!< NWK address that request sent to */
|
||||
uint16_t addr_of_interest; /*!< NWK address of interest */
|
||||
uint16_t profile_id; /*!< Profile ID to be match at the destination which refers to esp_zb_af_profile_id_t */
|
||||
uint8_t num_in_clusters; /*!< The number of input clusters provided for matching cluster server */
|
||||
uint8_t num_out_clusters; /*!< The number of output clusters provided for matching cluster client */
|
||||
uint16_t *cluster_list; /*!< The pointer MUST point the uint16_t object with a size equal to num_in_clusters + num_out_clusters,
|
||||
* which will be used to match device. */
|
||||
} esp_zb_zdo_match_desc_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO ieee_addr request command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_ieee_addr_req_param_s {
|
||||
uint16_t dst_nwk_addr; /*!< NWK address that request sent to */
|
||||
uint16_t addr_of_interest; /*!< NWK address of interest */
|
||||
uint8_t request_type; /*!< Request type for this command: 0x00 Single device response 0x01 Extended response */
|
||||
uint8_t start_index; /*!< If the Request type for this command is Extended response, the StartIndex provides the
|
||||
* starting index for the requested elements of the associated devices list */
|
||||
} esp_zb_zdo_ieee_addr_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO nwk_addr request command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_nwk_addr_req_param_s {
|
||||
uint16_t dst_nwk_addr; /*!< NWK address that request sent to */
|
||||
esp_zb_ieee_addr_t ieee_addr_of_interest; /*!< IEEE address to be matched by the remote device */
|
||||
uint8_t request_type; /*!< Request type for this command: 0x00 Single device response 0x01 Extended response */
|
||||
uint8_t start_index; /*!< If the Request type for this command is Extended response, the StartIndex provides the
|
||||
* starting index for the requested elements of the associated devices list */
|
||||
} esp_zb_zdo_nwk_addr_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO node descriptor command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_node_desc_req_param_s {
|
||||
uint16_t dst_nwk_addr; /*!< NWK address that is used for IEEE address mapping. */
|
||||
} esp_zb_zdo_node_desc_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO simple descriptor command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_simple_desc_req_param_s {
|
||||
uint16_t addr_of_interest; /*!< NWK address of interest */
|
||||
uint8_t endpoint; /*!< Endpoint of interest */
|
||||
} esp_zb_zdo_simple_desc_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO active endpoint command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_active_ep_req_param_s {
|
||||
uint16_t addr_of_interest; /*!< NWK address of interest */
|
||||
} esp_zb_zdo_active_ep_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO permit join command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_permit_joining_req_param_s {
|
||||
uint16_t dst_nwk_addr; /*!< NWK address that request sent to */
|
||||
uint8_t permit_duration; /*!< The length of time in seconds. 0x00 and 0xff indicate that permission is disabled or enabled */
|
||||
uint8_t tc_significance; /*!< If this is set to 0x01 and the remote device is the Trust Center, the command affects the Trust Center
|
||||
* authentication policy as described in the sub-clauses below; If this is set to 0x00, there is no effect
|
||||
* on the Trust Center */
|
||||
} esp_zb_zdo_permit_joining_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO leave command struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_mgmt_leave_req_param_s {
|
||||
esp_zb_ieee_addr_t device_address; /*!< 64-bit IEEE address on device */
|
||||
uint16_t dst_nwk_addr; /*!< NWK address that request sent to */
|
||||
unsigned int reserved: 6; /*!< Reserved */
|
||||
unsigned int remove_children: 1; /*!< Bitfield of remove children or not */
|
||||
unsigned int rejoin: 1; /*!< Bitfield of rejoin or not */
|
||||
} esp_zb_zdo_mgmt_leave_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO binding table request struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_mgmt_bind_param_s {
|
||||
uint8_t start_index; /*!< The starting index for the requested elements of the Binding Table */
|
||||
uint16_t dst_addr; /*!< The destination address */
|
||||
} esp_zb_zdo_mgmt_bind_param_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO binding table record struct
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_binding_table_record_s {
|
||||
esp_zb_ieee_addr_t src_address; /*!< The source IEEE address for the binding entry. */
|
||||
uint8_t src_endp; /*!< The source endpoint for the binding entry. */
|
||||
uint16_t cluster_id; /*!< The identifier of the cluster on the source device that is bound to the destination device. */
|
||||
uint8_t dst_addr_mode; /*!< Destination address mode @ref esp_zb_zdo_bind_dst_addr_mode_t */
|
||||
esp_zb_addr_u dst_address; /*!< The destination address for the binding entry.16 or 64 bit. As specified by the dst_addr_mode field.*/
|
||||
uint8_t dst_endp; /*!< The destination endpoint for binding entry, this field shall be present only if the DstAddrMode field has a value of 0x03
|
||||
refer to esp_zb_zdo_bind_dst_addr_mode_t */
|
||||
struct esp_zb_zdo_binding_table_record_s *next; /*!< The next binding table record */
|
||||
} esp_zb_zdo_binding_table_record_t;
|
||||
|
||||
/**
|
||||
* @brief The Zigbee ZDO binding table information struct for users
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_binding_table_info_s {
|
||||
uint8_t status; /*!< The status of binding table information refer to esp_zb_zdp_status */
|
||||
uint8_t index; /*!< The index of binding table record */
|
||||
uint8_t total; /*!< The total number of records in the binding table for requests */
|
||||
uint8_t count; /*!< The number of binding table records in the response */
|
||||
esp_zb_zdo_binding_table_record_t *record; /*!< The binding table record list */
|
||||
} esp_zb_zdo_binding_table_info_t;
|
||||
|
||||
/**
|
||||
* @brief Struture of network descriptor request of active scan response
|
||||
*/
|
||||
typedef struct esp_zb_network_descriptor_s{
|
||||
uint16_t short_pan_id; /*!< PAN id */
|
||||
bool permit_joining; /*!< Indicates that at least one router / coordinator on the network currently permits joining */
|
||||
esp_zb_ieee_addr_t extended_pan_id; /*!< Extended PAN id, the MAC address which forms the network */
|
||||
uint8_t logic_channel; /*!< The current logical channel occupied by the network. */
|
||||
bool router_capacity; /*!< This value is set to true if the device is capable of accepting join requests from router-capable
|
||||
devices and set to FALSE otherwise. */
|
||||
bool end_device_capacity; /*!< This value is set to true if the device is capable of accepting join requests from end devices
|
||||
and set to FALSE otherwise.*/
|
||||
} esp_zb_network_descriptor_t;
|
||||
|
||||
/**
|
||||
* @brief Channel information of Energy Detect
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_energy_detect_channel_info_s {
|
||||
uint8_t channel_number; /*!< The channel of energy detect */
|
||||
int8_t energy_detected; /*!< The energy value of channel in dbm */
|
||||
} esp_zb_energy_detect_channel_info_t;
|
||||
|
||||
/**
|
||||
* @brief Structure of Zigbee ZDO Mgmt_Lqi_req command
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_mgmt_lqi_req_param_s {
|
||||
uint8_t start_index; /*!< Starting Index for the requested elements of the Neighbor Table */
|
||||
uint16_t dst_addr; /*!< The destination network short address of request */
|
||||
} esp_zb_zdo_mgmt_lqi_req_param_t;
|
||||
|
||||
/**
|
||||
* @brief Structure of neighbor table list record for Zigbee ZDO Mgmt_Lqi_rsp
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_neighbor_table_list_record_s {
|
||||
esp_zb_ext_pan_id_t extended_pan_id; /*!< 64-bit extended pan id of the neighboring device */
|
||||
esp_zb_ieee_addr_t extended_addr; /*!< 64-bit IEEE address that is unique to every device */
|
||||
uint16_t network_addr; /*!< The 16-bit network address of the neighboring device */
|
||||
uint8_t device_type:2; /*!< The type of the neighbor device @see esp_zb_nwk_device_type_t */
|
||||
uint8_t rx_when_idle:2; /*!< Indicates if neighbor's receiver is enabled during idle portions of the CAP
|
||||
0x00 = Receiver is off
|
||||
0x01 = Receiver is on
|
||||
0x02 = Unknown */
|
||||
uint8_t relationship:3; /*!< The relationship between the neighbor and the current device,
|
||||
@see esp_zb_nwk_relationship_t */
|
||||
uint8_t reserved:1; /*!< This reserved bit shall be set to 0 */
|
||||
uint8_t permit_join; /*!< An indication of whether the neighbor device is accepting join requests */
|
||||
uint8_t depth; /*!< The tree depth of the neighbor device. A value of 0x00 indicates that the
|
||||
device is the ZigBee coordinator for the network */
|
||||
uint8_t lqi; /*!< The estimated link quality for RF transmissions from this device */
|
||||
} esp_zb_zdo_neighbor_table_list_record_t;
|
||||
|
||||
/**
|
||||
* @brief Structure of Zigbee ZDO Mgmt_Lqi_rsp
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_mgmt_lqi_rsp_s {
|
||||
uint8_t status; /*!< The status of the Mgmt_Lqi_req command */
|
||||
uint8_t neighbor_table_entries; /*!< Total number of Neighbor Table entries within the Remote Device. */
|
||||
uint8_t start_index; /*!< Starting index within the Neighbor Table to begin reporting for the
|
||||
NeighborTableList.*/
|
||||
uint8_t neighbor_table_list_count; /*!< Number of Neighbor Table entries included within NeighborTableList. */
|
||||
esp_zb_zdo_neighbor_table_list_record_t *neighbor_table_list; /*!< A list of descriptors, beginning with the StartIndex element and
|
||||
continuing for neighbor_table_list_count, of the elements in the
|
||||
Remote Device's Neighbor Table */
|
||||
} esp_zb_zdo_mgmt_lqi_rsp_t;
|
||||
|
||||
/** Active scan network callback
|
||||
*
|
||||
* @brief A ZDO active scan request callback for user to get scan list status.
|
||||
*
|
||||
* @note User's callback get response from the device that found in network.
|
||||
*
|
||||
* @param[in] zdo_status The ZDO response status, refer to esp_zb_zdp_status_t
|
||||
* @param[in] count Number of discovered networks @p nwk_descriptor
|
||||
* @param[in] nwk_descriptor The pointer to all discovered networks see refer to esp_zb_network_descriptor_t
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_scan_complete_callback_t)(esp_zb_zdp_status_t zdo_status, uint8_t count,
|
||||
esp_zb_network_descriptor_t *nwk_descriptor);
|
||||
|
||||
/**
|
||||
* @brief ZDO energy detect callback
|
||||
*
|
||||
* @param[in] status The status of callback, refer to esp_zb_zdp_status_t
|
||||
* @param[in] count The size of energy detect list
|
||||
* @param[in] ed_list The list of energy detect information, refer to esp_zb_energy_detect_channel_info_t
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_energy_detect_callback_t)(esp_zb_zdp_status_t status, uint16_t count,
|
||||
esp_zb_energy_detect_channel_info_t *channel_info);
|
||||
|
||||
/** Binding table request callback
|
||||
*
|
||||
* @brief A ZDO binding table request callback for user to get the binding table record of remote device.
|
||||
*
|
||||
* @param[in] table_info The binding table record which is only accessed by read, refer to esp_zb_zdo_binding_table_info_s
|
||||
* @param[in] user_ctx User information context, set in `esp_zb_zdo_binding_table_req()`
|
||||
*
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_binding_table_callback_t)(const esp_zb_zdo_binding_table_info_t *table_info, void *user_ctx);
|
||||
|
||||
/** Management LQI Response Callback
|
||||
*
|
||||
* @brief A ZDO Mgmt_Lqi_rsp callback for user to get the mgmt lqi record of remote device.
|
||||
*
|
||||
* @param[in] rsp The response structure of ZDO mgmt lqi, refer to esp_zb_zdo_mgmt_lqi_rsp_t
|
||||
* @param[in] user_ctx User information context, set in esp_zb_zdo_mgmt_lqi_req()
|
||||
*/
|
||||
typedef void (*esp_zb_zdo_mgmt_lqi_rsp_callback_t)(const esp_zb_zdo_mgmt_lqi_rsp_t *rsp, void *user_ctx);
|
||||
|
||||
/********************* Declare functions **************************/
|
||||
/* ZDO command list, more ZDO command will be supported later like node_desc, power_desc */
|
||||
|
||||
/**
|
||||
* @brief Active scan available network.
|
||||
*
|
||||
* Network discovery service for scanning available network
|
||||
*
|
||||
* @param[in] channel_mask Valid channel mask is from 0x00000800 (only channel 11) to 0x07FFF800 (all channels from 11 to 26)
|
||||
* @param[in] scan_duration Time spent scanning each channel, in units of ((1 << scan_duration) + 1) * a beacon time.
|
||||
* @param[in] user_cb A user callback to get the active scan result please refer to esp_zb_zdo_scan_complete_callback_t
|
||||
*/
|
||||
void esp_zb_zdo_active_scan_request(uint32_t channel_mask, uint8_t scan_duration, esp_zb_zdo_scan_complete_callback_t user_cb);
|
||||
|
||||
/**
|
||||
* @brief Energy detect request
|
||||
*
|
||||
* @param[in] channel_mask The channel mask that will trigger the energy detection, with a range from 0x00000800 to 0x07FFF800.
|
||||
* @param[in] duration The detection duration on each channel, in units of ((1 << scan_duration) + 1) * a beacon time.
|
||||
* @param[in] cb A user callback to receive the energy detection result, see esp_zb_zdo_energy_detect_callback_t.
|
||||
*/
|
||||
void esp_zb_zdo_energy_detect_request(uint32_t channel_mask, uint8_t duration, esp_zb_zdo_energy_detect_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief Send bind device request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the bind request command @ref esp_zb_zdo_bind_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received bind response refer to esp_zb_zdo_bind_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_device_bind_req(esp_zb_zdo_bind_req_param_t *cmd_req, esp_zb_zdo_bind_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send unbind device request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the bind request command @ref esp_zb_zdo_bind_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received bind response refer to esp_zb_zdo_bind_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_device_unbind_req(esp_zb_zdo_bind_req_param_t *cmd_req, esp_zb_zdo_bind_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send find on-off device request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the find request command @ref esp_zb_zdo_match_desc_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received find response refer to esp_zb_zdo_match_desc_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_find_on_off_light(esp_zb_zdo_match_desc_req_param_t *cmd_req, esp_zb_zdo_match_desc_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send find color_dimmable device request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the find request command @ref esp_zb_zdo_match_desc_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received find response refer to esp_zb_zdo_match_desc_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_find_color_dimmable_light(esp_zb_zdo_match_desc_req_param_t *cmd_req, esp_zb_zdo_match_desc_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send match desc request to find matched Zigbee device
|
||||
*
|
||||
* @param[in] param Pointer to @ref esp_zb_zdo_match_desc_req_param_s that will be used to match device
|
||||
* @param[in] user_cb A user callback that will be called if received find response refer to esp_zb_zdo_match_desc_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
* @return
|
||||
* - ESP_OK: Success in send match desc request
|
||||
* - ESP_ERR_NO_MEM: Failed to allocate the memory for the reqeust
|
||||
* - ESP_ERR_INVALID_SIZE: The size of cluster list is wrong in @p param
|
||||
*/
|
||||
esp_err_t esp_zb_zdo_match_cluster(esp_zb_zdo_match_desc_req_param_t *param, esp_zb_zdo_match_desc_callback_t user_cb,
|
||||
void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send ieee_addr request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the ieee address request command @ref esp_zb_zdo_ieee_addr_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received ieee address response refer to esp_zb_zdo_ieee_addr_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_ieee_addr_req(esp_zb_zdo_ieee_addr_req_param_t *cmd_req, esp_zb_zdo_ieee_addr_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send nwk_addr request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the nwk address request command @ref esp_zb_zdo_nwk_addr_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received nwk address response refer to esp_zb_zdo_nwk_addr_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_nwk_addr_req(esp_zb_zdo_nwk_addr_req_param_t *cmd_req, esp_zb_zdo_nwk_addr_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send node descriptor request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the node descriptor request command @ref esp_zb_zdo_node_desc_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received node desc response refer to esp_zb_zdo_node_desc_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_node_desc_req(esp_zb_zdo_node_desc_req_param_t *cmd_req, esp_zb_zdo_node_desc_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send simple descriptor request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the simple descriptor request command @ref esp_zb_zdo_simple_desc_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received simple desc response refer to esp_zb_zdo_simple_desc_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_simple_desc_req(esp_zb_zdo_simple_desc_req_param_t *cmd_req, esp_zb_zdo_simple_desc_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send active endpoint request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the active endpoint request command @ref esp_zb_zdo_active_ep_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received active ep response refer to esp_zb_zdo_active_ep_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_active_ep_req(esp_zb_zdo_active_ep_req_param_t *cmd_req, esp_zb_zdo_active_ep_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send leave request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the leave request command @ref esp_zb_zdo_mgmt_leave_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received leave response refer to esp_zb_zdo_leave_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_device_leave_req(esp_zb_zdo_mgmt_leave_req_param_t *cmd_req, esp_zb_zdo_leave_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send permit join request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the permit join request command @ref esp_zb_zdo_permit_joining_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received permit join response refer to esp_zb_zdo_permit_join_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_permit_joining_req(esp_zb_zdo_permit_joining_req_param_t *cmd_req, esp_zb_zdo_permit_join_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send binding table request command
|
||||
*
|
||||
* @param[in] cmd_req Pointer to the zdo mgmt bind request command @ref esp_zb_zdo_mgmt_bind_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received binding table response refer to esp_zb_zdo_binding_table_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when callback trigger
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_binding_table_req(esp_zb_zdo_mgmt_bind_param_t *cmd_req, esp_zb_zdo_binding_table_callback_t user_cb, void *user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Send device announcement command
|
||||
*
|
||||
*/
|
||||
void esp_zb_zdo_device_announcement_req(void);
|
||||
|
||||
/**
|
||||
* @brief Send ZDO management lqi request command
|
||||
*
|
||||
* @param[in] cmd_req A pointer indicates the fields of the Mgmt_Lqi_req command, @ref esp_zb_zdo_mgmt_lqi_req_param_s
|
||||
* @param[in] user_cb A user callback that will be called if received Mgmt_Lqi_req response refer to esp_zb_zdo_mgmt_lqi_rsp_callback_t
|
||||
* @param[in] user_ctx A void pointer that contains the user defines additional information when user_cb is triggered
|
||||
*/
|
||||
void esp_zb_zdo_mgmt_lqi_req(esp_zb_zdo_mgmt_lqi_req_param_t *cmd_req, esp_zb_zdo_mgmt_lqi_rsp_callback_t user_cb, void* user_ctx);
|
||||
|
||||
/**
|
||||
* @brief Stringify the Zigbee Device Object signal
|
||||
*
|
||||
* @param[in] signal A @ref esp_zb_app_signal_type_t object that expect to stringified
|
||||
* @return A string pointer of esp_zb_app_signal_type_t
|
||||
*/
|
||||
const char *esp_zb_zdo_signal_to_string(esp_zb_app_signal_type_t signal);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,838 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
#ifdef CONFIG_ZB_GP_ENABLED
|
||||
#include "zgp/esp_zigbee_zgp.h"
|
||||
#endif /* CONFIG_ZB_GP_ENABLED */
|
||||
|
||||
/**
|
||||
* @brief ZDP status values
|
||||
* @anchor esp_zb_zdp_status
|
||||
* @note the status feedback for the zdo command
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZDP_STATUS_SUCCESS = 0x00, /*!< The requested operation or transmission was completed successfully. */
|
||||
ESP_ZB_ZDP_STATUS_INV_REQUESTTYPE = 0x80, /*!< The supplied request type was invalid. */
|
||||
ESP_ZB_ZDP_STATUS_DEVICE_NOT_FOUND = 0x81, /*!< The requested device did not exist on a device following a child descriptor request to a parent.*/
|
||||
ESP_ZB_ZDP_STATUS_INVALID_EP = 0x82, /*!< The supplied endpoint was equal to 0x00 or between 0xf1 and 0xff. */
|
||||
ESP_ZB_ZDP_STATUS_NOT_ACTIVE = 0x83, /*!< The requested endpoint is not described by simple descriptor. */
|
||||
ESP_ZB_ZDP_STATUS_NOT_SUPPORTED = 0x84, /*!< The requested optional feature is not supported on the target device. */
|
||||
ESP_ZB_ZDP_STATUS_TIMEOUT = 0x85, /*!< A timeout has occurred with the requested operation. */
|
||||
ESP_ZB_ZDP_STATUS_NO_MATCH = 0x86, /*!< The end device bind request was unsuccessful due to a failure to match any suitable clusters.*/
|
||||
ESP_ZB_ZDP_STATUS_NO_ENTRY = 0x88, /*!< The unbind request was unsuccessful due to the coordinator or source device not having an entry in its binding table to unbind.*/
|
||||
ESP_ZB_ZDP_STATUS_NO_DESCRIPTOR = 0x89, /*!< A child descriptor was not available following a discovery request to a parent. */
|
||||
ESP_ZB_ZDP_STATUS_INSUFFICIENT_SPACE = 0x8a, /*!< The device does not have storage space to support the requested operation. */
|
||||
ESP_ZB_ZDP_STATUS_NOT_PERMITTED = 0x8b, /*!< The device is not in the proper state to support the requested operation. */
|
||||
ESP_ZB_ZDP_STATUS_TABLE_FULL = 0x8c, /*!< The device does not have table space to support the operation. */
|
||||
ESP_ZB_ZDP_STATUS_NOT_AUTHORIZED = 0x8d, /*!< The permissions configuration table on the target indicates that the request is not authorized from this device.*/
|
||||
ESP_ZB_ZDP_STATUS_BINDING_TABLE_FULL = 0x8e, /*!< The device doesn't have binding table space to support the operation */
|
||||
ESP_ZB_ZDP_STATUS_INVALID_INDEX = 0x8f, /*!< The index in the received command is out of bounds. */
|
||||
} esp_zb_zdp_status_t;
|
||||
|
||||
/**
|
||||
* @brief signal passed to the esp_zb_application_signal_handler
|
||||
* @anchor esp_zb_app_signal_type_t
|
||||
*/
|
||||
typedef enum {
|
||||
/**
|
||||
* Overview:
|
||||
* - The device has started in non-BDB commissioning mode.
|
||||
*
|
||||
* When generated:
|
||||
* - After the device has started and completed non-BDB commissioning.
|
||||
* - In case of a commissioning error.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Device has started and joined the network.
|
||||
* - ESP_FAIL: Device startup failure.
|
||||
*
|
||||
* Payload:
|
||||
* - None.
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_DEFAULT_START = 0x00,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Stack framework (scheduler, buffer pool, NVRAM, etc.) startup complete,
|
||||
* ready for initializing bdb commissioning.
|
||||
*
|
||||
* When generated:
|
||||
* - When the stack starts using the esp_zb_start(false) method.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Stack framework has been initialized.
|
||||
*
|
||||
* Payload:
|
||||
* - None.
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP = 0x01,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that a Zigbee device has joined or rejoined the network.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon receiving the device_annce command.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: device_annce command was received.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_device_annce_params_t
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_DEVICE_ANNCE = 0x02,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that the device itself has left the network.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon receiving the Leave command.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Leave command was received.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_leave_params_t
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_LEAVE = 0x03,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates corrupted or incorrect signal information.
|
||||
*
|
||||
* When generated:
|
||||
* - When incorrect signal information is detected.
|
||||
*
|
||||
* Status code:
|
||||
* - None
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_ERROR = 0x04,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicate the basic network information of factory new device has been initialized,
|
||||
* ready for Zigbee commissioning
|
||||
*
|
||||
* When generated:
|
||||
* - Upon the basic device behavior has been initialization
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Factory new device initialization complete
|
||||
* - ESP_FAIL: Factory new device commissioning failed
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START = 0x05,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicate device joins or rejoins network from the configured network information.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon the device joining or rejoining Zigbee network using configuration network information.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Join or rejoin successfully
|
||||
* - ESP_FAIL: Join or rejoin failed
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT = 0x06,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that the Touchlink initiator has successfully started a network with the target and is ready
|
||||
* for rejoining.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon receiving the Network Start response during the Touchlink commissioning procedure.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: The new network has been started successfully.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_bdb_signal_touchlink_nwk_started_params_t
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_TOUCHLINK_NWK_STARTED = 0x07,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicate Touchlink target has join the initiator network.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon Touchlink initiator receives the Network Start response during the Touchlink commissioning procedure.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Touchlink target join successfully
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_bdb_signal_touchlink_nwk_joined_router_t
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_TOUCHLINK_NWK_JOINED_ROUTER = 0x08,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the result of the Touchlink initiator commissioning process.
|
||||
*
|
||||
* When generated:
|
||||
* - When the Touchlink initiator initiates network commission.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Commissioning successful.
|
||||
* - ESP_FAIL: No valid scan response received.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_TOUCHLINK = 0x09,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the completion of BDB network steering.
|
||||
*
|
||||
* When generated:
|
||||
* - When the device initiates the network steering commissioning process.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Network steering completed successfully.
|
||||
* - ESP_FAIL: Network steering failed or was canceled.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_STEERING = 0x0a,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the completion of BDB network formation.
|
||||
*
|
||||
* When generated:
|
||||
* - When the device initiates the network formation commissioning process.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Network formation completed successfully.
|
||||
* - ESP_FAIL: Network formation failed or was canceled.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_FORMATION = 0x0b,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the completion of BDB finding and binding (F&B) for a target endpoint.
|
||||
*
|
||||
* When generated:
|
||||
* - When F&B target timeout.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: F&B target identifying time is expired.
|
||||
* - ESP_FAIL: F&B target identifying is cancelled.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_FINDING_AND_BINDING_TARGET_FINISHED = 0x0c,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the BDB F&B with a Target succeeded or F&B initiator timeout expired or cancelled.
|
||||
*
|
||||
* When generated:
|
||||
* - When F&B target timeout.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: On success.
|
||||
* - ESP_FAIL: Expired or cancelled.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_FINDING_AND_BINDING_INITIATOR_FINISHED = 0x0d,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that the Touchlink target is preparing to commission with the initiator.
|
||||
*
|
||||
* When generated:
|
||||
* - When the Touchlink procedure starts on the target device.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Waiting for the commissioning procedure to proceed.
|
||||
* - ESP_FAIL: Touchlink procedure failed or was canceled.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_TOUCHLINK_TARGET = 0x0e,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that the Touchlink target network has started.
|
||||
*
|
||||
* When generated:
|
||||
* - When the Touchlink target starts the network upon receiving a start_network, join_router, or join_ed request.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Network started successfully.
|
||||
* - ESP_FAIL: Network start failed or was canceled.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_TOUCHLINK_NWK = 0x0f,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that the Touchlink target commissioning procedure has finished.
|
||||
*
|
||||
* When generated:
|
||||
* - When the Touchlink target times out or completes the commissioning procedure.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Commissioning procedure completed successfully.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_TOUCHLINK_TARGET_FINISHED = 0x10,
|
||||
|
||||
/* Reserve: 0x11 */
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that a new device has initiated an association procedure.
|
||||
*
|
||||
* When generated:
|
||||
* - When a new device is associated.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: The new device was successfully associated.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_nwk_signal_device_associated_params_t
|
||||
*/
|
||||
ESP_ZB_NWK_SIGNAL_DEVICE_ASSOCIATED = 0x12,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that a child device has left the network.
|
||||
*
|
||||
* When generated:
|
||||
* - When the leave command is received from the child device.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: The child device left the network successfully.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_leave_indication_params_t
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_LEAVE_INDICATION = 0x13,
|
||||
|
||||
/* Reserve: 0x14 */
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the GPCB (Green Power Combo Basic) commissioning signal.
|
||||
*
|
||||
* When generated:
|
||||
* - When a device is commissioned or decommissioned by the GPCB.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Commissioning or decommissioning completed successfully.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zgp_signal_commissioning_params_t
|
||||
*/
|
||||
|
||||
ESP_ZB_ZGP_SIGNAL_COMMISSIONING = 0x15,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the device can enter sleep mode.
|
||||
*
|
||||
* When generated:
|
||||
* - When the stack determines that the device is eligible to enter sleep mode.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: The device can enter sleep mode.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_can_sleep_params_t
|
||||
*/
|
||||
ESP_ZB_COMMON_SIGNAL_CAN_SLEEP = 0x16,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates whether a specific part of the production configuration was found.
|
||||
*
|
||||
* When generated:
|
||||
* - After restoring the production configuration.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Production configuration successfully loaded from storage.
|
||||
* - ESP_FAIL: No production configuration found in storage.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY = 0x17,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that the Neighbor Table has expired, and no active route links remain.
|
||||
*
|
||||
* When generated:
|
||||
* - When all routes have expired.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: All routers have expired.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_NWK_SIGNAL_NO_ACTIVE_LINKS_LEFT = 0x18,
|
||||
|
||||
/* Reserve: 0x19 - 0x2e */
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that a new device has been authorized by the Trust Center in the network.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon successful authorization.
|
||||
* - Upon authorization failure.
|
||||
* - Upon authorization timeout.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: New device is authorized.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_device_authorized_params_t
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED = 0x2f,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that a device has joined, rejoined, or left the network from the Trust Center or its parents.
|
||||
*
|
||||
* When generated:
|
||||
* - Standard device secured rejoin.
|
||||
* - Standard device unsecured join.
|
||||
* - Device left.
|
||||
* - Standard device trust center rejoin.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: New device information updated.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_device_update_params_t
|
||||
*/
|
||||
ESP_ZB_ZDO_SIGNAL_DEVICE_UPDATE = 0x30,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Detects a PAN ID conflict and inquires for a resolution.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon detecting a PAN ID conflict.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: On success.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_NWK_SIGNAL_PANID_CONFLICT_DETECTED = 0x31,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that a PAN ID conflict has been detected. The application must decide whether to
|
||||
* initiate its resolution or not.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon detecting a PAN ID conflict.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Resolution initiated successfully.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_nwk_status_indication_params_t
|
||||
*/
|
||||
ESP_ZB_NLME_STATUS_INDICATION = 0x32,
|
||||
|
||||
/* Reserve: 0x33 - 0x34 */
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates that the Trust Center rejoin procedure has been completed.
|
||||
*
|
||||
* When generated:
|
||||
* - Upon successful completion of the TC rejoin procedure by the device.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: TC rejoin completed successfully.
|
||||
* - ESP_FAIL: Rejoin failed.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_nwk_status_indication_params_t
|
||||
*/
|
||||
|
||||
ESP_ZB_BDB_SIGNAL_TC_REJOIN_DONE = 0x35,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the status of the network (open or closed).
|
||||
*
|
||||
* When generated:
|
||||
* - When the network is opened.
|
||||
* - When the network is closed.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: On successful operation.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_signal_nwk_status_indication_params_t
|
||||
*/
|
||||
ESP_ZB_NWK_SIGNAL_PERMIT_JOIN_STATUS = 0x36,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates the result of cancelling BDB steering.
|
||||
*
|
||||
* When generated:
|
||||
* - When `esp_zb_bdb_cancel_steering()` is processed.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Steering is cancelled successfully.
|
||||
* - ESP_ERR_INVALID_STATE: Steering is not in progress.
|
||||
* - ESP_FAIL: Failed to cancel steering.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_STEERING_CANCELLED = 0x37,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Notifies the result of cancelling BDB formation.
|
||||
*
|
||||
* When generated:
|
||||
* - When `esp_zb_bdb_cancel_formation()` is processed.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: Formation is cancelled successfully.
|
||||
* - ESP_ERR_INVALID_STATE: Formation is not in progress.
|
||||
* - ESP_FAIL: Failed to cancel formation.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_BDB_SIGNAL_FORMATION_CANCELLED = 0x38,
|
||||
|
||||
/* Reserve: 0x39 - 0x3a */
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Indicates a ZGP mode change.
|
||||
*
|
||||
* When generated:
|
||||
* - When a GPCB Sink changes mode between operational mode and commissioning mode.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: On success.
|
||||
*
|
||||
* Payload:
|
||||
* - None
|
||||
*/
|
||||
ESP_ZB_ZGP_SIGNAL_MODE_CHANGE = 0x3b,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - Notify that the destination device is unavailable.
|
||||
*
|
||||
* When generated:
|
||||
* - When the stack could not send a packet over NWK or APS, for example:
|
||||
* - No ACK on the MAC layer;
|
||||
* - No response to a network address request;
|
||||
* - No APS-ACK to an APS packet.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: On success.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zdo_device_unavailable_params_t
|
||||
*/
|
||||
ESP_ZB_ZDO_DEVICE_UNAVAILABLE = 0x3c,
|
||||
|
||||
/**
|
||||
* Overview:
|
||||
* - ZGP Approve Commissioning.
|
||||
*
|
||||
* When generated:
|
||||
* - When the ZGP subsystem is ready to create a new pairing, but the APP should check
|
||||
* if the GPD application functionality matches to continue the pairing.
|
||||
*
|
||||
* Status code:
|
||||
* - ESP_OK: On success.
|
||||
*
|
||||
* Payload:
|
||||
* - Refer to esp_zb_zgp_signal_approve_comm_params_t
|
||||
*/
|
||||
ESP_ZB_ZGP_SIGNAL_APPROVE_COMMISSIONING = 0x3d,
|
||||
ESP_ZB_SIGNAL_END = 0x3e,
|
||||
} esp_zb_app_signal_type_t;
|
||||
|
||||
/**
|
||||
* @brief The struct of esp zboss app signal message table
|
||||
* @anchor esp_zb_app_signal_msg_t
|
||||
*/
|
||||
typedef struct {
|
||||
esp_zb_app_signal_type_t signal; /*!< The signal type of Zigbee */
|
||||
const char *msg; /*!< The string of Zigbee signal */
|
||||
} esp_zb_app_signal_msg_t;
|
||||
|
||||
/**
|
||||
* @brief The enum of mode of Base Device Behavior (BDB)
|
||||
* @anchor esp_zb_bdb_commissioning_mode
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_BDB_MODE_INITIALIZATION = 0,
|
||||
ESP_ZB_BDB_MODE_NETWORK_STEERING = 2,
|
||||
ESP_ZB_BDB_MODE_NETWORK_FORMATION = 4,
|
||||
} esp_zb_bdb_commissioning_mode_t;
|
||||
|
||||
/**
|
||||
* @brief The enum of bind request destination address mode
|
||||
* @anchor esp_zb_zdo_bind_dst_addr_mode_t
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZDO_BIND_DST_ADDR_MODE_16_BIT_GROUP = 0x01U,
|
||||
ESP_ZB_ZDO_BIND_DST_ADDR_MODE_64_BIT_EXTENDED = 0x03U,
|
||||
} esp_zb_zdo_bind_dst_addr_mode_t;
|
||||
|
||||
/* zdo param define */
|
||||
/**
|
||||
* @name Leave types
|
||||
* @anchor nwk_leave_type
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_NWK_LEAVE_TYPE_RESET = 0x00, /*!< Leave without rejoin */
|
||||
ESP_ZB_NWK_LEAVE_TYPE_REJOIN = 0x01 /*!< Leave with rejoin */
|
||||
} esp_zb_nwk_leave_type_t;
|
||||
|
||||
/**
|
||||
* @brief TC action on incoming update device
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZDO_TC_ACTION_AUTHORIZE = 0x00U, /*!< Authorize device */
|
||||
ESP_ZB_ZDO_TC_ACTION_DENY = 0x01U, /*!< deny authorization, remove it */
|
||||
ESP_ZB_ZDO_TC_ACTION_IGNORE = 0x02U /*!< ignore Update Device */
|
||||
} esp_zb_zdo_update_dev_tc_action_t;
|
||||
|
||||
/**
|
||||
* @brief ZDO update device status
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_ZB_ZDO_STANDARD_DEV_SECURED_REJOIN = 0x00U, /*!< Standard device secured rejoin */
|
||||
ESP_ZB_ZDO_STANDARD_DEV_UNSECURED_JOIN = 0x01U, /*!< Standard device unsecured join */
|
||||
ESP_ZB_ZDO_STANDARD_DEV_LEFT = 0x02U, /*!< Standard device left */
|
||||
ESP_ZB_ZDO_STANDARD_DEV_TC_REJOIN = 0x03U, /*!< Standard device trust center rejoin */
|
||||
/* 0x04 – 0x07 = Reserved */
|
||||
} esp_zb_zdo_update_dev_status_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZDO_SIGNAL_LEAVE signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_signal_leave_params_s {
|
||||
uint8_t leave_type; /*!< Leave type, refer to esp_zb_nwk_leave_type_t */
|
||||
} esp_zb_zdo_signal_leave_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZDO_SIGNAL_LEAVE_INDICATION signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_signal_leave_indication_params_s {
|
||||
uint16_t short_addr; /*!< Short address of device requested to leave or leaving device*/
|
||||
esp_zb_ieee_addr_t device_addr; /*!< Long address of device requested to leave or leaving device*/
|
||||
uint8_t rejoin; /*!< 1 if this was leave with rejoin; 0 - otherwise */
|
||||
} esp_zb_zdo_signal_leave_indication_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_COMMON_SIGNAL_CAN_SLEEP signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_signal_can_sleep_params_s {
|
||||
uint32_t sleep_duration; /*!< sleep duration in milliseconds */
|
||||
} esp_zb_zdo_signal_can_sleep_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZDO_SIGNAL_DEVICE_ANNCE signal
|
||||
*
|
||||
* @note Stack passes this parameter to application when some device joins/rejoins to network.
|
||||
*/
|
||||
typedef struct esp_zb_zdo_signal_device_annce_params_s {
|
||||
uint16_t device_short_addr; /*!< address of device that recently joined to network */
|
||||
esp_zb_ieee_addr_t ieee_addr; /*!< The 64-bit (IEEE) address assigned to the device. */
|
||||
uint8_t capability; /*!< The capability of the device. */
|
||||
} esp_zb_zdo_signal_device_annce_params_t;
|
||||
|
||||
/**
|
||||
* @@brief The payload of ESP_ZB_ZDO_SIGNAL_DEVICE_UPDATE signal
|
||||
*/
|
||||
typedef struct esp_zb_zdo_signal_device_update_params_s {
|
||||
esp_zb_ieee_addr_t long_addr; /*!< Long Address of the updated device */
|
||||
uint16_t short_addr; /*!< Short Address of the updated device */
|
||||
uint8_t status; /*!< Indicates the updated status of the device, refer to esp_zb_zdo_update_dev_status_t */
|
||||
uint8_t tc_action; /*!< Trust center action, refer to esp_zb_zdo_update_dev_tc_action_t */
|
||||
uint16_t parent_short; /*!< The short address of device's parent */
|
||||
} esp_zb_zdo_signal_device_update_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED signal
|
||||
* @note The authorization_type as following:
|
||||
* 0x00 = Authorization type for legacy devices ( < r21)
|
||||
* Status:
|
||||
* 0x00: Authorization success
|
||||
* 0x01: Authorization failed
|
||||
* 0x01 = Authorization type for r21 device through TCLK
|
||||
* Status:
|
||||
* 0x00: Authorization success
|
||||
* 0x01: Authorization timeout
|
||||
* 0x02: Authorization failed
|
||||
* 0x02 = Authorization type for SE through CBKE
|
||||
* Status:
|
||||
* 0x00: Authorization success
|
||||
*/
|
||||
typedef struct esp_zb_zdo_signal_device_authorized_params_s {
|
||||
esp_zb_ieee_addr_t long_addr; /*!< Long Address of the updated device */
|
||||
uint16_t short_addr; /*!< Short Address of the updated device */
|
||||
uint8_t authorization_type; /*!< Type of the authorization procedure */
|
||||
uint8_t authorization_status; /*!< Status of the authorization procedure which depends on authorization_type */
|
||||
} esp_zb_zdo_signal_device_authorized_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZDO_DEVICE_UNAVAILABLE signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_device_unavailable_params_s {
|
||||
esp_zb_ieee_addr_t long_addr; /*!< Long address of the unavailable device */
|
||||
uint16_t short_addr; /*!< Short address of unavailable device */
|
||||
} esp_zb_zdo_device_unavailable_params_t;
|
||||
|
||||
#ifdef CONFIG_ZB_GP_ENABLED
|
||||
/**
|
||||
* @brief ZGP approve commissioning parameters
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zgp_approve_comm_params_s {
|
||||
esp_zb_zgpd_id_t zgpd_id; /*!< ZGPD ID */
|
||||
uint8_t device_id; /*!< ZGPD device ID */
|
||||
uint16_t manuf_id; /*!< Manufacturer ID (meaningful if device_id = 0xFE or 0xFF) */
|
||||
uint16_t manuf_model_id; /*!< Manufacturer model ID (meaningful if device_id = 0xFE or 0xFF) */
|
||||
esp_zb_ieee_addr_t ieee_addr; /*!< ZGPD long IEEE address if available, otherwise filled with zeroes */
|
||||
uint8_t pairing_endpoint; /*!< Device endpoint, on which commissioning is currently active */
|
||||
esp_zb_zgp_gpd_cmds_list_t gpd_cmds_list; /*!< ZGPD Command list */
|
||||
esp_zb_zgp_cluster_list_t cluster_list; /*!< ZGPD Cluster list */
|
||||
uint8_t num_of_reports; /*!< total number of different report descriptors that GPD sent during the commissioning process */
|
||||
esp_zb_zgp_raw_report_desc_t reports[ZB_ZGP_APP_DESCR_REPORTS_NUM]; /*!< array of reports*/
|
||||
bool pairing_configuration; /*!< It is ZB_TRUE in case this approve signal was triggered by GP Pairing Configuration command */
|
||||
uint8_t actions; /*!< Pairing configuration actions */
|
||||
uint8_t num_of_endpoints; /*!< Pairing configuration number of paired endpoints field
|
||||
- 0x00 and 0xfd: there are no paired endpoints
|
||||
- 0xff: all matching endpoints are to be paired
|
||||
- 0xfe: paired endpoints are to be derived by the sink itself
|
||||
- other values: paired_endpoints field is present and contains the list of local endpoints paired to this GPD
|
||||
**/
|
||||
uint8_t paired_endpoints[ZB_ZGP_MAX_PAIRED_ENDPOINTS]; /*!< Paired endpoint numbers */
|
||||
} esp_zgp_approve_comm_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZGP_SIGNAL_APPROVE_COMMISSIONING signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zgp_signal_approve_comm_params_s {
|
||||
esp_zgp_approve_comm_params_t *param; /*!< Parameter for approving commissioning */
|
||||
} esp_zb_zgp_signal_approve_comm_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZGP_SIGNAL_MODE_CHANGE signal
|
||||
*
|
||||
* Stack passes this parameter to application to notify about GP mode change.
|
||||
*/
|
||||
typedef struct esp_zb_zgp_signal_mode_change_params_s {
|
||||
esp_zb_zgp_mode_change_reason_t reason; /*!< Reason for mode change, refer to esp_zb_zgp_mode_change_reason_t */
|
||||
esp_zb_zgp_mode_t new_mode; /*!< New mode */
|
||||
} esp_zb_zgp_signal_mode_change_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_ZGP_SIGNAL_COMMISSIONING signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zgp_signal_commissioning_params_s {
|
||||
esp_zb_zgpd_id_t zgpd_id; /*!< Pointer to GPD ID */
|
||||
esp_zb_zgp_comm_status_t result; /*!< commissioning result, refer to esp_zb_zgp_comm_status_t */
|
||||
} esp_zb_zgp_signal_commissioning_params_t;
|
||||
#endif /* CONFIG_ZB_GP_ENABLED */
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_BDB_SIGNAL_TOUCHLINK_NWK_STARTED signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_bdb_signal_touchlink_nwk_started_params_s {
|
||||
esp_zb_ieee_addr_t device_ieee_addr; /*!< The ieee address of touchlink target */
|
||||
uint8_t endpoint; /*!< The endpoint id on the touchlink target */
|
||||
uint16_t profile_id; /*!< The profile id of touchlink profile */
|
||||
} esp_zb_bdb_signal_touchlink_nwk_started_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_BDB_SIGNAL_TOUCHLINK_NWK_JOINED_ROUTER signal
|
||||
*
|
||||
*/
|
||||
typedef esp_zb_bdb_signal_touchlink_nwk_started_params_t esp_zb_bdb_signal_touchlink_nwk_joined_router_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_BDB_SIGNAL_TOUCHLINK_NWK_JOINED_ED signal
|
||||
*
|
||||
*/
|
||||
typedef esp_zb_bdb_signal_touchlink_nwk_started_params_t esp_zb_bdb_signal_touchlink_nwk_joined_ed_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_NLME_STATUS_INDICATION signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_zdo_signal_nwk_status_indication_params_s {
|
||||
uint8_t status; /*!< Error code associated with the failure, refer to esp_zb_nwk_command_status_t */
|
||||
uint16_t network_addr; /*!< Network device address associated with the status information */
|
||||
uint8_t unknown_command_id; /*!< Unknown command ID */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zdo_signal_nwk_status_indication_params_t;
|
||||
|
||||
/**
|
||||
* @brief The payload of ESP_ZB_NWK_SIGNAL_DEVICE_ASSOCIATED signal
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zb_nwk_signal_device_associated_params_s {
|
||||
esp_zb_ieee_addr_t device_addr; /*!< address of associated device */
|
||||
} esp_zb_nwk_signal_device_associated_params_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,429 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "esp_err.h"
|
||||
#include "zb_config.h"
|
||||
#include "zb_config_common.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Fill the security level for ZGP sink
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_ZGP_FILL_GPS_SECURITY_LEVEL(sec_level, with_link_key, involve_tc) \
|
||||
(((sec_level) & 3U) | ((!!(with_link_key)) << 2U) | ((!!(involve_tc)) << 3U))
|
||||
|
||||
/**
|
||||
* @brief Compare the ZGP devive identifier
|
||||
*
|
||||
*/
|
||||
#define ESP_ZB_ZGPD_IDS_COMPARE(id1, id2) \
|
||||
(((id1)->app_id == (id2)->app_id) && \
|
||||
(((id1)->app_id == ESP_ZB_ZGP_APP_ID_0000) \
|
||||
? ((id1)->addr.src_id == (id2)->addr.src_id) \
|
||||
: (!memcmp(&(id1)->addr.ieee_addr, &(id2)->addr.ieee_addr, sizeof(esp_zb_ieee_addr_t)) && ((id1)->endpoint == (id2)->endpoint))))
|
||||
|
||||
#define ESP_ZB_GPDF_CMD_UNDEFINED (0xff)
|
||||
#define ESP_ZB_ZGP_ZCL_CMD_ID_UNDEFINED (0xff)
|
||||
#define ESP_ZB_ZGP_ZCL_CLUSTER_ID_UNDEFINED (0xffff)
|
||||
#define ESP_ZB_ZGP_MAPPING_ENTRY_PARSED_PAYLOAD (0xfe)
|
||||
|
||||
/**
|
||||
* @brief Possible ZGP commissioning result
|
||||
*/
|
||||
typedef enum esp_zb_zgp_comm_status_e {
|
||||
ESP_ZB_ZGP_COMMISSIONING_COMPLETED, /*!< Commissioning with some device completed successfully */
|
||||
ESP_ZB_ZGP_COMMISSIONING_FAILED, /*!< Commissioning failed. */
|
||||
ESP_ZB_ZGP_COMMISSIONING_TIMED_OUT, /*!< Commissioning failed, because of timeout */
|
||||
ESP_ZB_ZGP_COMMISSIONING_NO_MATCH_ERROR, /*!< No functionality match with commissioning device is found. */
|
||||
ESP_ZB_ZGP_COMMISSIONING_INTERNAL_ERROR, /*!< Commissioning failed, because some internal error occurred in stack. */
|
||||
ESP_ZB_ZGP_COMMISSIONING_EXTERNAL_ERROR, /*!< Commissioning failed, because some external error has occurred. */
|
||||
ESP_ZB_ZGP_COMMISSIONING_CANCELLED_BY_USER, /*!< User cancelled commissioning by calling esp_zb_zgps_stop_commissioning */
|
||||
ESP_ZB_ZGP_ZGPD_DECOMMISSIONED, /*!< ZGPD sent Decommissioning command */
|
||||
} esp_zb_zgp_comm_status_t;
|
||||
|
||||
/** @brief possible types of GP device */
|
||||
typedef enum esp_zgp_gp_device_e {
|
||||
ESP_ZGP_DEVICE_PROXY = 0x0060, /*!< Proxy device */
|
||||
ESP_ZGP_DEVICE_PROXY_BASIC = 0x0061, /*!< Proxy basic device */
|
||||
ESP_ZGP_DEVICE_TARGET_PLUS = 0x0062, /*!< Target plus device */
|
||||
ESP_ZGP_DEVICE_TARGET = 0x0063, /*!< Target device */
|
||||
ESP_ZGP_DEVICE_COMMISSIONING_TOOL = 0x0064, /*!< Commissioning tool device */
|
||||
ESP_ZGP_DEVICE_COMBO = 0x0065, /*!< Combo device */
|
||||
ESP_ZGP_DEVICE_COMBO_BASIC = 0x0066 /*!< Combo basic device */
|
||||
} esp_zgp_gp_device_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP Sink mode change reason
|
||||
*/
|
||||
typedef enum esp_zb_zgp_mode_change_reason_e {
|
||||
ESP_ZB_ZGP_MODE_CHANGE_TRIGGERED_BY_COMMAND = 1, /*!< GP Sink Commissioning Mode Command */
|
||||
ESP_ZB_ZGP_MODE_CHANGE_TRIGGERED_BY_USER, /*!< Application decided to change the mode */
|
||||
ESP_ZB_ZGP_MODE_CHANGE_ON_FIRST_PARING_EXIT, /*!< The device joined and the gpsCommissioningExitMode attribute has "On First Pairing success" bit seted */
|
||||
ESP_ZB_ZGP_MODE_CHANGE_TIMEOUT, /*!< It is possible if timeout is set and expired "On CommissioningWindow expiration" bit is set Timeout parameter to
|
||||
user API gps_commissioning_start().*/
|
||||
} esp_zb_zgp_mode_change_reason_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP communication mode
|
||||
*/
|
||||
typedef enum esp_zb_zgp_communication_mode_e {
|
||||
ESP_ZB_ZGP_COMMUNICATION_MODE_FULL_UNICAST = 0, /*!< Full unicast */
|
||||
ESP_ZB_ZGP_COMMUNICATION_MODE_GROUPCAST_DERIVED, /*!< Groupcast derived */
|
||||
ESP_ZB_ZGP_COMMUNICATION_MODE_GROUPCAST_PRECOMMISSIONED, /*!< Groupcast percommissioned */
|
||||
ESP_ZB_ZGP_COMMUNICATION_MODE_LIGHTWEIGHT_UNICAST, /*!< Light weight unicate */
|
||||
} esp_zb_zgp_communication_mode_t;
|
||||
|
||||
|
||||
typedef enum esp_zgp_commissioning_exit_mode_e {
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_COMMISSIONING_WINDOW_EXPIRATION = (1<<0),
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_PAIRING_SUCCESS = (1<<1),
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_GP_PROXY_COMMISSIONING_MODE_EXIT = (1<<2),
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_CWE_OR_PS = (ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_COMMISSIONING_WINDOW_EXPIRATION |
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_PAIRING_SUCCESS),
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_CWE_OR_PCM = (ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_COMMISSIONING_WINDOW_EXPIRATION |
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_GP_PROXY_COMMISSIONING_MODE_EXIT),
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ALL = (ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_COMMISSIONING_WINDOW_EXPIRATION |
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_PAIRING_SUCCESS |
|
||||
ESP_ZGP_COMMISSIONING_EXIT_MODE_ON_GP_PROXY_COMMISSIONING_MODE_EXIT)
|
||||
} esp_zgp_commissioning_exit_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Current mode of ZGP endpoint
|
||||
*/
|
||||
typedef enum esp_zb_zgp_mode_e {
|
||||
ESP_ZB_ZGP_OPERATIONAL_MODE, /*!< Operational mode */
|
||||
ESP_ZB_ZGP_COMMISSIONING_MODE /*!< Commissioning mode */
|
||||
} esp_zb_zgp_mode_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP device application ID
|
||||
*/
|
||||
typedef enum esp_zb_zgp_app_id_e {
|
||||
ESP_ZB_ZGP_APP_ID_0000 = 0x00, /*!< ApplicationID value 0b000 - usage of the SrcID */
|
||||
ESP_ZB_ZGP_APP_ID_0001 = 0x01, /*!< ApplicationID value 0b001 - LPED */
|
||||
ESP_ZB_ZGP_APP_ID_0010 = 0x02, /*!< ApplicationID value 0b010 - usage of the GPD IEEE address.*/
|
||||
ESP_ZB_ZGP_APP_ID_INVALID = 0x07, /*!< Invalid ApplicationID */
|
||||
} esp_zb_zgp_app_id_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP table request entries type
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zgp_table_request_entries_type_e {
|
||||
ESP_ZGP_REQUEST_TABLE_ENTRIES_BY_GPD_ID, /*!< GPD ID type */
|
||||
ESP_ZGP_REQUEST_TABLE_ENTRIES_BY_INDEX /*!< Index type */
|
||||
} esp_zgp_table_request_entries_type_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP security level type
|
||||
*/
|
||||
typedef enum esp_zb_zgp_security_level_e {
|
||||
ESP_ZB_ZGP_SEC_LEVEL_NO_SECURITY = 0x00, /*!< No security */
|
||||
ESP_ZB_ZGP_SEC_LEVEL_REDUCED = 0x01, /*!< 1LSB of frame counter and short (2B) MIC */
|
||||
ESP_ZB_ZGP_SEC_LEVEL_FULL_NO_ENC = 0x02, /*!< Full (4B) frame counter and full (4B) MIC */
|
||||
ESP_ZB_ZGP_SEC_LEVEL_FULL_WITH_ENC = 0x03, /*!< Encryption & full (4B) frame counter and full (4B) MIC */
|
||||
} esp_zb_zgp_security_level_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP security key type
|
||||
*/
|
||||
typedef enum esp_zb_zgp_security_key_type_e {
|
||||
ESP_ZB_ZGP_SEC_KEY_TYPE_NO_KEY = 0x00, /*!< No key */
|
||||
ESP_ZB_ZGP_SEC_KEY_TYPE_NWK = 0x01, /*!< Zigbee NWK key */
|
||||
ESP_ZB_ZGP_SEC_KEY_TYPE_GROUP = 0x02, /*!< ZGPD group key */
|
||||
ESP_ZB_ZGP_SEC_KEY_TYPE_GROUP_NWK_DERIVED = 0x03, /*!< NWK-key derived ZGPD group key */
|
||||
ESP_ZB_ZGP_SEC_KEY_TYPE_ZGPD_INDIVIDUAL = 0x04, /*!< (Individual) out-of-the-box ZGPD key */
|
||||
ESP_ZB_ZGP_SEC_KEY_TYPE_DERIVED_INDIVIDUAL = 0x07, /*!< Derived individual ZGPD key */
|
||||
} esp_zb_zgp_security_key_type_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP gpsSecurityLevel attribute
|
||||
*/
|
||||
typedef enum esp_zb_zgp_security_level_protection_with_gp_link_key_e {
|
||||
ESP_ZB_ZGP_SEC_LEVEL_PROTECTION_WITHOUT_GP_LINK_KEY = 0x00, /*!< Do not used GP link key */
|
||||
ESP_ZB_ZGP_SEC_LEVEL_PROTECTION_WITH_GP_LINK_KEY = 0x01, /*!< Use GP link key */
|
||||
} esp_zb_zgp_security_level_protection_with_gp_link_key_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP gpsSecurityLevel attribute
|
||||
*/
|
||||
typedef enum esp_zb_zgp_security_level_involve_tc_e {
|
||||
ESP_ZB_ZGP_SEC_LEVEL_PROTECTION_DO_NOT_INVOLVE_TC = 0x00, /*!< Do not involve TC */
|
||||
ESP_ZB_ZGP_SEC_LEVEL_PROTECTION_INVOLVE_TC = 0x01, /*!< Involve TC */
|
||||
} esp_zb_zgp_security_level_involve_tc_t;
|
||||
|
||||
/**
|
||||
* @brief ZGPD commissioning method
|
||||
*/
|
||||
typedef enum esp_zb_zgpd_commissioning_method_e {
|
||||
ESP_ZB_ZGPD_COMMISSIONING_BIDIR, /*!< Bidirectional commissioning */
|
||||
ESP_ZB_ZGPD_COMMISSIONING_UNIDIR, /*!< Unidirectional commissioning */
|
||||
ESP_ZB_ZGPD_COMMISSIONING_AUTO /*!< Auto-commissioning */
|
||||
} esp_zb_zgpd_commissioning_method_t;
|
||||
|
||||
/**
|
||||
* @brief Possible ZGPD device identifiers
|
||||
*/
|
||||
typedef enum esp_zb_zgpd_dev_id_e {
|
||||
ESP_ZB_ZGP_SIMPLE_GEN_1_STATE_SWITCH_DEV_ID = 0x00, /*!< Simple Generic 1-state ZGP switch */
|
||||
ESP_ZB_ZGP_SIMPLE_GEN_2_STATE_SWITCH_DEV_ID = 0x01, /*!< Simple Generic 2-state ZGP switch */
|
||||
ESP_ZB_ZGP_ON_OFF_SWITCH_DEV_ID = 0x02, /*!< ZGP On/Off switch */
|
||||
ESP_ZB_ZGP_LEVEL_CONTROL_SWITCH_DEV_ID = 0x03, /*!< ZGP Level Control Switch */
|
||||
ESP_ZB_ZGP_SIMPLE_SENSOR_DEV_ID = 0x04, /*!< ZGP Simple Sensor */
|
||||
ESP_ZB_ZGP_ADVANCED_GEN_1_STATE_SWITCH_DEV_ID = 0x05, /*!< Advanced Generic 1-state ZGP switch */
|
||||
ESP_ZB_ZGP_ADVANCED_GEN_2_STATE_SWITCH_DEV_ID = 0x06, /*!< Advanced Generic 2-state ZGP switch */
|
||||
ESP_ZB_ZGP_GEN_8_CONT_SWITCH_DEV_ID = 0x07, /*!< Generic 8-contact ZGP switch */
|
||||
ESP_ZB_ZGP_COLOR_DIMMER_SWITCH_DEV_ID = 0x10, /*!< Color Dimmer ZGP Switch */
|
||||
ESP_ZB_ZGP_LIGHT_SENSOR_DEV_ID = 0x11, /*!< ZGP Light Sensor */
|
||||
ESP_ZB_ZGP_OCCUPANCY_SENSOR_DEV_ID = 0x12, /*!< ZGP Occupancy Sensor */
|
||||
ESP_ZB_ZGP_DOOR_LOCK_CONTROLLER_DEV_ID = 0x20, /*!< ZGP Door Lock Controller */
|
||||
ESP_ZB_ZGP_TEMPERATURE_SENSOR_DEV_ID = 0x30, /*!< ZGP temperature sensor */
|
||||
ESP_ZB_ZGP_PRESSURE_SENSOR_DEV_ID = 0x31, /*!< ZGP Pressure Sensor */
|
||||
ESP_ZB_ZGP_FLOW_SENSOR_DEV_ID = 0x32, /*!< ZGP Flow sensor */
|
||||
ESP_ZB_ZGP_ENVIRONMENT_SENSOR_DEV_ID = 0x33, /*!< ZGP Temperature + Humidity sensor */
|
||||
ESP_ZB_ZGP_MANUF_SPECIFIC_DEV_ID = 0xfe, /*!< Manufactures-specific; more fields in the Commissioning frame. See 4.1 */
|
||||
ESP_ZB_ZGP_UNDEFINED_DEV_ID = 0xff, /*!< Undefined device type */
|
||||
} esp_zb_zgpd_dev_id_t;
|
||||
|
||||
/**
|
||||
* @brief Green power proxy funtionality
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zgp_gpp_functionality_e {
|
||||
ESP_ZGP_GPP_GP_FEATURE = (1 << 0),
|
||||
ESP_ZGP_GPP_DIRECT_COMMUNICATION = (1 << 1),
|
||||
ESP_ZGP_GPP_DERIVED_GROUPCAST_COMMUNICATION = (1 << 2),
|
||||
ESP_ZGP_GPP_PRECOMMISSIONED_GROUPCAST_COMMUNICATION = (1 << 3),
|
||||
ESP_ZGP_GPP_FULL_UNICAST_COMMUNICATION = (1 << 4),
|
||||
ESP_ZGP_GPP_LIGHTWEIGHT_UNICAST_COMMUNICATION = (1 << 5),
|
||||
ESP_ZGP_GPP_RESERVED_B6 = (1 << 6),
|
||||
ESP_ZGP_GPP_BIDIRECTIONAL_OPERATION = (1 << 7),
|
||||
ESP_ZGP_GPP_PROXY_TABLE_MAINTENANCE = (1 << 8),
|
||||
ESP_ZGP_GPP_RESERVED_B9 = (1 << 9),
|
||||
ESP_ZGP_GPP_GP_COMMISSIONING = (1 << 10),
|
||||
ESP_ZGP_GPP_CT_BASED_COMMISSIONING = (1 << 11),
|
||||
ESP_ZGP_GPP_MAINTENANCE_OF_GPD = (1 << 12),
|
||||
ESP_ZGP_GPP_SEC_LEVEL_NO_SECURITY = (1 << 13),
|
||||
ESP_ZGP_GPP_SEC_LEVEL_REDUCED = (1 << 14),
|
||||
ESP_ZGP_GPP_SEC_LEVEL_FULL_NO_ENC = (1 << 15),
|
||||
ESP_ZGP_GPP_SEC_LEVEL_FULL_WITH_ENC = (1 << 16),
|
||||
ESP_ZGP_GPP_RESERVED_B17 = (1 << 17),
|
||||
ESP_ZGP_GPP_RESERVED_B18 = (1 << 18),
|
||||
ESP_ZGP_GPP_GPD_IEEE_ADDRESS = (1 << 19)
|
||||
} esp_zgp_gpp_functionality_t;
|
||||
|
||||
/**
|
||||
* @brief Green power sink funtionality
|
||||
*
|
||||
*/
|
||||
typedef enum esp_zgp_gps_functionality_e {
|
||||
ESP_ZGP_GPS_GP_FEATURE = (1 << 0),
|
||||
ESP_ZGP_GPS_DIRECT_COMMUNICATION = (1 << 1),
|
||||
ESP_ZGP_GPS_DERIVED_GROUPCAST_COMMUNICATION = (1 << 2),
|
||||
ESP_ZGP_GPS_PRECOMMISSIONED_GROUPCAST_COMMUNICATION = (1 << 3),
|
||||
ESP_ZGP_GPS_FULL_UNICAST_COMMUNICATION = (1 << 4),
|
||||
ESP_ZGP_GPS_LIGHTWEIGHT_UNICAST_COMMUNICATION = (1 << 5),
|
||||
ESP_ZGP_GPS_PROXIMITY_BIDIRECTIONAL_OPERATION = (1 << 6),
|
||||
ESP_ZGP_GPS_MULTIHOP_BIDIRECTIONAL_OPERATION = (1 << 7),
|
||||
ESP_ZGP_GPS_PROXY_TABLE_MAINTENANCE = (1 << 8),
|
||||
ESP_ZGP_GPS_PROXIMITY_COMMISSIONING = (1 << 9),
|
||||
ESP_ZGP_GPS_MULTIHOP_COMMISSIONING = (1 << 10),
|
||||
ESP_ZGP_GPS_CT_BASED_COMMISSIONING = (1 << 11),
|
||||
ESP_ZGP_GPS_MAINTENANCE_OF_GPD = (1 << 12),
|
||||
ESP_ZGP_GPS_SEC_LEVEL_NO_SECURITY = (1 << 13),
|
||||
ESP_ZGP_GPS_SEC_LEVEL_REDUCED = (1 << 14),
|
||||
ESP_ZGP_GPS_SEC_LEVEL_FULL_NO_ENC = (1 << 15),
|
||||
ESP_ZGP_GPS_SEC_LEVEL_FULL_WITH_ENC = (1 << 16),
|
||||
ESP_ZGP_GPS_SINK_TABLE_BASED_GROUPCAST_FORWARDING = (1 << 17),
|
||||
ESP_ZGP_GPS_TRANSLATION_TABLE = (1 << 18),
|
||||
ESP_ZGP_GPS_GPD_IEEE_ADDRESS = (1 << 19)
|
||||
} esp_zgp_gps_functionality_t;
|
||||
|
||||
|
||||
#define ESP_ZB_GPDF_CMD_STORE_SCENE0 ESP_ZB_GPDF_CMD_RECALL_SCENE8
|
||||
#define ESP_ZB_GPDF_CMD_STORE_SCENE1 ESP_ZB_GPDF_CMD_RECALL_SCENE9
|
||||
#define ESP_ZB_GPDF_CMD_STORE_SCENE2 ESP_ZB_GPDF_CMD_RECALL_SCENE10
|
||||
#define ESP_ZB_GPDF_CMD_STORE_SCENE3 ESP_ZB_GPDF_CMD_RECALL_SCENE11
|
||||
#define ESP_ZB_GPDF_CMD_LVL_CTRL_STOP ESP_ZB_GPDF_CMD_LC_STOP
|
||||
#define ESP_ZB_GPDF_CMD_MOVE_UP_WITH_ON_OFF ESP_ZB_GPDF_CMD_MOVE_UP_W_ONOFF
|
||||
#define ESP_ZB_GPDF_CMD_MOVE_DOWN_WITH_ON_OFF ESP_ZB_GPDF_CMD_MOVE_DOWN_W_ONOFF
|
||||
#define ESP_ZB_GPDF_CMD_MOVE_STEP_ON ESP_ZB_GPDF_CMD_STEP_UP_W_ONOFF
|
||||
#define ESP_ZB_GPDF_CMD_MOVE_STEP_OFF ESP_ZB_GPDF_CMD_STEP_DOWN_W_ONOFF
|
||||
|
||||
/**
|
||||
* @brief ZGP device Cluster List
|
||||
*/
|
||||
typedef struct esp_zb_zgp_cluster_list_s {
|
||||
uint8_t server_cl_num; /*!< Number of server ClusterIDs */
|
||||
uint8_t client_cl_num; /*!< Number of client ClusterIDs */
|
||||
uint16_t server_clusters[ZB_ZGP_MAX_PAIRED_CONF_CLUSTERS]; /*!< ClusterID List Server */
|
||||
uint16_t client_clusters[ZB_ZGP_MAX_PAIRED_CONF_CLUSTERS]; /*!< ClusterID List Client */
|
||||
} esp_zb_zgp_cluster_list_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP device address
|
||||
*
|
||||
* @note ZGPD is identified in network whether by SrcId or its IEEE address.
|
||||
*/
|
||||
typedef union esp_zb_zgpd_addr_u {
|
||||
uint32_t src_id; /*!< ZGPD source id */
|
||||
esp_zb_ieee_addr_t ieee_addr; /*!< ZGPD IEEE address */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zgpd_addr_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP device identifier
|
||||
*/
|
||||
typedef struct esp_zb_zgpd_id_s {
|
||||
uint8_t app_id; /*!< One of the esp_zb_zgp_app_id_t values */
|
||||
uint8_t endpoint; /*!< Identifier of the GPD endpoint, which jointly with the GPD IEEE address identifies a unique logical GPD device.*/
|
||||
esp_zb_zgpd_addr_t addr; /*!< ZGPD SrcId or IEEE address */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zgpd_id_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP device CommandID list
|
||||
*/
|
||||
typedef struct esp_zb_zgp_gpd_cmds_list_s {
|
||||
uint8_t num; /*!< Number of GP commands */
|
||||
uint8_t cmds[ZB_ZGP_MAX_PAIRED_CONF_GPD_COMMANDS]; /*!< GPD CommandID list */
|
||||
} esp_zb_zgp_gpd_cmds_list_t;
|
||||
|
||||
/**
|
||||
* @brief Mapping table entry structure for ZGP sink
|
||||
*/
|
||||
typedef struct esp_zb_zgps_mapping_entry_s {
|
||||
uint8_t options; /*!< Options related to this table entry */
|
||||
esp_zb_zgpd_addr_t gpd_id; /*!< Identifier of the GPD */
|
||||
uint8_t gpd_endpoint; /*!< Endpoint */
|
||||
uint8_t gpd_command; /*!< The GPD command to be mapped */
|
||||
uint8_t endpoint; /*!< The EndPoint for which the mapping is valid */
|
||||
uint16_t profile; /*!< The Profile of the command after mapping */
|
||||
uint16_t cluster; /*!< The cluster of the Profile on the endpoint */
|
||||
uint8_t zcl_command; /*!< The Command ID of the Cluster into which GP Command is mapped */
|
||||
uint8_t zcl_payload_length; /*!< The payload length for the Zigbee Command, payload should be located in memory after this structure */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zb_zgps_mapping_entry_t;
|
||||
|
||||
/**
|
||||
* @brief Raw report descriptor received from the GPD
|
||||
*/
|
||||
typedef struct esp_zb_zgp_raw_report_desc_s {
|
||||
uint8_t len; /*!< total len, in octets, of the current report descriptor. */
|
||||
uint8_t data[ZB_ZGP_APP_DESCR_REPORT_DATA_SIZE]; /*!< array of not parsed zgp_data_point_desc_t */
|
||||
} esp_zb_zgp_raw_report_desc_t;
|
||||
|
||||
/**
|
||||
* @brief The structure for the paired group List
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zgp_pair_group_list_s {
|
||||
uint16_t sink_group; /*!< Sink group */
|
||||
uint16_t alias; /*!< Alias for the group communication */
|
||||
} ESP_ZB_PACKED_STRUCT esp_zgp_pair_group_list_t;
|
||||
|
||||
/**
|
||||
* @brief The structure for Green Power table entry
|
||||
*
|
||||
*/
|
||||
typedef struct esp_zgp_tbl_ent_s {
|
||||
esp_zb_zgpd_addr_t zgpd_id; /*!< ID of the paired ZGPD */
|
||||
uint16_t options; /*!< The options for the reception from ZGPD */
|
||||
uint16_t zgpd_assigned_alias; /*!< The commissioned 16-bit ID to be used as alias for ZGPD */
|
||||
uint32_t security_counter; /*!< The incoming security frame counter for ZGPD */
|
||||
uint8_t zgpd_key[ESP_ZB_CCM_KEY_SIZE]; /*!< Security key for the GPD */
|
||||
uint8_t endpoint; /*!< Endpoint pair of IEEE:EP if App ID is 010. */
|
||||
uint8_t sec_options; /*!< Security options */
|
||||
uint8_t groupcast_radius; /*!< To limit the range of the groupcast */
|
||||
uint8_t is_sink; /*!< Sink or proxy */
|
||||
union {
|
||||
struct esp_zgp_proxy_tbl_ent_s {
|
||||
uint16_t ext_options; /*!< The tunneling options */
|
||||
struct esp_zgp_lwsink_addr_list_s {
|
||||
uint8_t addr_ref; /*!< Address reference */
|
||||
} lwsaddr[ZB_ZGP_MAX_LW_UNICAST_ADDR_PER_GPD]; /*!< Sink address list */
|
||||
esp_zgp_pair_group_list_t sgrp[ZB_ZGP_MAX_SINK_GROUP_PER_GPD]; /*!< Sink group list */
|
||||
} proxy; /*!< Proxy table */
|
||||
struct esp_zgp_sink_tbl_ent_s {
|
||||
uint8_t device_id; /*!< ZGPD Device ID from Commissioning frame, refer to esp_zb_zgpd_dev_id_t */
|
||||
esp_zgp_pair_group_list_t sgrp[ZB_ZGP_MAX_SINK_GROUP_PER_GPD]; /*!< Sink group list */
|
||||
uint8_t match_dev_tbl_idx; /*!< index in matching table matched by device_id or app_info.manuf_model_id */
|
||||
esp_zb_ieee_addr_t ieee_addr; /*!< Extension to the table, Dest IEEE address to use in GPT to GPD packets even if GPD is identified by SrcID */
|
||||
} sink; /*!< Sink table */
|
||||
} u; /*!< ZGP table */
|
||||
} esp_zgp_tbl_ent_t;
|
||||
|
||||
/**
|
||||
* @brief Sink table structure
|
||||
*
|
||||
*/
|
||||
typedef esp_zgp_tbl_ent_t esp_zb_zgp_sink_tbl_ent_t;
|
||||
|
||||
/**
|
||||
* @brief Proxy table structure
|
||||
*
|
||||
*/
|
||||
typedef esp_zgp_tbl_ent_t esp_zb_zgp_proxy_tbl_ent_t;
|
||||
|
||||
/**
|
||||
* @brief Set whether skip the Green power device frame
|
||||
*
|
||||
* @param[in] skip Skip or not
|
||||
*/
|
||||
void esp_zb_zgp_set_skip_gpdf(uint8_t skip);
|
||||
|
||||
/**
|
||||
* @brief Get the setting of skip the Green power device frame
|
||||
*
|
||||
* @return
|
||||
* - true: Skip
|
||||
* - false: Not skip
|
||||
*/
|
||||
uint8_t esp_zb_zgp_get_skip_gpdf(void);
|
||||
|
||||
/**
|
||||
* @brief Set shared security key type
|
||||
*
|
||||
* @param[in] type The type of security key
|
||||
*/
|
||||
void esp_zb_zgp_set_shared_security_key_type(esp_zb_zgp_security_key_type_t type);
|
||||
|
||||
/**
|
||||
* @brief Set shared security key
|
||||
*
|
||||
* @param[in] key The 16-byte pointer will be set as the shared security keyof green power
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_zb_zgp_set_shared_security_key(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set shared security key
|
||||
*
|
||||
* @param[in] key The 16-byte pointer will be set as the link key of green power
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_zb_zgp_set_link_key(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set the ZGP proxy functionality
|
||||
*
|
||||
* @param functionality Functionality, refer to esp_zgp_gpp_functionality_t
|
||||
* @param active_functionality Active functionality indicates which bits of functionality are active.
|
||||
*/
|
||||
void esp_zb_zgp_set_proxy_functionality(uint32_t functionality, uint32_t active_functionality);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,230 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdio.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief ZGP device application signal
|
||||
*/
|
||||
typedef enum esp_zb_zgpd_signal_e {
|
||||
ESP_ZB_ZGPD_SIGNAL_DEVICE_STARTED_UP, /*!< During the startup process */
|
||||
ESP_ZB_ZGPD_SIGNAL_COMMISSIONING, /*!< During the commissioning process */
|
||||
} esp_zb_zgpd_signal_t;
|
||||
|
||||
/**
|
||||
* @brief Supported command identifier for ZGP device
|
||||
*
|
||||
* @note 1. The recall scene 8-11 are got from LCGW. But GPPB specification does not define recall scenes 8-11. Only 8 scenes are supported.
|
||||
* 2. 0x39 - 0x3F, 0x4C - 0x4F, 0x4C - 0x4F, 0x52 - 0x5F, 0x6b-0x6f, 0x70-0x9f, 0xA7 0xA9 - 0xAE, 0xC0 - 0xDF, 0xE5 - 0xEF Reserved
|
||||
* 3. Manufacturer-defined GPD commands (payload is manufacturer-specific)
|
||||
* 4. 0xB1 - 0xBE: Manufacturer-defined GPD commands (payload is manufacturer-specific)
|
||||
* 5. 0xF4 - 0xF5: Reserved for other commands sent to the GPD
|
||||
* 6. 0xF7 - 0xFF: Reserved for other commands sent to the GPD
|
||||
*/
|
||||
typedef enum esp_zb_zgpd_cmd_id_e {
|
||||
ESP_ZB_GPDF_CMD_IDENTIFY = 0x00, /*!< Identify */
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE0 = 0x10, /*!< Recall scene */
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE1 = 0x11,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE2 = 0x12,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE3 = 0x13,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE4 = 0x14,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE5 = 0x15,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE6 = 0x16,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE7 = 0x17,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE8 = 0x18,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE9 = 0x19,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE10 = 0x1A,
|
||||
ESP_ZB_GPDF_CMD_RECALL_SCENE11 = 0x1B,
|
||||
ESP_ZB_GPDF_CMD_STORE_SCENE4 = 0x1C, /*!< Store Scene */
|
||||
ESP_ZB_GPDF_CMD_STORE_SCENE5 = 0x1D,
|
||||
ESP_ZB_GPDF_CMD_STORE_SCENE6 = 0x1E,
|
||||
ESP_ZB_GPDF_CMD_STORE_SCENE7 = 0x1F,
|
||||
ESP_ZB_GPDF_CMD_OFF = 0x20, /*!< On/Off */
|
||||
ESP_ZB_GPDF_CMD_ON = 0x21,
|
||||
ESP_ZB_GPDF_CMD_TOGGLE = 0x22,
|
||||
ESP_ZB_GPDF_CMD_RELEASE = 0x23,
|
||||
ESP_ZB_GPDF_CMD_MOVE_UP = 0x30, /* Level control */
|
||||
ESP_ZB_GPDF_CMD_MOVE_DOWN = 0x31,
|
||||
ESP_ZB_GPDF_CMD_STEP_UP = 0x32,
|
||||
ESP_ZB_GPDF_CMD_STEP_DOWN = 0x33,
|
||||
ESP_ZB_GPDF_CMD_LC_STOP = 0x34,
|
||||
ESP_ZB_GPDF_CMD_MOVE_UP_W_ONOFF = 0x35,
|
||||
ESP_ZB_GPDF_CMD_MOVE_DOWN_W_ONOFF = 0x36,
|
||||
ESP_ZB_GPDF_CMD_STEP_UP_W_ONOFF = 0x37,
|
||||
ESP_ZB_GPDF_CMD_STEP_DOWN_W_ONOFF = 0x38,
|
||||
ESP_ZB_GPDF_CMD_MOVE_HUE_STOP = 0x40, /* Color Control */
|
||||
ESP_ZB_GPDF_CMD_MOVE_HUE_UP = 0x41,
|
||||
ESP_ZB_GPDF_CMD_MOVE_HUE_DOWN = 0x42,
|
||||
ESP_ZB_GPDF_CMD_STEP_HUE_UP = 0x43,
|
||||
ESP_ZB_GPDF_CMD_STEP_HUE_DOWN = 0x44,
|
||||
ESP_ZB_GPDF_CMD_MOVE_SATURATION_STOP = 0x45,
|
||||
ESP_ZB_GPDF_CMD_MOVE_SATURATION_UP = 0x46,
|
||||
ESP_ZB_GPDF_CMD_MOVE_SATURATION_DOWN = 0x47,
|
||||
ESP_ZB_GPDF_CMD_STEP_SATURATION_UP = 0x48,
|
||||
ESP_ZB_GPDF_CMD_STEP_SATURATION_DOWN = 0x49,
|
||||
ESP_ZB_GPDF_CMD_MOVE_COLOR = 0x4A,
|
||||
ESP_ZB_GPDF_CMD_STEP_COLOR = 0x4B,
|
||||
ESP_ZB_GPDF_CMD_LOCK_DOOR = 0x50, /* Door Lock */
|
||||
ESP_ZB_GPDF_CMD_UNLOCK_DOOR = 0x51,
|
||||
ESP_ZB_GPDF_CMD_PRESS_1_OF_1 = 0x60, /* Simple Generic Switch */
|
||||
ESP_ZB_GPDF_CMD_RELEASE_1_OF_1 = 0x61,
|
||||
ESP_ZB_GPDF_CMD_PRESS_1_OF_2 = 0x62,
|
||||
ESP_ZB_GPDF_CMD_RELEASE_1_OF_2 = 0x63,
|
||||
ESP_ZB_GPDF_CMD_PRESS_2_OF_2 = 0x64,
|
||||
ESP_ZB_GPDF_CMD_RELEASE_2_OF_2 = 0x65,
|
||||
ESP_ZB_GPDF_CMD_SHORT_PRESS_1_OF_1 = 0x66,
|
||||
ESP_ZB_GPDF_CMD_SHORT_PRESS_1_OF_2 = 0x67,
|
||||
ESP_ZB_GPDF_CMD_SHORT_PRESS_2_OF_2 = 0x68,
|
||||
ESP_ZB_GPDF_CMD_8BIT_VECTOR_PRESS = 0x69,
|
||||
ESP_ZB_GPDF_CMD_8BIT_VECTOR_RELEASE = 0x6A,
|
||||
ESP_ZB_GPDF_CMD_ATTR_REPORT = 0xA0,
|
||||
ESP_ZB_GPDF_CMD_MANUF_SPEC_ATTR_REPORT = 0xA1,
|
||||
ESP_ZB_GPDF_CMD_MULTI_CLUSTER_ATTR_REPORT = 0xA2,
|
||||
ESP_ZB_GPDF_CMD_MANUF_SPEC_MULTI_CLUSTER_ATTR_REPORT = 0xA3,
|
||||
ESP_ZB_GPDF_CMD_REQUEST_ATTRIBUTES = 0xA4,
|
||||
ESP_ZB_GPDF_CMD_READ_ATTR_RESP = 0xA5,
|
||||
ESP_ZB_GPDF_CMD_ZCL_TUNNELING_FROM_ZGPD = 0xA6,
|
||||
ESP_ZB_GPDF_CMD_COMPACT_ATTR_REPORTING = 0xA8,
|
||||
ESP_ZB_GPDF_CMD_ATTR_REPORT_ANY = 0xAF,
|
||||
ESP_ZB_GPDF_CMD_MANUF_DEFINED_B0 = 0xB0,
|
||||
ESP_ZB_GPDF_CMD_MANUF_DEFINED_BF = 0xBF,
|
||||
ESP_ZB_GPDF_CMD_COMMISSIONING = 0xE0, /* commissioning from ZGPD */
|
||||
ESP_ZB_GPDF_CMD_DECOMMISSIONING = 0xE1,
|
||||
ESP_ZB_GPDF_CMD_SUCCESS = 0xE2,
|
||||
ESP_ZB_GPDF_CMD_CHANNEL_REQUEST = 0xE3,
|
||||
ESP_ZB_GPDF_CMD_APPLICATION_DESCR = 0xE4,
|
||||
ESP_ZB_GPDF_CMD_COMMISSIONING_REPLY = 0xF0, /* GPDF commands sent to GPD */
|
||||
ESP_ZB_GPDF_CMD_WRITE_ATTRIBUTES = 0xF1,
|
||||
ESP_ZB_GPDF_CMD_READ_ATTRIBUTES = 0xF2,
|
||||
ESP_ZB_GPDF_CMD_CHANNEL_CONFIGURATION = 0xF3,
|
||||
ESP_ZB_GPDF_CMD_ZCL_TUNNELING_TO_ZGPD = 0xF6,
|
||||
} esp_zb_zgpd_cmd_id_t;
|
||||
|
||||
/**
|
||||
* @brief ZGP device commissioning signal callback
|
||||
*/
|
||||
typedef void (* esp_zb_zgpd_commissioning_signal_callback_t)(esp_zb_zgpd_signal_t, esp_err_t);
|
||||
|
||||
/**
|
||||
* @brief ZGP device stack initialization
|
||||
*
|
||||
* @param cb A callback for indicating the commissioning process for ZGP device
|
||||
*/
|
||||
void esp_zb_zgpd_stack_init(esp_zb_zgpd_commissioning_signal_callback_t cb);
|
||||
|
||||
/**
|
||||
* @brief ZGP device commissioning information initialization
|
||||
*
|
||||
* @param[in] zgp_app_id App identifier, refer to esp_zb_zgp_app_id_t
|
||||
* @param[in] zgpd_commissioning_method Commissioning method, refer to esp_zb_zgpd_commissioning_method_t
|
||||
* @param[in] zgpd_device_id Device identifier, refer to esp_zb_zgpd_dev_id_t
|
||||
*/
|
||||
void esp_zb_zgpd_init(uint8_t zgp_app_id, uint8_t zgpd_commissioning_method, uint8_t zgpd_device_id);
|
||||
|
||||
/**
|
||||
* @brief ZGP device start
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_FAIL: on failed
|
||||
*/
|
||||
esp_err_t esp_zb_zgpd_dev_start(void);
|
||||
|
||||
/**
|
||||
* @brief ZGP device main loop
|
||||
*
|
||||
*/
|
||||
void esp_zb_zgpd_main_loop(void);
|
||||
|
||||
/**
|
||||
* @brief ZGP device start commissioning
|
||||
*
|
||||
*/
|
||||
void esp_zb_zgpd_start_commissioning(void);
|
||||
|
||||
/**
|
||||
* @brief Set the source identifier for ZGP device
|
||||
*
|
||||
* @param src_id A 32-bit source identifier
|
||||
*/
|
||||
void esp_zb_zgpd_set_source_id(uint32_t src_id);
|
||||
|
||||
/**
|
||||
* @brief Set the security information for ZGP device
|
||||
*
|
||||
* @param[in] level Security level
|
||||
* @param[in] type Security type
|
||||
* @param[in] key Security key
|
||||
*/
|
||||
void esp_zb_zgpd_set_security(uint8_t level, uint8_t type, uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set the security out-of-the-box key for ZGP device
|
||||
*
|
||||
* @param[in] key The OOB key
|
||||
*/
|
||||
void esp_zb_zgpd_set_OOB_key(uint8_t *key);
|
||||
|
||||
/**
|
||||
* @brief Set the channel for ZGP device
|
||||
*
|
||||
* @param[in] channel The channel will be set for device
|
||||
*/
|
||||
void esp_zb_zgpd_set_channel(uint8_t channel);
|
||||
|
||||
/**
|
||||
* @brief Set the security level for ZGP device
|
||||
*
|
||||
* @param[in] level Security level
|
||||
*/
|
||||
void esp_zb_zgpd_set_security_level(uint8_t level);
|
||||
|
||||
/**
|
||||
* @brief Set the type key of security for ZGP device
|
||||
*
|
||||
* @param[in] type Security type
|
||||
*/
|
||||
void esp_zb_zgpd_set_security_key_type(uint8_t type);
|
||||
|
||||
/**
|
||||
* @brief Set the frame counter for ZGP device security
|
||||
*
|
||||
* @param[in] counter The value of frame counter
|
||||
*/
|
||||
void esp_zb_zgpd_set_security_frame_counter(uint16_t counter);
|
||||
|
||||
/**
|
||||
* @brief Present the application information setting
|
||||
*
|
||||
* @param[in] presented The flag indicates whether to present the application information.
|
||||
*/
|
||||
void esp_zb_zgpd_set_application_info_present(uint8_t presented);
|
||||
|
||||
/**
|
||||
* @brief ZGP device application information presented command setting
|
||||
*
|
||||
* @param[in] presented Whether present the application information of ZGP device
|
||||
* @param[in] cmd The application information command, note that the first byte indicates the length of command.
|
||||
*/
|
||||
void esp_zb_zgpd_config_application_info_cmd(uint8_t presented, uint8_t* cmd);
|
||||
|
||||
/**
|
||||
* @brief ZGP device send command
|
||||
*
|
||||
* @param[in] cmd_id The command identifier will be sent by the ZGP device
|
||||
*/
|
||||
void esp_zb_zgpd_send_command(esp_zb_zgpd_cmd_id_t cmd_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_zigbee_type.h"
|
||||
#include "zgp/esp_zigbee_zgp.h"
|
||||
#include "zb_config.h"
|
||||
#include "zb_config_common.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set the security level for ZGP sink
|
||||
*
|
||||
* @param[in] level Security level
|
||||
*/
|
||||
void esp_zb_zgps_set_security_level(uint8_t level);
|
||||
|
||||
/**
|
||||
* @brief Set the mapping table for ZGP sink
|
||||
*
|
||||
* @param[in] table The pointer of mapping entry of table, refer to esp_zb_zgps_mapping_entry_t
|
||||
* @param[in] table_size The pointer of table size
|
||||
*/
|
||||
void esp_zb_zgps_set_mapping_table(const esp_zb_zgps_mapping_entry_t **table, uint16_t *table_size);
|
||||
|
||||
/**
|
||||
* @brief Set the communication mode for ZGP sink
|
||||
*
|
||||
* @param[in] mode The commission mode, refer to esp_zb_zgp_communication_mode_t
|
||||
*/
|
||||
void esp_zb_zgps_set_communication_mode(esp_zb_zgp_communication_mode_t mode);
|
||||
|
||||
/**
|
||||
* @brief Set the ZGP sink commissioning exit mode
|
||||
*
|
||||
* @param[in] mode The exit mode, refer to esp_zgp_commissioning_exit_mode_t
|
||||
*/
|
||||
void esp_zb_zgps_set_commissioning_exit_mode(esp_zgp_commissioning_exit_mode_t mode);
|
||||
|
||||
/**
|
||||
* @brief Set the ZGP sink commissioning window timeout
|
||||
*
|
||||
* @param[in] timeout The timeout of commissioning window
|
||||
*/
|
||||
void esp_zb_zgps_set_commissioning_window(uint16_t timeout);
|
||||
|
||||
/**
|
||||
* @brief Set the ZGP sink functionality
|
||||
*
|
||||
* @param[in] functionality Functionality, refer to esp_zgp_gps_functionality_t
|
||||
* @param[in] active_functionality Active functionality indicates which bits of functionality are active.
|
||||
*/
|
||||
void esp_zb_zgps_set_functionality(uint32_t functionality, uint32_t active_functionality);
|
||||
|
||||
/**
|
||||
* @brief Start the commissioning for ZGP sink on endpoint
|
||||
*
|
||||
* @param[in] endpoint The endpoint identifier for ZGP sink commissioning
|
||||
* @param[in] timeout The timeout for commissioning
|
||||
*/
|
||||
void esp_zb_zgps_start_commissioning_on_endpoint(uint8_t endpoint, uint32_t timeout);
|
||||
|
||||
/**
|
||||
* @brief Stop commissioning for ZGP sink
|
||||
*
|
||||
*/
|
||||
void esp_zb_zgps_stop_commissioning();
|
||||
|
||||
/**
|
||||
* @brief Accept commissioning setting
|
||||
*
|
||||
* @param[in] accepted Whether accept the commissioning
|
||||
*/
|
||||
void esp_zb_zgps_accept_commissioning(bool accepted);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user