Remix.run Logo
davemp 5 hours ago

Fun project. Though it’s kind of unreal how complicated it is to set up HA and I literally do this for a living, both embedded sw and backend web dev.

Docker compose with a zwave management server, reverse proxies for TLS, vlan isolation for the server, macvlan for HA container so it does see the host network, etc, etc. All to turn on and off a lightbulb with the sun. All the while AI is telling me to configure things insecurely.

I think when I get some more spare time, I’d like to write a statically linked program that handles a zwave controller and basic automation scripting. No IP networking needed for my lightbulbs. Then it wouldn’t feel risky to just make a system user and udev rule to give it permissions to the controller, and run with systemd.

paranoidrobot 3 hours ago | parent | next [-]

While you can run HA as a container. I think it's a mistake - Its more complicated and has reduced features.

I would instead recommend people use HAOS instead - either running on dedicated hardware OR as a VM. Just dont run it from an SD card if you go down the Raspberry Pi/SBC route - it will kill the card from IO cycles.

I have an IOT VLAN on my network that all the IOT bits sit in, including WIFI devices. What internet access it gets (if any) depends on the device profile.

I tried splitting things up into multiple VLANs but a whole lot of things assume just a flat network, so things stop working if you get too fancy.

grvdrm an hour ago | parent | next [-]

What router and associated configuration software are you using? I have a Eero mesh network that leaves a lot to be desired for a fiddler like me.

paranoidrobot 24 minutes ago | parent [-]

I'm using OPNSense for the router, on their dedicated hardware - DEC750 iirc.

The switches are mostly Mikrotik, with some Unifi switches.

The wifi APs are all Unifi - they are all PoE and wired into the same network, no mesh. Even between buildings I ran fibre.

For the switching and routing, were I to do it again now I might go all Unifi. They recently implemented some much needed updates to make doing things like firewall rules and routing based on device much easier. I have a complicated set of rules in OPNsense to route IOT VLAN traffic out via a VPN connection, which require static IP assignments via DHCP, but under the new Unifi network I could do it with a few clicks and being able to use device attributes rather than a static IP.

I am also using an SLZB-MR1 for a ZigBee controller and Matter over Thread border router. I've got a bunch of IKEA and Mercator ZigBee light bulbs/fixtures that act as ZigBee routers. It's a strong enough mesh I rarely have issues with the ~180 devices on the net.

zikduruqe 2 hours ago | parent | prev | next [-]

> it will kill the card from IO cycles.

It might not. I have a Raspberry Pi 2 that has been running a weather station for over 12 years, and it has been on the original SD card. I have other RPi's doing dumb things around the house and I have never had an SD card failure.

YMMV and all that.

paranoidrobot 15 minutes ago | parent [-]

I wouldn't put running a weather station in the same class of disk activity as running Home Assistant. It is writing a fairly large amount of logs, plus statistics for every attribute/sensor for every device. The more devices you have, the more you will be writing.

There are regularly threads from people with "I restarted HA and now I get this weird boot error message", and it's because their SD card died.

You do you, but it's common enough of a problem that I think it's worth calling out as a "Don't do this".

93n 2 hours ago | parent | prev | next [-]

I go the container route, and have only had one issue: allowing HA to access my system's Bluetooth adapter. I had some ESP32s lying around, so I used ESPHome to make a Bluetooth proxy, which solved that issue.

I don't run addons though, which might be part of it.

paranoidrobot 6 minutes ago | parent | next [-]

Add-ons (now apps) can't be done without HAOS. It's one of those non-obvious things.

There's other things I forget which are also more difficult/annoying to manage on the container version.

I have a rather large docker compose stack so my first experiments with HA were as running it there.

That lasted maybe a week before I went and ran it as a VM instead.

ryukoposting 32 minutes ago | parent | prev [-]

Interesting. I also run HA in a container and getting it to pick up my Zigbee dongle was so easy I don't even remember how I did it.

I haven't tried BT, but my HA box lives underneath a couch with a big steel pull-out bed so I don't imagine it would work very well anyway.

paranoidrobot 10 minutes ago | parent | next [-]

I haven't done it either. But it should just be a case of passing the device to the container. You might need to disable the host from using it and pass admin rights to the container too.

But it was also quite easy to pass a USB device to the HAOS VM in Proxmox.

93n 8 minutes ago | parent | prev [-]

The host I run HA on is Ubuntu server. If memory serves me right, the Bluetooth issue was related to apparmor and dbus restrictions on docker

zer00eyz an hour ago | parent | prev [-]

> While you can run HA as a container. I think it's a mistake

Just because you CAN run something in a container, does not mean you should.

HAOS exists because it is a docker run time. It is a whole ecosystem, not just the home assistant software itself.

Rebelgecko 11 minutes ago | parent | prev | next [-]

