I'm playing around a little with ESP32-C6 and the zigbee part.
Right now I'm just using the HA_ON_OFF_LIGHT example
https://github.com/espressif/esp-zigbee ... _off_light
Get it to join and pair with my zigbee network at home and in zigbee2mqtt it identifies as:
[...] "with Zigbee model 'undefined' and manufacturer name 'undefined' "
To further integrate the device into zigbee2mqtt it has to be identified through these above fields (Zigbee model and manufacturer name) so I want to add as mentioned here:
https://github.com/espressif/esp-idf/is ... 1424903170
Code: Select all
char modelid[] = {13, 'E', 'S', 'P', '3', '2', 'C', '6', '.', 'L', 'i', 'g', 'h', 't'};
char manufname[] = {9, 'E', 's', 'p', 'r', 'e', 's', 's', 'i', 'f'};
Code: Select all
esp_zb_basic_cluster_add_attr(esp_zb_basic_cluster, ESP_ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID, &modelid[0]);
esp_zb_basic_cluster_add_attr(esp_zb_basic_cluster, ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID, &manufname[0]);
My esp_zb_task I try to modify is:
Code: Select all
static void esp_zb_task(void *pvParameters)
{
/* initialize Zigbee stack with Zigbee end-device config */
esp_zb_cfg_t zb_nwk_cfg = ESP_ZB_ZED_CONFIG();
esp_zb_init(&zb_nwk_cfg);
/* set the on-off light device config */
esp_zb_on_off_light_cfg_t light_cfg = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG();
esp_zb_ep_list_t *esp_zb_on_off_light_ep = esp_zb_on_off_light_ep_create(HA_ESP_LIGHT_ENDPOINT, &light_cfg);
esp_zb_device_register(esp_zb_on_off_light_ep);
esp_zb_device_add_set_attr_value_cb(attr_cb);
esp_zb_set_primary_network_channel_set(0x07FFF800); // Channel 11 to 26
ESP_ERROR_CHECK(esp_zb_start(false));
esp_zb_main_loop_iteration();
}