Skip to content

Commit 11760b7

Browse files
committed
fix(zigbee): Remove leftovers and use workaround for mac capabilities
1 parent a108a1a commit 11760b7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

libraries/Zigbee/src/ZigbeeCore.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct) {
201201
log_i("Opening network for joining for %d seconds", Zigbee._open_network);
202202
esp_zb_bdb_open_network(Zigbee._open_network);
203203
}
204-
if(Zigbee._sleepy_device) {
205-
log_i("Device is a sleepy end device");
206-
Zigbee._can_sleep = true;
207-
}
208204
}
209205
} else {
210206
/* commissioning failed */

libraries/Zigbee/src/ZigbeeEP.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ uint8_t ZigbeeEP::_endpoint = 0;
1111
bool ZigbeeEP::_is_bound = false;
1212
bool ZigbeeEP::_allow_multiple_binding = false;
1313

14+
extern void zb_set_ed_node_descriptor(bool power_src, bool rx_on_when_idle, bool alloc_addr);
15+
1416
/* Zigbee End Device Class */
1517
ZigbeeEP::ZigbeeEP(uint8_t endpoint) {
1618
_endpoint = endpoint;
@@ -75,6 +77,7 @@ void ZigbeeEP::setPowerSource(zb_power_source_t power_source, uint8_t percentage
7577
//TODO:
7678
//UPDATE MAC CAPABILITIES TO SET POWER SOURCE TO BATTERY
7779
//currently its not possible to update mac capabilities
80+
zb_set_ed_node_descriptor(0,0,0);
7881
// Add power config cluster and battery percentage attribute
7982
esp_zb_attribute_list_t *power_config_cluster = esp_zb_zcl_attr_list_create(ESP_ZB_ZCL_CLUSTER_ID_POWER_CONFIG);
8083
esp_zb_power_config_cluster_add_attr(power_config_cluster, ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_REMAINING_ID, (void *)&percentage);

0 commit comments

Comments
 (0)