I went through a similar process with Home Assistant. And the kicker is that months or years down the line, you'll hit some feature that doesn't work with the Docker version (I've ran into a couple)

dewey an hour ago | parent | prev | next [-]

The happy path is to buy https://www.home-assistant.io/green/ and then go from there. That's what I did and it was a very smooth setup for everything. I've long resisted HA as I thought it's one extra thing to fiddle with but the whole process, the updates, adopting my devices was much nicer than expected.

I've since also bought https://www.home-assistant.io/connect/zwa-2/ and got rid of all my third party bridges (Ikea, Hue etc.). I also feel good about buying devices from them as it supports the project and the work they are doing on it.

randusername 4 hours ago | parent | prev | next [-]

I also feel overwhelmed with HA homelab stuff.

HA on my RPI is just not reliable, requiring a reboot 4-6 times a year for reasons I don't understand. Frustration at being in the literal dark doesn't translate to the right mindset to root cause.

What I need is an opinionated guide on minimum viable virtualization, but so much of the resources online are from folks that are homelabing maximalists.

I feel the same temptation as parent to create a spartan solution.

_flux 4 hours ago | parent | next [-]

I got myself a NUC. It's been worth it: tiny, has 16 GB of memory and 504 days of uptime.

I have servers for running VMs and containers but I felt like it would be nice to have this one as a separate device. It's also easy to plug in radio devices.

benmanns 4 hours ago | parent | prev | next [-]

Same. The complexity of HA also leaves my family with a bus factor of one re: keeping the lights on.

zer00eyz an hour ago | parent | prev [-]

> What I need is an opinionated guide on minimum viable virtualization

Get a nuc or a mini pc: i5-8500 or better (used, ebay https://www.servethehome.com/introducing-project-tinyminimic... for a baseline of what's out there)

Ram is your friend (but prices are gross). Dont be cheap on storage.

Get an external USB drive (3/2/1 rule).

Install proxmox on said device.

Use the proxmox community scripts to install HAOS as a VM. https://community-scripts.org/categories?category=operating-...

Pass through what ever USB devices you need (or spring for POE devices ).

Enjoy your HA setup.

Proxmox is the way to go here. Once you have a working install dont over commit before you learn to: 1. back up, 2. restore. These should both be local and remote (HA can enable this to various sources).

As a bonus you now have a runtime (proxmox) that can do tons of other things (see the whole community scripts link).

I have been running HA for years now, and this method makes things a pleasure and is easy (at least if you're a nerd) and cheap (the solutions are lower power).

dgacmu 13 minutes ago | parent [-]

An enthusiastic two thumbs up to this approach. It's exactly what I run at home that has been working solidly. I run on an N100, which is just a hair smaller than an i5-8500, with 32GB DRAM and a 1TB SSD (total overkill). I keep it under proxmox; the box also runs my unifi SDN controller, pihole, and a linux VM for various little services. Two USB dongles for z-wave / zigbee / matter (because I'm a glutton for punishment). Backed up to a NAS. It's fast, easy, and has been very reliable.

briHass 5 hours ago | parent | prev | next [-]

You're making it complicated with all the VLANs. HAOS in a VM (proxmox helper scripts for one-line install), and HA has plugins for all the other things.

Just deny WAN access to the IoT junk you don't trust at the router, or for things like cameras, a separate switch for those. That usually makes sense, since they're one of the few devices that must be powered with PoE and doesn't require gig+ bandwidth. A cheap 100mbit PoE switch will handle a good number of cameras.

davemp 4 hours ago | parent [-]

I’m not giving untrusted devices unfettered access to my lan and an airgapped network sounds more complicated tbh. VLANs aren’t really that bad with good networking gear.

vladvasiliu 4 hours ago | parent [-]

I have HASS running on a dedicated VLAN, IoT junk on its own, separate VLAN without internet access, through a managed switch. OPNsense sits in between and does the routing. Didn't have to mess around with anything, just ran the "vm appliance" or whatever it's called for hass and I was off to the races. Wireguard on the firewall gives me access from outside the house.

Actually, both OPNsense and Hass are VMs on the same machine, with the latter's network not even connected to any physical port outside the box. I'm not even running Proxmox or anything fancy, just libvirt on Arch. The only "fancy" thing is a 2nd hand Mellanox NIC I got off eBay for 30 €, which presents virtualized interfaces to the VMs, but HASS doesn't actually use those.

There's also no need to manually screw around with any reverse proxy for TLS; HASS does it with the Let's Encrypt add-on. The only missing piece when I set this up a while ago was something to regularly renew the cert (the add-on would only get started at boot-up).

IncreasePosts 3 hours ago | parent | prev [-]

Hate to be that guy, but I've had a lot of luck promoting gemini-cli to implement whatever I want in home assistant, and it's pretty good

doctorpangloss 12 minutes ago | parent [-]

The agents have saved Home Assistant. Every piece of content marketing about it should be showing how to use an agent to set up Home Assistant.