78
submitted 9 months ago by hai@lemmy.ml to c/selfhosted@lemmy.world

Okay, let me start by saying that I really do love Home Assistant. I believe that it is a fantastic piece of software, with very dedicated developers that are far more talented than I. Although, that being said, I strongly disagree with a number of their design choices.

My most recent problem has been trying to put Home Assistant behind a reverse proxy with a subpath. The Home Assistant developers flat out refuse any contribution that adds support for this. Supposedly, the frontend has hard-coded paths for some views, to me this doesn't sound like a good practice to begin with -- that being said, I mostly program in Go these days (so I'm unsure if this is something that is pretty common in some frameworks or languages). The official solution is to use a subdomain, which I can't do -- I'm trying to route all services through a Tailscale Funnel (which only provides a single domain; I doubt that Tailscale Funnels where ever designed for this purpose, but I'm trying to completely remove Cloudflare Tunnels for my selfhosted services).

The other major problem I've ran into, is that HAOS assumes that you would have no need to run any other Docker services other than those that are add-ons or Home Assistant itself. Which, I'm sorry (not really), Home Assistant add-ons are an absolute pain to deal with! Sure, when they work, they're supper simple, but having to write an add-on for whenever I just want to spin up a single Docker container is not going to work for me.

Now, some smaller issues I've had:

  • There's no way to change the default authentication providers. I host for my (non-techie) family, they're not going to know what the difference between local authentication and command-line authentication is, just that one works and the other doesn't.
  • Everything that is "advanced" requires a workaround. Like mounting external hard drives and sharing it with containers in HAOS requires you to setup the Samba add-on, add the network drive, and then you can use it within containers.

Again, I still really love Home Assistant, it's just getting to a point where things are starting to feel hacky or not thought out all the way. I've considered other self-hosted automation software, but there really isn't any other good alternative (unless you want to be using HomeKit). Also, I'm a programmer first, and far away from being a self-hosting pro (so let me know if I've missed any crucial details that completely flip my perspective on it's head).

If you got to the end of this thanks for reading my rant, you're awesome.

you are viewing a single comment's thread
view the rest of the comments
[-] hedgehog@ttrpg.network 58 points 9 months ago

Have you considered not using the Home Assistant OS? You don’t need to run it to use Home Assistant. You can instead set your host up with some other OS, like Debian, and then run Home Assistant in a docker container (or containers, plural) and run any other containers you want.

I’m not doing this myself so can’t speak to its limitations, but from what I’ve heard, if you’re familiar with Docker then it’s pretty straightforward.

A lot of apps use hard coded paths, so using a subdomain per app makes it much easier to use them all. Traefik has middleware, including stripPrefix, which allow you to strip a path prefix before forwarding the path to the app, though - have you tried that approach?

[-] aksdb@lemmy.world 9 points 9 months ago

Strip prefix won't work if the frontend expects to find paths at absolute locations. You would need to patch the html, css and js on the fly, which is somewhere between ugly and (almost) impossible.

I would also suggest to simply use custom (sub) domains. Especially in your intranet you can have whatever domains you want.

[-] hai@lemmy.ml 2 points 9 months ago

Strip prefix won’t work if the frontend expects to find paths at absolute locations. You would need to patch the html, css and js on the fly, which is somewhere between ugly and (almost) impossible.

This is what I've seen would be the only "feasible" way of getting HA to work behind a subpath, in my opinion this only works for very small application though (not something as complex as Home Assistant).

[-] hai@lemmy.ml 5 points 9 months ago* (last edited 9 months ago)

I'm (currently) on Raspberry Pi OS (as I need something that "just works"). Home Assistant is running in Docker like everything else.

A lot of apps use hard coded paths, so using a subdomain per app makes it much easier to use them all. Traefik has middleware, including stripPrefix, which allow you to strip a path prefix before forwarding the path to the app, though - have you tried that approach?

I should've mentioned this, but I'm using Nginx (I really enjoy the simplicity of just having to add a section to a file whenever I want to add something). Before running HAOS I was running RPIOS again and used Traefik, it worked (but felt like a lot more work to setup than just a plain Nginx setup).

Edit: I forgot to mention, but there are things like stripPrefix for Nginx, I'm going to look into them. Although, this is what I meant, when you start to do things that are "advanced" with Home Assistant they turn into "hacks," and the barrier for advanced things feels a lot lower than with other self-hosted services (and I get that Home Assistant is very complex under the hood, it's just frustrating).

