Home assistant Factory Reset

I would respectfully but strongly disagree. Just because you are a hacker and know how to get inside the Appliance and remove files and whatnot does not make a useful function exposed as a bona fide UI option to factory reset bloat.

Is it bloat that you can factory reset your phone, (or TV, or any other smart appliance you have bought)? Sure, you could use tools like adb to get into your phone and format disks and whatnot to effect a factory reset, but why should you have to figure out how to do that?

Similarly, why should a Home Assistant Appliance user have to go scouring forums to figure out how they can hack into their system to effect a factory reset? And hope that they have done it correctly and not bricked their Home Assistant Appliance?

2 Likes

Just like any device with a factory reset function, the user could be warned and asked to confirm the operation. Have you ever factory reset your phone? You get lots of opportunity to change your mind and cancel the operation after suitable warning.

So I’m throwing in some questions: Is this really needed?

Yes. Just like it’s needed on so many other smart devices. People start down a road with their smart device, knowing little or nothing and once they start to learn more and more about it, they learn how they could or should have done things differently and just want a clean slate to start from.

2 Likes

But unlike any other device, HA isn’t one. HA is controlling devices, but it isn’t one itself. :slight_smile: So I’d say, the “normal” rules for devices don’t apply here. HA is used by multiple people, unlike any other device, where one user controls and uses the device.

And a reset isn’t trivial in HA. If someone would do that to my installation, I’d be pissed. :slight_smile: OK, as I’m counting myself as an experienced user, I do have daily backups, but that’s not the point. Without a control for user roles, this is nothing I’d support! Sorry! :slight_smile:

In theory anybody who can get access to my dashboard could do that reset. Nope, sorry, I can’t see that happening in a good way, without user roles.

And back to the question “is this really needed?”: it’s nice that you argue for it, but that’s not what I meant. :wink: :slight_smile:
To get into more detail: is this really necessary for the majority of users? How often would a button like this be used? What type of user will use it, and when?

I do see the point for some people, but if this is only for just a few, I wouldn’t support a feature request. But that’s my opinion! :slight_smile:

Again, I am going to have to respectfully and strongly disagree. Supervised HA on the HA OS is a device. It is an appliance as sure as any appliance can be one.

Just because it controls other devices doesn’t make it not a device any more than your phone controlling the same devices isn’t a device.

And a reset isn’t trivial in HA. If someone would do that to my installation, I’d be pissed.

Of course only Admins can factory reset the device. If you give Admin on your HA to somebody you don’t trust enough not to factory reset it on you, then you deserve what you get.

In theory anybody who can get access to my dashboard could do that reset.

Only Admins. I have multiple users on my HA. But only I am an admin.

How often would a button like this be used?

I would suggest by a fair number of people who want to play around with HA, learn stuff with and then take what they have learned and do things differently.

1 Like

I do not need to get inside the appliance to reset it.

Simply execute rm -rf * && ha core restart

First you need to first figure out how to log into it to find a command line you can type that command into and then you have to type it. Correctly. Is that something you are going to ask your grandmother to do?

From the perspective of the HA Appliance that is getting inside it.

The problem is that you continue to think of HA as something that runs on a general purpose computer for you to hack on. And in the case of HA Core, that is true, but when you install the package that has the OS, Supervisor and HA onto bare metal, that is an Appliance and as such it should act like one.

Exactly my point! I wouldn’t want my grandmother to have the possibility to reset a HA installation, certainly not via a simple button press… :wink:

I think we have to agree on disagreeing here. I’m sorry, but I haven’t heard anything, that would convince me to support this feature request yet. Sorry! :slight_smile: I still see a difference between a device like a phone and HA. And that’s why I wouldn’t vote for it yet, without a reasonable user role management. :slight_smile:

It’s not meant against you, but I really don’t see how this could be easily implemented before other things are handled. :slight_smile:

I came across this thread looking for a solution. Here is my use case: I have a thin client I setup HA on. To initially get HAAS OS on it, I had to take out the M2 drive, put it in another computer and flash it. I since replaced the thin client with something higher spec in my home and have a new instance of HA running on it. I want to bring the thin client to another home and run it there. So I wanted to reset it to “factory”. I don’t want to go through the pain of taking out the m2 and flashing it again. Although at this point, that probably would have been quicker. Like most things home assistant. . I had to read through forum posts to understand what I thought would be be built into the CLI. “Reset Home Assistant” is what I was hoping to find in the CLI. . . was hoping for a 5 minute task. What I found was I had to read though forum posts for an hour to figure out how to do this from the CLI:

core stop
login
rm -rf /config/.storage

. . which I’m hoping works. TBD until I get where I’m going and try and set it up again fresh.

edit: didn’t work so I guess I’ll be going forward with the reflash

1 Like

I also disagree with that too now that we have the Home Assistent Green that is marketed as an easy to use appliance box and targeting people that that new to home automation.

So you need to compare it to other smart home appliances, like the Philips Hue Bridge, SmartThings Hub by Samsung, IKEA Tradfri Gateway and IKEA Dirigera Controller.

All of which does have UI option to factory reset the appliance. I bet you can not can not picture Philips, Samsung or IKEA telling their customers to SSH into their smart hone bridges/gateways/hubs/controllers and get them to type commands to delete files in order to factory reset them.

