VPC
July 10, 2021, 1:34pm
1
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.
tom_l
July 10, 2021, 1:41pm
2
Do you have a snapshot from before this that you can restore?
VPC
July 10, 2021, 1:46pm
3
I believe so. I just upgraded to version 2021.7.1 and I it did a snapshot then.
tom_l
July 10, 2021, 1:50pm
4
This will list your snapshots:
ha snapshots
For help and options:
ha snapshot restore -h
To restore one:
ha snapshot restore [slug]
VPC
July 10, 2021, 1:57pm
5
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?
tom_l
July 10, 2021, 1:59pm
6
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.
VPC
July 10, 2021, 2:01pm
7
That still scrolls by really quickly even after putting the pipe into more
tom_l
July 10, 2021, 2:02pm
8
Bugger. It’s probably not implemented. I only tested it in the SSH Web Terminal addon.
Do you have the SSH addon installed?
VPC
July 10, 2021, 2:03pm
9
Yes. Unfortunately the ui won’t come up though to use it
tom_l
July 10, 2021, 2:03pm
10
Connect via SSH using Putty.
https://www.putty.org/
Or just video the screen scrolling past with your phone.
VPC
July 10, 2021, 2:05pm
11
HAHAHA
I did the iPhone video already but it was all blurry as it scrolled too fast!
I’ll try putty now.
VPC
July 10, 2021, 2:10pm
12
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
tom_l
July 10, 2021, 2:11pm
13
Yes port 22 is the default. Unless you changed it.
The SSH addon may not be running.
Try using | less
or | most
VPC
July 10, 2021, 2:12pm
14
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?
tom_l
July 10, 2021, 2:14pm
15
nano path/filename.extension
Or
vi path/filename.extension
path should be /config/.storage
VPC
July 10, 2021, 2:18pm
16
Unfortunately at the ha> prompt I don’t have nano or vi.
tom_l
July 10, 2021, 2:19pm
17
Exit out of the Home Assistant CLI? (Ctrl +Z)
VPC
July 10, 2021, 2:23pm
18
At the ha> prompt I can’t Control-Z out of it.
tom_l
July 10, 2021, 2:27pm
19
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.
VPC
July 10, 2021, 2:28pm
20
I can do that. Never opened my Home Assistant Blue yet so that will be interesting.