-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set custom attribute value on custom cluster (TZ-1451) #529
Comments
In esp_zigbee_attribute.h |
Thank you again for your answer ! So |
don't forget about
and try to erase flash |
Thank you for your code sample ! Yes, this is what I tried when you suggested switching to manufacturer: #define ESP_ZB_ZCL_CLUSTER_ID_VOC_MEASUREMENT 0x042EU
#define ESP_ZB_ZCL_ATTR_VOC_MEASUREMENT_MEASURED_VALUE_ID 0x0000
#define ESP_ZB_ZCL_MANUFACTURER_CODE_SENSIRION 0x1234
float_t zero_value = 0.0;
esp_zb_attribute_list_t *voc_cluster = esp_zb_zcl_attr_list_create(ESP_ZB_ZCL_CLUSTER_ID_VOC_MEASUREMENT);
esp_zb_cluster_add_manufacturer_attr(
voc_cluster,
ESP_ZB_ZCL_CLUSTER_ID_VOC_MEASUREMENT,
ESP_ZB_ZCL_ATTR_VOC_MEASUREMENT_MEASURED_VALUE_ID,
ESP_ZB_ZCL_MANUFACTURER_CODE_SENSIRION,
ESP_ZB_ZCL_ATTR_TYPE_SINGLE,
ESP_ZB_ZCL_ATTR_ACCESS_READ_WRITE | ESP_ZB_ZCL_ATTR_MANUF_SPEC,
&zero_value
);
esp_zb_cluster_list_add_custom_cluster(cluster_list, voc_cluster, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE);
float_t voc_value = 0;
esp_zb_zcl_set_manufacturer_attribute_val(
HA_ESP_SENSOR_ENDPOINT,
ESP_ZB_ZCL_CLUSTER_ID_VOC_MEASUREMENT,
ESP_ZB_ZCL_CLUSTER_SERVER_ROLE,
ESP_ZB_ZCL_MANUFACTURER_CODE_SENSIRION,
ESP_ZB_ZCL_ATTR_VOC_MEASUREMENT_MEASURED_VALUE_ID,
&voc_value,
false
); But still same error. And if I try to set the cluster reporting esp_zb_zcl_reporting_info_t reporting_info = {
.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_SRV,
.ep = endpoint,
.cluster_id = cluster_id,
.cluster_role = ESP_ZB_ZCL_CLUSTER_SERVER_ROLE,
.dst.profile_id = ESP_ZB_AF_HA_PROFILE_ID,
.u.send_info.min_interval = 1,
.u.send_info.max_interval = 0,
.u.send_info.def_min_interval = 1,
.u.send_info.def_max_interval = 0,
.u.send_info.delta.u16 = 10,
.attr_id = attr_id,
.manuf_code = manuf_code,
};
esp_zb_zcl_update_reporting_info(&reporting_info); I'm getting a |
Hi @RobinFrcd ,
The standard cluster ID cannot be created as a custom cluster. Could you please share your purpose or specific use case? This will help us explore alternative ways to address your issue effectively. |
I'm reading all data coming from https://sensirion.com/products/catalog/SEN66. I then want to expose this data to Zigbee2MQTT. Thanks ! |
Understood. However, I am concerned that your requirement may not be implementable with the current SDK, as standard clusters can only be added using the standard APIs provided by the SDK. Therefore, I recommend issuing a ticket, similar to (#478), to request the related feature. |
Alright, understood. I'll work with So, to be clear, the solution was indeed just to switch to |
Question
Hi,
I'm trying to create a simple custom cluster and then set a custom attribute value.
The creation of the cluster works fine with:
But as soon as I try to update a value with
It crashes with this stack:
So I'm not sure if it's a bug or if I'm not using these functions correctly. The stack trace is not helpful as we don't know which assertion is failing. I couldn't find any example/documentation on this topic (only cluster creation is available).
I'm using
ESP-IDF v5.5-dev-1050-gb5ac4fbdf9-dirty
.Already tried clearing the ESP32 with
esptool.py -p /dev/ttyACM0 erase_flash
.Thanks
Additional context.
No response
The text was updated successfully, but these errors were encountered: