Zigbee library - ZigbeeHandlers enhancement (IAS Zone Notification message) #10794
Labels
Area: Zigbee
Issues and Feature Request about Zigbee
Type: Feature request
Feature request for Arduino ESP32
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: