Home assistant Factory Reset

Would be very cool to have a feature that can wipe everything off and start from fresh empty home assistant.
In addition a smart clean up needed. The algorithm need to match internal configuration with existing add-ons and integrations. If no match clean it up. I have noticed sometimes no add-on but the name and ID still present in config files.

This already exists … format the disk and start again.

Otherwise you will always be suspicious that the “factory reset” didn’t clear or fix everything … and how could it, with all the non-official integrations and the pace at which each integration is updated ?

It’s hard enough trying to keep up with all the changes moving forwards after a few updates :wink:

4 Likes

Stop HA

Delete everything under $CONFIG.

Start HA.

1 Like

I mean the have a proper button on the GUI. Not all the users can go and format the disk or delete config files. Especially the home assistant green is out for a sale. The feature request is about adding a nice GUI options to do HA more user friendly. :slight_smile:

6 Likes

Definitely needed, just spent more than a day trying to achieve it and failed - stuff keeps coming back :frowning:

3 Likes

Have you read my post?

Yes and I tried that but like I said everything keeps coming back - it is as if the data is held in memory so while I delete/rename the config folder on reboot everything is magically back - which I didn’t want. In the end I resorted to pulling the SSD from the HA Pi mounting it in another Pi and deleting the config. Not an easy experience. A simple button is needed

1 Like

if everything came back, you probably haven’t stopped the HA Core.
→ login into your CLI
→ stop HA Core
→ remove config / custom_components / database / etc
→ start HA Core

That should it be.

Anyway - I don’t see the benefit of having a factory reset button - except, that this could be executed by mistake - or by a flaw…
Wiping the SD Card for those who run HA on an PI - and reinstall everything would still be the safest way.
For those, who run HA on a Virtualized environment, it’s even simpler… create a new Docker / VM whatever - and done.
You could still backup parts of your old config to restore some configurations.

You highlight the point that it will be different for every install method too.

If this function is so complicated to implement into Home Assistant (any intallation versions), then I may have a suggestion.
Why not either create automatically a special backup file either after a clean first boot but before adding any basic user data or at least after the very first base settings. Make it locked from normal deletion, except only after doing some special steps like

  • send a veryfication email
  • executing a task within the SSH terminal (Port 22222)
  • …
    Regards Thomas
1 Like

but still: why?

  • what should be considered as ‘factory reset’?
    – remove all custom_components
    – remove all lovelace cards?
    – remove all theme changes?
    – remove all manual edits in the config?

Then… it’s basically just a fresh installation → do this.

removing just the Data?
Then, this is also pretty easy to do without a ‘factory reset’

Before you want a thing - you should / need to define what exactly it should do.
Creating a Backup, that is locked for deleting?
No . PLEASE not - that would totally mess up my current calculations about disk space - because I usually only keep one backup - from the previous installed version for rollbacks when an update should break something I really need.

For everything else, I have a dedicated Backup system, creating incremental backups of the whole VM…

Honestly: Requests like these have one reason in particular.
A bad design choice from who ever has set up the system.
And this should be, where a change should be made.

There is ‘absolutely’ no need for a factroy reset - or for ‘locked’ backups - which will, again - do nothing else as a clean installation would do - especially, if you do not define a state that should be backed up with each release (and then, still be locked?)

I agree.

I would like this feature, the easier to use this software and change configurations for new users would be a very valuable option.

1 Like

Example: I want to install home assistant OS onto a mini pc to bring to my parents. I complete the process and load up home assistant and login to check and make sure my zwave stick and whatever else is fine. While doing that it picked up a bunch of my own home devices.

I’d rather just get to their house, factory reset the device, and then start fresh again without trying to download HA and overwrite yet again.

1 Like

Stop HA

Delete everything under $CONFIG.

Start HA.

1 Like

What is $CONFIG?

But to be completely honest I don’t really care. I don’t really want an answer to that question.

These are the kinds of technical details that should be hidden behind a factory reset button.

I installed home assistant OS on a mini PC. When it said it was going to spend 20 minutes initializing it actually took many hours. It downloaded hundreds of megabytes of files in those many hours even before the onboarding process (username, start fresh/restore from backup, etc.) started.

I want to return to the onboarding process without having to go back to the very beginning and download hundreds of megabytes of files again.

This is exactly what factory reset is all about. Just like you do on your Android phone when you want to go back to having a fresh device where you add your account and so forth.

1 Like

$CONFIG
Reading from the context, it is the directory where configuration.yaml is found. Delete everything in that directory, including hidden files and folders, and on next HA startup you will get the on-boarding screen again.

While I sincerely appreciate the pointer to what/where $CONFIG is, and while on my Home Assistant Core installation on my Fedora machine I can find that easily enough, my context in this thread is Hass.io – the sealed box appliance installation method of HA. It could easily apply to the Green or Yellow appliances that HA is available on/as.

As a sealed box appliance, I really should not have to open it up and muck with it’s internals (even assuming I knew how to do that with it’s forty-eleven containers implementation – which I frankly don’t care to try to figure out – that is why I am using the Hass.io appliance installation method) to achieve a pretty standard operational goal. This fact is what the entire point of this thread is.

The point here is that as a complete appliance implementation, Hass.io needs a factory reset option. Just about every electronic appliance I own has a factory reset operation to return it to how it arrived home from the store as, fresh and ready to be configured from scratch.

3 Likes

I believe the original poster means Home Assistent needs a UI/GUI button for “Restore Home Assistant to factory default settings” in the frontend for HASS/HASSIO installs just like there are such “factory reset” features available for most appliances as ex. smart phones/tablets/televisions and network routers meant for home use.

I think that is a good idea for the GUI frontend of Home Assistant OS installations if Nabu Casa plan on selling boxes as a pre-installed home automation hub appliance like the Home Assistent Green in retail stores.

Such a "factory reset feature is really expected in all smart appliances sold in retail stores today.

While this is not a feature that experienced users of open-source software might not expect to exist in the GUI/UI I do think that it is something that buyers of retail appliances do expect to see in the GUI/UI.

https://www.home-assistant.io/installation

https://github.com/home-assistant/operating-system

https://github.com/home-assistant/supervisor

https://github.com/home-assistant/frontend/

That would also be the spirit of the main message presented the State of The Open Home 2024 was to make Home Assistent more accessable to mainstream users

That is, continuing to streamlining user experiences, with a focus on making things easier, stable, and faster, including making more things can be managed via the UI in a simple way.

2 Likes

Yeah the point might be well made, but given how easy it is to factory reset via a simple delete command, it ends up just being bloat IMHO.

As long as we don’t have some kind of user and role management, I wouldn’t want that function. To much risk, someone is pressing that button and resets the system…

As nice as this might sound, I can see a lot of problems coming up, that would need to be resolved, before a reset button is implemented.

So I’m throwing in some questions: Is this really needed? How often is a system like HA reset to factory settings? Shouldn’t be the repair of a not healthy system be the priority?

I honestly can’t see much need besides new users. If you have a few devices integrated, it is a PITA to re-integrate all these. Re-pairing of all Zigbee or Z-Wave devices…