Operating system startup logs via http

Long term user of the Home Assistant Operating System (former Hassos) on a raspberry pi here. I have always been very pleased with the performance and usability of home assistant. However, I often notice frustrations from my side in debugging reboot/restart/upgrade and config errors.

I think most of these often boil down to the suddenly different use case while doing these restarts for various reasons. I’m very used to using the http interface for almost everything. Via the interface, there are logs for HA and each of the addons. The home assistant community has done a tremendous work here to make everything as visible as possible. Unfortunately, when restarting it seems to me that the HTTP interface is almost the last thing that comes online and many things can go wrong before this.

A couple of the use cases I’ve ran into:

  • I do an upgrade and suddenly the interface takes a long time to come back online. I’m never really sure if everything is still fine. I run HA from a closet so I don’t have a screen connected by default. I do have samba and SSH running. but since I use the web interface almost always, there is always something that does’t work in the moment that things go south.
  • During a restore of an HA instance. Same thing here. This can suddenly take a long time and get up to the point where I have no clue if anything went wrong or not.
  • Usually it goes through a point where I get frustrated and power-cycle the device. At this point it only gets worse since I just also added the option that I corrupted something on the file system, knowing even less what is going on.

I think all this could be solved by providing some startup logs via HTTP to the user, first thing after the HA-OS (can I use that as an abbreviation?) boots. In this way, at least we can find out if anything has gone terribly wrong. Bonus from here on would be to enable boot in safe mode without config. This would restart again but with a mininal default HA config that allows us to make changes to some files.

A big plus for me as well would be an upgrade screen with a simple percentage bar and some updates on what HA is doing at the moment. This would also work with the restore image mode where it could indicate if it is copying files or anything like that.

Recently a big stride has been made here by adding the flash screen on initial startup. I’m truly not expecting anything more than this, apart from the fact that it is missing from the other use cases (reboot, upgrade).

At the moment, a lot of the restart and upgrade issues end up into generic catch all issues which I think are almost impossible to debug due to the wide variety of issues underlying. To give a couple of examples:

https://www.reddit.com/r/homeassistant/comments/9dhafe/hassio_web_interface_no_longer_working_after/

I can understand that these are no easy changes, but I think it would strongly increase my confidence in HA and allow for better and easier debugging.