-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Comments
@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. |
@P-R-O-C-H-Y Hi, PR done. |
@lsroka76 Please provide a description in the PR, its empty now :) Thanks |
@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 ;-) |
@lsroka76 Go to the PR and click the 3 dots and edit button: |
@P-R-O-C-H-Y Now is OK? |
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
The text was updated successfully, but these errors were encountered: