You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deep sleep, sleepy end device example doesn't reliably update because it gives 5 seconds until shutdown, but sometimes it takes more than 5 seconds.
I created my own code based on this example that is intended to report a temperature every 10 minutes, and deep sleep in between. The code uses esp_zb_zcl_set_attribute_val to set the attributes. However, it only actually updates the zigbee network if I increase from 5 seconds (e.g. to 10 seconds). Is there a way instead to detect that the update payload has gone out and that it's safe to enter deep sleep?
Additional context.
No response
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Deep Sleepy End Device does not reliably update
Deep Sleepy End Device does not reliably update (TZ-1291)
Nov 14, 2024
The deep sleep, sleepy end device example doesn't reliably update because it gives 5 seconds until shutdown, but sometimes it takes more than 5 seconds.
The device wake-up time is measured by the ESP timer, which I believe is reliable. I ran the official example without any modifications, and the wake-up time was accurate. If you encounter unreliable timing on your side, please provide some logs or the code used to reproduce the issue for us to investigate.
Is there a way instead to detect that the update payload has gone out and that it's safe to enter deep sleep?
Have you tested whether the report a temperature feature works correctly on a non-sleep device? Also, please check the interval time for the report. The Zigbee stack operates during the device’s wake-up time. You can perform a simple test to verify this, as shown in the code below.
static void ieee_cb(esp_zb_zdp_status_t zdo_status, esp_zb_zdo_ieee_addr_rsp_t *resp, void *user_ctx)
{
if (zdo_status == ESP_ZB_ZDP_STATUS_SUCCESS) {
ESP_LOGI(TAG, "Response IEEE address: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", resp->ieee_addr[7],
resp->ieee_addr[6], resp->ieee_addr[5], resp->ieee_addr[4], resp->ieee_addr[3], resp->ieee_addr[2],
resp->ieee_addr[1], resp->ieee_addr[0]);
}
}
static void zb_deep_sleep_start(void)
{
/* Start the one-shot timer */
const int before_deep_sleep_time_sec = 5;
ESP_LOGI(TAG, "Start one-shot timer for %ds to enter the deep sleep", before_deep_sleep_time_sec);
esp_zb_zdo_ieee_addr_req_param_t ieee_req;
ieee_req.addr_of_interest = 0x0;
ieee_req.dst_nwk_addr = 0x0;
ieee_req.request_type = 0;
ieee_req.start_index = 0;
esp_zb_lock_acquire(portMAX_DELAY);
esp_zb_zdo_ieee_addr_req(&ieee_req, ieee_cb, NULL);
esp_zb_lock_release();
ESP_ERROR_CHECK(esp_timer_start_once(s_oneshot_timer, before_deep_sleep_time_sec * 1000000));
}
Question
https://github.com/espressif/esp-zigbee-sdk/blob/main/examples/esp_zigbee_sleep/deep_sleep/main/esp_zb_sleepy_end_device.c
The deep sleep, sleepy end device example doesn't reliably update because it gives 5 seconds until shutdown, but sometimes it takes more than 5 seconds.
I created my own code based on this example that is intended to report a temperature every 10 minutes, and deep sleep in between. The code uses esp_zb_zcl_set_attribute_val to set the attributes. However, it only actually updates the zigbee network if I increase from 5 seconds (e.g. to 10 seconds). Is there a way instead to detect that the update payload has gone out and that it's safe to enter deep sleep?
Additional context.
No response
The text was updated successfully, but these errors were encountered: