Ingress Improvements

After starting a hassio addon with a web server, the Open Web UI button appears if the addon supports Ingress. This is an extremely useful function, however if the web service is not yet ready, you will simply see “502 Bad Gateway”

I feel there are 2 great ways to improve this.

  1. Have hassio do a web call to the URL before presenting it to the user. If it returns 502, then give the user a pretty error message outlining that it probably isn’t done starting yet and below it have “Retry” and “Back” buttons.

  2. Allow addon devs to implement a trigger for enabling the Open Web UI button. This way, the button is grayed out until ready. (Addons that don’t implement this can simply use the previous idea) The addon developer can define either a delay (5 seconds) or have hassio wait for a certain log output keyword such as “Web Service Started” or “Done”. This way, the user sees a grayed out button when starting, and then the button enables once the addon has fully loaded.

These changes would help round off the hassio addon experience and would prevent people from trying to research the 502 gateway error when all they need to do is wait a few more seconds.

One further enhancement would be customizing the 502 error screen:

  1. make it branded with the HA branding, so it’s less jarring
  2. put a message saying “this addon hasn’t loaded yet, give it a minute and try hitting refresh. If you still get this error, then [LINK]check the addon’s logs here[/LINK] and [LINK]Home Assistant’s logs[/LINK]” That way the user knows why the error is occurring, and a potential solution.
1 Like
1 Like