home-assistant / architecture

Repo to discuss Home Assistant architecture
315 stars 99 forks source link

HassOS and supervisor as a platform #412

Closed postlund closed 1 year ago

postlund commented 4 years ago

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:

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.

frenck commented 4 years ago

This sounds to me like a feature request?

frenck commented 1 year ago

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