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.
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
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