Closed
Description
Related area
Zigbee
Hardware specification
C6, H2
Is your feature request related to a problem?
When an EP executes a factory reset, it also executes a device reboot. When I execute a factory reset, I may want to shut the device down, not reboot. Currently, I need to set a shutdown flag in flash, and upon reboot, if the flag is set, clear it and shut the device down. That works, but it's a workaround.
Describe the solution you'd like
Add a boolean to factoryReset(bool reboot)
If true, reboot.
If false, return to the caller
Describe alternatives you've considered
Flash-based flag to signal shutdown after the reboot from a factoryReset() call.
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
- I confirm I have checked existing list of Feature requests and Contribution Guide.
Activity
Citrus101 commentedon Mar 26, 2025
Hello, can I take up this issue or is anyone else working on this?
P-R-O-C-H-Y commentedon Mar 26, 2025
Hi @Citrus101, I have this assigned to me as I am maintainer of Zigbee Library but I did not start yet.
But if you would like to take this, is. a simple change feel free to open a PR with the change and ping me there.
Citrus101 commentedon Mar 26, 2025
Oh okay perfect, will do.
Citrus101 commentedon Mar 26, 2025
@P-R-O-C-H-Y sorry to bother you like this but can you provide me your thought process for the solution you were going to come up with?
I'm struggling since I thought a simple modification to the factoryReset function would suffice but it doesn't seem like it.
I cannot code the described solution since esp_zb_factory_reset is a Core API function and can't avoid the reboot performed by the device.
P-R-O-C-H-Y commentedon Mar 26, 2025
@Citrus101 I have some thought but I would need to investigate the options. Maybe it's not that simple as I imagine. So please let me work on this fr. Would be easier for me to do it directly when I would need to also investigate.
Citrus101 commentedon Mar 26, 2025
Yes agreed. I'll sit this one out.
def1149 commentedon Mar 28, 2025
Working as requested