architecture icon indicating copy to clipboard operation
architecture copied to clipboard

HassOS and supervisor as a platform

Open postlund opened this issue 5 years ago • 1 comments

Context

My use case is as follows. I run Home Assistant on a pi, currently living in my tv bench. In order to control my TV, I have connected an HDMI cable to my pi and written a custom component to do some CEC magic (my TV is old and lacks some functionality, so the default integration does not work). Now I want to upgrade the hardware I run Home Assistant on and also move it to the basement. So it's not possible to pull an HDMI cable anymore. The same problem exists for Z-wave as I still want to have my stick located in the same place. One solution would be two run two Home Assistant instances and "link" them with one of the methods available. It however adds more maintenance as I know have two instances to upgrade, etc.

Proposal

I started to look at tiny Linux distributions running just docker, like BalenaOS. The intention was to have something lightweight (with low maintenance), run my services in docker containers and glue everything together with for instance MQTT. I would extract my custom component and run it outside of Home Assistant and add an MQTT interface in this case. Then I started thinking... don't I already know about a small OS capable of running docker containers and software to manage them? Well, yes, HassOS and the supervisor.

So, here goes my proposal then... Extend the supervisor to manage addons, software upgrades, backups, etc. for remote nodes. You would still only have one node running Home Assistant. The other ones would run HassOS and the supervisor, but have no user interface. They would be fully managed from the Supervisor panel in Home Assistant.

This opens up for a lot of interesting things:

  • Use one UI to administrate everything
  • Deploy add ons to run on hardware which might have physical restrictions without requiring a full Home Assistant running on each node (like what I described in the beginning)
  • Simple upgrades for everything from a single place (compared to installing and running stuff in raspbian for instance)
  • Perhaps move an addon on-the-fly from one node to another when upgrading hardware?

More creative ideas can emerge from this, just mentioned a few. The most interesting part to me is that designing it like this would pave the way for a complete Home Assistant platform. If secure tunnels are created (e.g. VPN) between the nodes and main instance, ingress support could be supported for remote add ons as well. I find this to be rather interesting.

Consequences

Complexity, complexity and complexity. AFAIK everything (I.e. the supervisor) is designed around one local machine. So it would probably require quite a lot of work to accomplish. But I do believe it could be worth it in the long run.

postlund avatar Jul 26 '20 17:07 postlund

This sounds to me like a feature request?

frenck avatar Jul 26 '20 19:07 frenck

This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.

For that reason, I'm going to close this issue.

../Frenck

frenck avatar May 11 '23 14:05 frenck