That is a good find, and a great first post. Welcome!!
There should be an award for this one! Most first posts get the standard link to âhow to ask a good questionâ!
I brought the home assistant to my vacation apartment with my other automation equipment. While it took just 10 seconds to reset the other devices, I spent hours trying to factoryr reset the home assistant. Why canât we have a reset button that only permits a factory reset if a current backup has been successfully created?
Tried this (ha os datadisk wipe
). It didnât work. Rebooted and then my entire pre-existing config came back after the reboot.
Iâve tried it twice now.
Do I execute that from the ha >
prompt on the console? I mean, I know I donât. How do I get to a place where I run rm -rf *
to erase $CONFIG
? Even login
at the ha >
prompt just drops into the /
filesystem of something. I surely do not want to rm -rf *
there!
As an aside, these are the kind of details that I am saying that are unreasonable for any random user of HAOS to have to know just to effect a factory reset.
also doesnât work for meâŠ
Also commenting to say that neither
core stop
login
rm -rf /config/.storage
core start
nor
ha os datadisk wipe
were able to reset my HA OS running on my X86-64 NUC. My Zigbee Home Automation has not been working since a power outage and I was looking for a simple way to completely reset the device because I think there might have been a problem with the SQLite database based upon the debug logs.
I would like to say that I think it would be useful to have a factory reset option; if not from the web GUI then at least from the CLI. Itâs kind of a pain to reflash the device.
I feel like having it in the UI could be a nightmare for newbies or a terrible accident for some users.
Agree on CLI! There should be some sort of MD5 check to confirm installation is the same as a fresh installation.
Or as similar to Windows where you can run sfc /scannow to check for any broken or modified components. A similar command in CLI would be very nice.
This might sound dumb but⊠how do I do that?
You mean, I go into linux? Can I go into file editor and do it (then immediately get booted - which is fine with me)?
SSH or Samba Share. If youâre a GUI user, Samba Share is the easier route, but you still need SSH to stop home assistant.
Thanks!
Iâll give it a go. I just realized it would/will be a good idea to just create a backup of a blank install then could (if I ever need to do it again) just upload a âfactory resetâ config and overwrite the running config. Maybe?
Yep, that would work
ha os datadisk wipe
absolutely will format your data partition.
It has to be run from the host console and not an ssh add-on terminal. It wonât work from an add-on.
Also, @brianjmurrell
Does not work for me, run the command, and on login, all my stuff is still hereâŠ
Edit: On 3rd attempt, it worked.
When I first started messing with HA on a Rpi I would repeatedly mess things up to such a point that I would need to start over (not understanding the difference between Add-Ons and Integrations and installing conflicting Zigbee or Z-Wave options that would compete with their coordinator access).
I recall frequently performing the following steps:
- Get a step-stool to reach the shelf where it was plugged into my router
- Disconnect the power and ethernet cable
- Use a sharp knife to pull the SD card
- Put the SD card into a USB card reader and insert that into my laptop
- Re-image the card using Balena Etcher
- Put the SD card back, plug in the power and ethernet
- Wait for the startup/on-board to complete
The comments about how to do a reset imply that the user knows enough to install either the SSH & Terminal Add-On or the Samba Shares Add-On and knows how to access it and the correct commands to run.
I think it makes sense to have a dialog pop up immediately after the on-boarding process completes that asks the user to set a password that is used only for a factory reset, and if they press the reset button, provide a prompt that explains what will happen and what they will lose if they proceed. Itâs not dangerous and would be a huge time-saver.