Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zigbee Examples persist network after reboot (IDFGH-10677) #11904

Closed
muc-martin opened this issue Jul 19, 2023 · 5 comments
Closed

Zigbee Examples persist network after reboot (IDFGH-10677) #11904

muc-martin opened this issue Jul 19, 2023 · 5 comments
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Feature Request Feature request for IDF

Comments

@muc-martin
Copy link

Is your feature request related to a problem?

I tried the HA_on_off_light HA_on_off_switch
examples and compiled them for the ESP32-H2 everything worked. But after a reboot of the coordinator the light-node needs to reboot as well otherwise commands are not transferred.

Describe the solution you'd like.

Add a example how to persist the zigbee network state for both devices after reboot.

Describe alternatives you've considered.

No response

Additional context.

No response

@muc-martin muc-martin added the Type: Feature Request Feature request for IDF label Jul 19, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jul 19, 2023
@github-actions github-actions bot changed the title Zigbee Examples persist network after reboot Zigbee Examples persist network after reboot (IDFGH-10677) Jul 19, 2023
@xieqinan
Copy link
Collaborator

Hi @muc-martin ,
The Zigbee network still exists after the coordinator reboots. The reason why commands are not transferred is that the switch example uses a volatile variable to store the light (end device) device information. When the switch (coordinator) resets, the device information is cleared from the switch's RAM, resulting in the commands not being transferred.

The esp-zigbee-sdk provides the esp_zb_zdo_device_bind_req() API to bind two devices. By doing so, the device information can be stored into flash and recovered by the device, which can be referred to in the esp-zigbee-sdk

Besides, more practical examples will be added to esp-idf zigbee.

@muc-martin
Copy link
Author

Hi @xieqinan,

thank you for the info.
It would be great if you could add an example how to connect and use a commercially available zigbee wall switch (e.g. switch to receive and process commands on the ESP32 board and perform custom actions depending on which button was pressed.

Thanks.

@chshu
Copy link
Collaborator

chshu commented Aug 31, 2023

@muc-martin We have updated the examples in the esp-zigbee-sdk to store the network and binding information persistently: https://github.com/espressif/esp-zigbee-sdk/tree/main/examples/esp_zigbee_HA_sample

So after the reboot, the devices will continue to work together.

@chshu chshu closed this as completed Sep 5, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new labels Sep 5, 2023
@allexoK
Copy link

allexoK commented Mar 5, 2024

Hello, sorry for stupid question, how exactly can I retrieve stored info from memory?

@chshu
Copy link
Collaborator

chshu commented Mar 6, 2024

Hello, sorry for stupid question, how exactly can I retrieve stored info from memory?

The Zigbee Stack related information is maintained within SDK, the SDK will do the store and retrieve by itself. User applicaion only handles the application specific info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

5 participants