zigbee
This is an old revision of the document!
Table of Contents
- https://esp32.com/viewtopic.php?t=36365 – Example of something
- https://www.nxp.com/docs/en/user-guide/JN-UG-3115.pdf – Good list of possible attributes
- ZCL Spec Rev8 – Zigbee Cluster Library
- ZLO Specification – Zigbee Lightning Devices
- ZHA Specification – Zigbee Home Automation
- CSA Specifications – Connectivity Standards Alliance download page
- https://github.com/prairiesnpr/esp_zha_test_bench/blob/master/main/main.c – Seems to add multiple things to his project
Working examples
Adding multiple default configured endpoints (post esp-zigbee-sdk 1.2.0)
This adds two endpoints to the device. The can't be configured any further to my knowledge, but will just have default configured clusters with no possibility of configuration.
// Prepare cluster lists, in plural. esp_zb_on_off_light_cfg_t light_config = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG(); esp_zb_cluster_list_t *light_cluster_list = esp_zb_on_off_light_clusters_create(&light_config); // This creates several clusters esp_zb_endpoint_config_t light_ep_config = { .endpoint = 2, .app_device_id = ESP_ZB_HA_ON_OFF_SWITCH_DEVICE_ID, .app_profile_id = ESP_ZB_AF_HA_PROFILE_ID, .app_device_version = 1}; esp_zb_on_off_light_cfg_t light_config2 = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG(); esp_zb_cluster_list_t *light_cluster_list2 = esp_zb_on_off_light_clusters_create(&light_config2); // This creates several clusters esp_zb_endpoint_config_t light2_ep_config = { .endpoint = 3, .app_device_id = ESP_ZB_HA_ON_OFF_SWITCH_DEVICE_ID, .app_profile_id = ESP_ZB_AF_HA_PROFILE_ID, .app_device_version = 1}; esp_zb_ep_list_t *endpoint_list = esp_zb_ep_list_create(); esp_zb_ep_list_add_ep(endpoint_list, light_cluster_list, light_ep_config); // This adds the first bunch of clusters as an endpoint esp_zb_ep_list_add_ep(endpoint_list, light_cluster_list2, light2_ep_config); // This adds the second bunch of clusters as an endpoint esp_zb_device_register(endpoint_list); // This registers all created endpoints to the stack
Adding multiple default configured endpoints (pre esp-zigbee-sdk 1.2.0)
This adds two endpoints to the device. The can't be configured any further to my knowledge, but will just have default configured clusters with no possibility of configuration.
// Prepare cluster lists, in plural. esp_zb_on_off_light_cfg_t light_config = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG(); esp_zb_cluster_list_t *light_cluster_list = esp_zb_on_off_light_clusters_create(&light_config); // This creates several clusters esp_zb_on_off_light_cfg_t light_config2 = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG(); esp_zb_cluster_list_t *light_cluster_list2 = esp_zb_on_off_light_clusters_create(&light_config2); // This creates several clusters esp_zb_ep_list_t *endpoint_list = esp_zb_ep_list_create(); esp_zb_ep_list_add_ep(endpoint_list, light_cluster_list, 2, ESP_ZB_AF_HA_PROFILE_ID, ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID); // This adds the first bunch of clusters as an endpoint esp_zb_ep_list_add_ep(endpoint_list, light_cluster_list2, 15, ESP_ZB_AF_HA_PROFILE_ID, ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID); // This adds the second bunch of clusters as an endpoint esp_zb_device_register(endpoint_list); // This registers all created endpoints to the stack
zigbee.1734471583.txt.gz · Last modified: 2024/12/17 21:39 by utedass
