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 · 6 comments · May be fixed by #10821
Open
1 task done

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

lsroka76 opened this issue Dec 31, 2024 · 6 comments · May be fixed by #10821
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
@P-R-O-C-H-Y
Copy link
Member

@lsroka76 Hi, if you have a complete change you want to add, feel free to open a PR with the proposed changes and we can discuss/review it there.

@lsroka76
Copy link
Author

lsroka76 commented Jan 7, 2025

@P-R-O-C-H-Y Hi, PR done.

@P-R-O-C-H-Y
Copy link
Member

@lsroka76 Please provide a description in the PR, its empty now :) Thanks

@lsroka76
Copy link
Author

lsroka76 commented Jan 7, 2025

@P-R-O-C-H-Y I've tried but it seems blocked now? Can You give me some hints - it's my first PR ;-)

@P-R-O-C-H-Y
Copy link
Member

P-R-O-C-H-Y commented Jan 7, 2025

@lsroka76 Go to the PR and click the 3 dots and edit button:
Screenshot 2025-01-07 at 13 34 35
This has to work.

@lsroka76
Copy link
Author

lsroka76 commented Jan 7, 2025

@P-R-O-C-H-Y Now is OK?

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
Development

Successfully merging a pull request may close this issue.

3 participants