====== Länkar ======
==== Specifikationer och dokument ====
M och O förekommer ofta, det står för Mandatory respektive Optional.
Permitted transmissions i ZLO kan ha UGB, Unicast, Groupcast eller Broadcast, som säger vilka som får addresseras.
* [[https://csa-iot.org/developer-resource/specifications-download-request/|CSA Specifications]] -- Connectivity Standards Alliance download page
* [[https://csa-iot.org/wp-content/uploads/2024/07/docs-05-3474-23-csg-zigbee-specificationR23.1.pdf|05-3474-23 Zigbee R23 1.1 Specification]]
* [[https://csa-iot.org/wp-content/uploads/2022/01/07-5123-08-Zigbee-Cluster-Library-1.pdf|075123 ZCL Spec Rev8]] -- Zigbee Cluster Library
* [[https://csa-iot.org/wp-content/uploads/2022/01/docs-15-0014-05-0plo-LightingOccupancyDevice-Specification-V1.0-1.pdf|15-0014-05 ZLO Specification 1.0]] -- Zigbee Lightning & Occupancy Devices
* [[https://csa-iot.org/wp-content/uploads/2022/01/docs-13-0402-13-00zi-Base-Device-Behavior-Specification.pdf|13-0402-13 Base Device Behaviour Specification 1.0]]
* [[https://csa-iot.org/wp-content/uploads/2022/12/16-02828-012-PRO-BDB-v3.0.1-Specification.pdf|16-02828-012 Zigbee PRO Base Device Behavior Specification, v3.0.1]]
* [[https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/wireless-connectivity/698/1/075367r03ZB_AFG-Home_Automation_Profile_for_Public_Download.pdf|05-3520-29 ZHA Specification]] -- Zigbee Home Automation (Maybe redacted?)
* [[https://csa-iot.org/wp-content/uploads/2023/12/ZigBee-Cluster-Library-OTA-Cluster-0x0019-Test-Specification-Version-0.9.pdf|16-02824-007 Zigbee Cluster Library OTA Cluster (0x0019) Test Specification Version 0.9]]
* [[https://csa-iot.org/wp-content/uploads/2022/12/20-27688-037-zigbee_direct_spec.pdf|20-27688-037 Zigbee Direct 1.0]]
* [[https://www.nxp.com/docs/en/user-guide/JN-UG-3115.pdf]] -- Good list of possible attributes
==== Andra länkar ====
* [[https://github.com/mdeweerd/zha-toolkit|ZHA Toolkit]] -- Home Assistant plugin med myyycket matnyttig info i sin Readme.md
* [[https://dev.ti.com/tirex/explore/node?node=A__AfQHvIpphydZzeMquAz5XA__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST|TI Guide]]
* [[https://community.home-assistant.io/t/zha-help-please-how-to-use-a-zigbee-button-in-an-automation/661257/3|ZHA Help, please. How to use a Zigbee button in an automation]] -- Hur man kan göra automationer på events som inte dyker upp i GUI:t
* [[https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/ikea/fourbtnremote.py|ZHA Quirk for Ikea 4 button]]
* [[https://community.home-assistant.io/t/switch-manager-new-refined-switch-integration-to-manage-your-switches/497649|Switch Manager]] -- Ett smidigt sätt att hantera strömbrytare i HomeAssistant
* [[https://community.home-assistant.io/t/why-and-how-to-avoid-device-ids-in-automations-and-scripts/605517|Why and how to avoid device ids in automations]] -- Someone who advocates for using entities instead of device ids
==== ESP specifika saker ====
* [[https://github.com/espressif/esp-zigbee-sdk/issues/125|How to add a manufacturer specific attribute to a Standard cluster (TZ-350)]]
* [[https://github.com/espressif/esp-zigbee-sdk/issues/94|Handling not all responses (TZ-260)]]
* [[https://github.com/prairiesnpr/esp_zha_test_bench/blob/master/main/main.c]] -- Seems to add multiple things to his project
* [[https://github.com/espressif/esp-idf/blob/master/examples/zigbee/common/zcl_utility/src/zcl_utility.c|zcl_utility.c]] -- Exempel på hur man lägger till manufacturer och model identifier
* [[https://esp32.com/viewtopic.php?t=36365]] -- Example of something
* [[https://github.com/espressif/arduino-esp32/tree/master/libraries/Zigbee/src|ESP Arduino Core Zigbee]] -- Good place to look for how to use some IDF-functions
====== 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