HELP! HA down. At ha> prompt

HELP!!

I messed up my system. On me.

I’m running a Home Assistant Blue.

I was cleaning up my system and have messed it up. The ui won’t come up. When I connect a monitor and keyboard to the Home Assistant Blue I’m at a ha> prompt.

I was in the .storage folder cleaning up files. I am using the browser_mod integration and had ended up with over 600 devices / entities form that. Long story. Even after removing the browser_mod integration I still had loads of devices / entities hence the cleanup effort.

I think I have an extra comma at the end of one of the core yaml files in my /config/.storage directory.

From the ha> prompt how can I edit these files?

Thanks for any assistance as I’m down. Users not happy. On me I know.

Do you have a snapshot from before this that you can restore?

I believe so. I just upgraded to version 2021.7.1 and I it did a snapshot then.

This will list your snapshots:

ha snapshots

For help and options:

ha snapshot restore -h

To restore one:

ha snapshot restore [slug]
ha snapshots

works but it scrolls past so fast I can’t see the most recent slug. Is there a grep or something that might sort them?

ha snapshots | more

Enter key: to scroll down line by line.
Space bar: To go to the next page.
b key: To go to back one page.

That still scrolls by really quickly even after putting the pipe into more

Bugger. It’s probably not implemented. I only tested it in the SSH Web Terminal addon.

Do you have the SSH addon installed?

Yes. Unfortunately the ui won’t come up though to use it

Connect via SSH using Putty.

https://www.putty.org/

Or just video the screen scrolling past with your phone.

HAHAHA

I did the iPhone video already but it was all blurry as it scrolled too fast!

I’ll try putty now.

Should my expectation be that I should be able to SSH to it from my developer workstation? ie the ip of Home Assistant, port 22?

I’m getting a connection error like ssh server is not running on Home Assistant

Yes port 22 is the default. Unless you changed it.

The SSH addon may not be running.

Try using | less or | most

I didn’t change the port away from 22. I don’t think the add on is running as I can’t connect.

From an ha> prompt is there a way to edit the files in the .storage folder?

nano path/filename.extension

Or

vi path/filename.extension

path should be /config/.storage

Unfortunately at the ha> prompt I don’t have nano or vi.

Exit out of the Home Assistant CLI? (Ctrl +Z)

At the ha> prompt I can’t Control-Z out of it.

Attach the installation media (eMMC module/SD card) to your computer.

Copy off the snapshots (you may need Disk Internals Linux Reader, free).

Do a reinstall.

Restore the snapshot during onboarding.

I can do that. Never opened my Home Assistant Blue yet so that will be interesting.