@@ -134,7 +134,7 @@ static esp_err_t zb_configure_report_resp_handler(const esp_zb_zcl_cmd_config_re
134
134
return ESP_OK;
135
135
}
136
136
137
- static esp_err_t zb_cmd_default_resp_handler (const esp_zb_zcl_cmd_default_resp_message_t *message) {
137
+ static esp_err_t zb_cmd_ias_zone_status_change_handler (const esp_zb_zcl_ias_zone_status_change_notification_message_t *message) {
138
138
if (!message) {
139
139
log_e (" Empty message" );
140
140
return ESP_FAIL;
@@ -144,13 +144,19 @@ static esp_err_t zb_cmd_default_resp_handler(const esp_zb_zcl_cmd_default_resp_m
144
144
return ESP_ERR_INVALID_ARG;
145
145
}
146
146
log_v (
147
- " Received default response : from address(0x%x), src_endpoint (%d) to dst_endpoint (%d), cluster(0x%x) with status 0x%x " ,
148
- message->info .src_address . u . short_addr , message-> info . src_endpoint , message->info .dst_endpoint , message->info .cluster , message-> status_code
147
+ " 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 ,
148
+ message->info .src_endpoint , message->info .dst_endpoint , message->info .cluster
149
149
);
150
+
151
+ for (std::list<ZigbeeEP *>::iterator it = Zigbee.ep_objects .begin (); it != Zigbee.ep_objects .end (); ++it) {
152
+ if (message->info .dst_endpoint == (*it)->getEndpoint ()) {
153
+ (*it)->zbIASZoneStatusChangeNotification (message);
154
+ }
155
+ }
150
156
return ESP_OK;
151
157
}
152
158
153
- static esp_err_t zb_cmd_ias_zone_status_change_handler (const esp_zb_zcl_ias_zone_status_change_notification_message_t *message) {
159
+ static esp_err_t zb_cmd_default_resp_handler (const esp_zb_zcl_cmd_default_resp_message_t *message) {
154
160
if (!message) {
155
161
log_e (" Empty message" );
156
162
return ESP_FAIL;
@@ -160,15 +166,9 @@ static esp_err_t zb_cmd_ias_zone_status_change_handler(const esp_zb_zcl_ias_zone
160
166
return ESP_ERR_INVALID_ARG;
161
167
}
162
168
log_v (
163
- " 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 ,
164
- message->info .src_endpoint , message->info .dst_endpoint , message->info .cluster
169
+ " Received default response : from address(0x%x), src_endpoint (%d) to dst_endpoint (%d), cluster(0x%x) with status 0x%x " ,
170
+ message->info .src_address . u . short_addr , message-> info . src_endpoint , message->info .dst_endpoint , message->info .cluster , message-> status_code
165
171
);
166
-
167
- for (std::list<ZigbeeEP *>::iterator it = Zigbee.ep_objects .begin (); it != Zigbee.ep_objects .end (); ++it) {
168
- if (message->info .dst_endpoint == (*it)->getEndpoint ()) {
169
- (*it)->zbIASZoneStatusChangeNotification (message);
170
- }
171
- }
172
172
return ESP_OK;
173
173
}
174
174
0 commit comments