[-] sabreW4K3@lemmy.tf 1 points 9 months ago

This was going to be my suggestion. Just run home assistant as a Docker container, problem solved!

[-] hai@lemmy.ml 3 points 9 months ago

Still no subpaths, changing default authentication providers, and there can still be workarounds that feel hackish (I've used HA is a container before) the difference is that you'll do less in Home Assistant, so you avoid them as much as possible.

[-] MaggiWuerze@feddit.de 0 points 9 months ago

You can't use add-ons when running HA as a docker container, which basically lobotomizes it.

[-] Maximilious@kbin.social 30 points 9 months ago

Yes you can. It requires those docker containers to be installed and plugged into it on a stand alone system. This is exactly what HAOS is doing behind the scenes for is users and why many stick with it.

[-] infeeeee@lemm.ee 18 points 9 months ago

Addons are just other containers, you can run them next to ha

[-] peter@feddit.uk 2 points 9 months ago

You don't get the direct integration then though, as far as I'm aware there's no way to manually setup an addon

[-] infeeeee@lemm.ee 9 points 9 months ago

What direct integration? You get a button on the UI, vs you do everything the way you want.

HAOS is intended for people who want everything to just work, without much fiddling. If you need something more, you need a docker based install. You can do everything there and even more, but you have to set it up manually.

[-] vzq@lemmy.blahaj.zone 5 points 9 months ago

Add ons are just shitty packaging of other software. Just run the other software directly.

[-] aksdb@lemmy.world 2 points 9 months ago

What kind of addons? I have HACS and it works fine.

[-] JustEnoughDucks@feddit.nl 2 points 9 months ago
  • No backup solutions besides manual backing up and then setting up baremetal backing up

  • no configuration editor

  • HACS works, but no custom addons

  • manual configuration of esphome/nodered/mosquitto (I prefer this though)

I prefer docker because it is comfortable for me and I run all my services on one server, but it is indeed a bit less easy.

[-] aksdb@lemmy.world 4 points 9 months ago

When I host multiple services, I need to back them up as well. I simply mount all data volumes of all containers into a unified location that gets backed up by kopia every hour.

Since the volume is directly on disk, I also didn't have any problems editing configuration files.

The things I see listed as addons on the website are dedicated services anyway, that have images of their own you can easily spin up as containers.

I think if someone is advanced enough to want to run HASS on their own together with other stuff, they prefer to have more control anyway.

[-] JustEnoughDucks@feddit.nl 2 points 9 months ago

For sure, but the point is that it isn't integrated into homeassistant.

For many people, they want to do everything from homeassistant. You can always have kludged together solutions. I edit my configs with VIM and backup to my central backup location via an automation. However, this is doing things outside of homeassistant that many people find inconvenient.

[-] aksdb@lemmy.world 3 points 9 months ago

My point however was that people who want that kind of convenience (or rather who don't want to fiddle around manually), why would they want to run HASS in a container in the first place? Either you are tinkerer, then it doesn't matter or you are not, in which case you probably don't arrive at the point of running HASS on anything other than a preinstalled distro in the first place.

[-] hai@lemmy.ml 1 points 9 months ago

I prefer docker because it is comfortable for me and I run all my services on one server, but it is indeed a bit less easy.

Reading all of these replying I'm starting to think that maybe my problem was assuming that because add-ons are Docker container they should be treated as such.

[-] hai@lemmy.ml 1 points 9 months ago

Yes and no. If you want a really simple setup HAOS add-ons are amazing, but as soon as you want to run something someone else hasn't created a container for you're stuck doing extra work than just writing a Dockerfile or docker-compose. Plus, you can't setup networks between them and (as mentioned in the original post) sharing drives can be hackish as well.

The (grim) reason had I tried HAOS was because of the promise of something really simple that my family could figure out if something ever happened to me.

[-] Celestus@lemm.ee 1 points 9 months ago

Home Assistant OS add-ons are usually just repackaged and pre-configured Docker containers. The only thing the add-ons system really gives you is convenience

[-] sabreW4K3@lemmy.tf 1 points 9 months ago

There's alternative installation methods.

this post was submitted on 17 Feb 2024
78 points (85.5% liked)

Selfhosted

40173 readers
716 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS