Closed xmow49 closed 3 months ago
@xmow49
Based on your requirements, if you only want to send a Zigbee command or report an attribute every 10 seconds after successful network formation, while keeping the device in sleep mode the rest of the time, you can consider the following approach:
For periodic attribute reporting: You can use the Zigbee Light Sleep example as a base and configure the reporting of attribute changes using the config report command.
For periodic command sending: You can also use the Zigbee Light Sleep example and using esp_timer_start_periodic send a Zigbee command every 10 seconds.
It's important to note that you should avoid usingesp_light_sleep_start
directly in the Zigbee Light Sleep example because the esp-zigbee-sdk internally calls this interface. The example is designed to utilize system sleep, and it will only enter sleep when FreeRTOS enters the idle task.
Answers checklist.
IDF version.
v5.2-beta1-263-ge49823f10c
esp-zigbee-lib version.
1.0.8
esp-zboss-lib version.
1.0.8
Espressif SoC revision.
ESP32-C6
What is the expected behavior?
I have a main loop in my code, who send/report attributes every minutes. Its working nice. Now after sending the data, I want a light sleep. So in my main loop, after 10s i do this
I looked the light sleep example, but for now, I don't want to use the power manager (it breaks some part of my code)
So like in the sample I enable the sleep
What is the actual behavior?
Currently, this is how it works:
W (65377) ZIGBEE: Failed to initialize Zigbee stack (status: -1)
What's wrong with my setup? Is it required to use the power manager? What function calls after sleep to reconnect the device?
Steps to reproduce.
A lot of code of my project is needed to reproduce.
More Information.
Init logs:
After sleep: