Unable to access HA webpage - not sure what to do

So I was in the middle of building an automation and the UI started to get more and more laggy. I tried to check the log but everything then froze! When I refreshed the browser tab the error “This site can’t be reached” came up.

I then tried pinging the IP and that returned <1ms with no losses, also the ethernet and activity lights kept flashing. Never been stuck like this before! Not going to pull the power cord - not when I can see activity. Of course there’s no point in trying to ssh into the HA pi but I tried all the same and the login prompt came straight up. Oh to be able to sudo reboot now.

On all my other pi’s I’ve got GPIO shutdown enabled and a power button for precisely this reason. I don’t know how that would be set up on HAOS? Meanwhile I’m at a complete loss

And like magic - after a while - it reloaded. Logs offer no clues but if I use the browser Inspect facility, there are numerous errors coming into the console whenever I use Studio Code Server Current version: 5.17.1 This is, I think, when I first noticed things getting laggy.

So I’m returning to my initial thoughts - how to safely shut down if thing do go wrong and the web/app UI is inoperative?

  1. Why would you assume SSH is not working?

  2. The HA CLI has a HA restart and a Host reboot option. See https://www.home-assistant.io/common-tasks/os#home-assistant-via-the-command-line A config check from the CLI would be a good idea before restarting HA. Fix any configuration errors via the CLI (nano is installed) before restarting.

Because I’m an idiot. I didn’t think I had a root password for HAOS but I just found out that it’s the same as my user account. Frankly, I’ve been on-board with the whole security ethic of HA and have resisted poking about under the hood like I usually do with my other raspberry pi’s.

Does this mean I can safely edit /boot/config.txt to add dtoverlay=gpio-shutdown?

I don’t know, sorry. If I need to shut down I just do this at the CLI:

ha host shutdown

OK cheers anyway. The kind of use case I have in mind is that the HA Pi is powered by a UPS that has lots of other gear attached and only lasts a few minutes on battery. So rather than faff around getting a terminal up somehwere, I like having just a quick button press to shut it down. It could do with automation really. The UPS sends me an email (and I think Nut is enabled somewhere?!?).

This freeze-up is happening several times a day now. I would tell you the exact firmware version but I’m waiting for HA to recover again. I updated core and OS only a week or so ago - so it must be fairly current.

What I can say is that it’s related in some way to the use of Studio Code Server. This issue has only emerged this weekend while updating config.yaml and editing some pyscript. The symptoms start with the Studio ‘buffering’ when selecting files, until connection lost. Reconnecting… pops-up. HA then reboots and the log starts over so no clues.

it’s back again now: Core 2024.10.1 OS 13.1

Have you tried starting in safe mode?

Not yet - It can take hours if not days for the freeze-up to happen I don’t think it would help rule anything out. I’m pretty certain it’s Studio Code Server. If I open chrome’s dev tools there are a number of errors that accumulate over time - but only when SCS is open. Maybe I should raise this in the add-on’s git issues.