Skip to content

Make Reboot after Factory Reset on an EP optional #11178

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

Closed
1 task done
def1149 opened this issue Mar 25, 2025 · 7 comments · Fixed by #11153
Closed
1 task done

Make Reboot after Factory Reset on an EP optional #11178

def1149 opened this issue Mar 25, 2025 · 7 comments · Fixed by #11153
Assignees
Labels
Area: Zigbee Issues and Feature Request about Zigbee Type: Feature request Feature request for Arduino ESP32

Comments

@def1149
Copy link

def1149 commented Mar 25, 2025

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.
@def1149 def1149 added the Type: Feature request Feature request for Arduino ESP32 label Mar 25, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y added the Area: Zigbee Issues and Feature Request about Zigbee label Mar 26, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Mar 26, 2025
@Citrus101
Copy link

Hello, can I take up this issue or is anyone else working on this?

@P-R-O-C-H-Y
Copy link
Member

P-R-O-C-H-Y commented 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
Copy link

Oh okay perfect, will do.

@Citrus101
Copy link

@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
Copy link
Member

@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
Copy link

Yes agreed. I'll sit this one out.

@def1149
Copy link
Author

def1149 commented Mar 28, 2025

Working as requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Zigbee Issues and Feature Request about Zigbee Type: Feature request Feature request for Arduino ESP32
Projects
None yet
3 participants