Again, this is not a feature request meant for advanced users but for new users that buy Home Assistent Green, because today anyone where I live can now go down to the local mall here and pick up Home Assistent Green and a few smart home devices, expecting to use it like any commercial smart home hub appliance meant for everyone, not just tech-savvy people, because that is how it is now marketed.

Just look at the marketing words used on the Home Assistent Green webpage, as it states things like ”easy to use”, ”Take your first step to upgrading your smart home with Home Assistant Green, the easiest way to start using Home Assistant, Home Assistant Green is the easiest way you can start using Home Assistant. It’s plug-and-play and comes with Home Assistant already installed, and Home Assistant Green is the easiest way to run Home Assistant for the low price of $99. Try out Home Assistant for your smart home or share the love with family and friends

1 Like

I agree with others, a factory reset / factory default option should be exposed through the web GUI.

When you delete the config folder (or better, just rename it) then reboot, the config folder gets re-saved one last time before the reboot.

“Stop HA service”
ha host stop ? (there are options for shutdown, reboot, no stop though). since there are different types of HA OS install types, a factory reset option would be nice in the gui. (ie in my case of moving to a new home).
thanks

edit; looks like in my case the command to be used via CLI is:

ha core stop
mv config config off
ha host reboot

(hope above helps others - we still need a factory reset option in gui though imo)
edit 2- wrong, still has my config in place - still no factory reset :frowning:

No.

Ring, Nest and Alexa are appliances. Home Assistant is not, and will never be an appliance.

You don’t have to. When you first install Home Assistant- no automations, no configurations, no integrations- make a full backup. Any time you want to start over, restore that backup.

I would never vote for such a dangerous tool.

Well, that’s your opinion and luckly we all get one. Lots of people here would disagree with your opinion though, which is why this thread exists.

Why is HA[OS] not an appliance? You install it onto bare metal hardware and it acts like an appliance all with UI etc. Just because you can install other things on the same hardware makes HAOS not an appliance?

No? That’s just a different hardware platform but it’s no more or less an appliance than it (HAOS to be clear) running on an x86_64 platform.

That seems like a very round-about way to achieve a very common[ly available] function of an appliance/device. Do I have to do that with an Android phone? No. Do I need to do that with most operating systems, no? Even MS Windows has a “factory reset” function. You don’t have to open a terminal and start formatting devices to factory reset it.

Is that same functionality on your phone, or your Windows computer, (or probably MacOS – I don’t really know, but would be surprised if that’s not there), or any of the IoT devices in your house so dangerous? In the wrong, hands maybe, but that doesn’t make it any less necessary.

Nobody is suggesting it should be a one-button-click and poof, everything is gone. Just like on any other device that implements a factory reset, the user should be given ample and clear warning and multiple opportunities to abort such a dangerous operation.

But ultimately, for the user that wants it and confirms through the warnings and dialogs, it should be available.

If we are going to ban all dangerous tools, I suppose we should ban all power tools, many kitchen appiances, cars, and everything else that is potentially dangerous.

1 Like

Maybe because ‘mv config config off’ doesn’t seem to make much sense.

Not round-about at all. It is the most efficient use of memory, very specific to your hardware and allows you to restore to a known start point. Best of all, it works regardless of your installation method.

Yes it is, given that literally nobody is going to know ahead of time that that is how they are supposed to effect the very standard operation of a factory reset. And then once they have figured that out, it’s too late. They don’t have a factory-fresh installation to do this very silly work-around.

Efficient use of what memory exactly? Surely you are not referring to the tiny amount of memory that the code for such a function would be using. That would be a simply ridiculous reason not to have this feature.

This is what I would support. At the end of the installation, automatically do a full backup to ‘factory_reset.tar’. If that file is wasting space, I mean ‘found’ in the backup folder, then show the Factory Reset option to the system menu. Because there are so many ways to install Home Assistant, this is probably the only way that you could do a “Factory Reset”.

Then stand back as people cry foul- I did a “Factory Reset” and all of my integrations and automations disappeared.

2 Likes

Hell, that’s not a bad idea at all. A backup file taken right after the installation is done or immediately after the onboarding is complete would do the job.

Adding an extra step at onboarding page with something like “Would you like to backup now to be able to factory reset?” is a relatively common step for other software installations. Also, given it’s a fresh install with no integrations and/or addons configured, there’s relatively very little space to waste.

2 Likes

What is $CONFIG? How do I delete everything under $CONFIG on a Generic-x86-64 Home Assistant OS installation?

Please explain it to me like I am a Windows user and know nothing at all about Linux, Docker, etc. What are all of the steps/commands necessary? Where do I execute them from? Do I remotely log in or do it from the CLI that is on the console?

It is the directory that holds your configuration.yaml file. See Configuration.yaml - Home Assistant

But as others have pointed out, you probably can’t do this without shutting down the system because the system will continue writing there.

For anybody coming across this and is using a HAOS installation, this page might be of help: Common tasks - Operating System - Home Assistant

In Home Assistant Operating System, the ha os datadisk wipe command wipes the data disk. The command deletes all user data as well as Home Assistant Core, Supervisor, and any installed add-ons.

The command ha os datadisk wipe marks the data partition (either internal on the eMMC or the SD card, or on an external attached data disk) as to be cleared on the next reboot. The command automatically reboots the system. Upon reboot, the data is cleared. Then the system continues to boot and reinstalls the latest version of all Home Assistant components.

7 Likes