Skip to content
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

Zigbee library - ZigbeeHandlers enhancement (IAS Zone Notification message) #10794

Open
1 task done
lsroka76 opened this issue Dec 31, 2024 · 0 comments
Open
1 task done
Assignees
Labels
Area: Zigbee Issues and Feature Request about Zigbee Type: Feature request Feature request for Arduino ESP32

Comments

@lsroka76
Copy link

lsroka76 commented Dec 31, 2024

Related area

Arduino Zigbee library

Hardware specification

ESP32 C6/H2

Is your feature request related to a problem?

Current implementation of ZigbeeHandlers doesn't handle properly IAS Zone Change Notification Message

Describe the solution you'd like

add to Zigbee Handlers:
// forward declaration of all implemented handlers
(...)
static esp_err_t zb_cmd_ias_zone_status_change_handler(const esp_zb_zcl_ias_zone_status_change_notification_message_t *message);
(....)

log_i("Receive Zigbee action(0x%x) callback", callback_id);
switch (callback_id) {
(...)
case ESP_ZB_CORE_CMD_IAS_ZONE_ZONE_STATUS_CHANGE_NOT_ID: ret = zb_cmd_ias_zone_status_change_handler((esp_zb_zcl_ias_zone_status_change_notification_message_t *)message); break;

(...)
static esp_err_t zb_cmd_ias_zone_status_change_handler(const esp_zb_zcl_ias_zone_status_change_notification_message_t *message) {
if (!message) {
log_e("Empty message");
}
if (message->info.status != ESP_ZB_ZCL_STATUS_SUCCESS) {
log_e("Received message: error status(%d)", message->info.status);
}
log_v(
"IAS Zone Status Notification: from address(0x%x) src endpoint(%d) to dst endpoint(%d) cluster(0x%x)", message->info.src_address.u.short_addr,
message->info.src_endpoint, message->info.dst_endpoint, message->info.cluster
);

for (std::list<ZigbeeEP *>::iterator it = Zigbee.ep_objects.begin(); it != Zigbee.ep_objects.end(); ++it) {
if (message->info.dst_endpoint == (*it)->getEndpoint()) {
log_v(
"IAS Zone Status Notification: status(%d), cluster(0x%x) ", message->zone_status, message->info.cluster);
log_v("calling (*it)->zbIASZoneStatusChangeNotification(message)");
(*it)->zbIASZoneStatusChangeNotification(message);
//(*it)->zbAttributeRead(message->info.cluster, NULL);
}
}
return ESP_OK;
}
/*****************/
and to ZigbeeEP.h:

virtual void zbIASZoneStatusChangeNotification(const esp_zb_zcl_ias_zone_status_change_notification_message_t *message) {};

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.
@lsroka76 lsroka76 added the Type: Feature request Feature request for Arduino ESP32 label Dec 31, 2024
@SuGlider SuGlider added the Area: Zigbee Issues and Feature Request about Zigbee label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Zigbee Issues and Feature Request about Zigbee Type: Feature request Feature request for Arduino ESP32
Projects
None yet
Development

No branches or pull requests

3 participants