[zigbee] set model identifier and manufacturer name

rubbah
Posts: 1
Joined: Thu Apr 13, 2023 10:50 am

[zigbee] set model identifier and manufacturer name

Postby rubbah » Thu Apr 13, 2023 11:18 am

Hi,

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]);
A problem here is that I don't know how to get the pointer to the existing attribute list predefined for the endpoint. Which is needed as the first parameter input named esp_zb_basic_cluster above.
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();
}
Does anyone know if it is possible to add manufacturer name and model id to the predefined HA endpoints?

mortenmoulder
Posts: 1
Joined: Fri Jun 09, 2023 12:28 pm

Re: [zigbee] set model identifier and manufacturer name

Postby mortenmoulder » Fri Jun 09, 2023 12:29 pm

Did you find a solution to setting manufacturer and model?

jacobj
Posts: 1
Joined: Tue Jun 13, 2023 6:25 pm

Re: [zigbee] set model identifier and manufacturer name

Postby jacobj » Tue Jun 13, 2023 6:32 pm

You can find the entire code in the link https://github.com/espressif/esp-idf/is ... 1425082051

It works for me.

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 97 guests