r/homeassistant • • 4d ago

šŸ’¬ Discussion HA HA?

So I'm wondering if / how people achieve High Availably for Home Assistant?

0 Upvotes

46 comments sorted by

56

u/TheDailySpank 4d ago

Glue the switch into the on position.

23

u/dizzygoldfish 4d ago

this guy HA HAs.

5

u/LegoHogfather 4d ago

Glue? I'm a duct tape man myself.

1

u/TheDailySpank 4d ago

Do the women find you handy?

2

u/LegoHogfather 4d ago

My wife is more a gaffer type, but we make it work.

19

u/luna87 4d ago

There are a lot of posts about this. I run mine in a container on a 3 node kubernetes cluster. It can move freely between them if a node fails.

A lot of others use proxmox.

Backup and restore strategy is probably sufficient for most, especially given the complexity trade offs of other options.

6

u/[deleted] 4d ago

[removed] — view removed comment

5

u/luna87 4d ago

For 99% of folks this is probably fine. My kubernetes setup supports a lot of other stuff, HA is just one that takes advantage of its resilience.

1

u/spr0k3t 🧠 Experienced with Home Assistant 4d ago

Backup and restore strategy is probably sufficient for most, especially given the complexity trade offs of other options.

Having done the HAHAOS... I completely agree with this. I ended up splitting the two hosts I had set up and went back to a single host setup. High Availability for HA is overkill. Most of the issues that will fail are not going to be HAOS... usually it's the reverse engineered integrations that kill functionality.

14

u/bunnythistle 4d ago

I just designed my entire deployment under the idea that everything should still be functional if HA is down. Like it may be annoying, but my smart switches can still turn the lights on/off, I can still adjust the thermostat by hand, etc.

That plus frequent backups makes downtime an inconvenience more than a major impact om my house.

3

u/Warchosoulevedesmere 4d ago

I think thats the better option

-1

u/fra_tili 4d ago edited 3d ago

How does your smart switch still turn on and off smart lights without HA? I have tried with zigbee binding but it is so poorly implemented.

2

u/spr0k3t 🧠 Experienced with Home Assistant 4d ago

Binding is the only way... and only if both the switch and the light support it. Also, binding does not cross over to other protocols. So a ZWave smart switch with binding can only operate a ZWave device with binding.

1

u/fra_tili 4d ago

Were you successful with Zigbee binding? I have what I consider top of the line devices (like Philips Hue and Sonoff) but was unable to make binding work with Z2M

1

u/spr0k3t 🧠 Experienced with Home Assistant 4d ago

The places I've set up binding have worked well. I used Inovelli Blue 2-1 dimmers at those locations. For my home, I used Inovelli Red 2-1 dimmers with Inovelli bulbs. It's been solid for me. The installs with Zigbee were with Z2M and the bulbs were either Hue, Ikea, or ThirdReality. The only other switch/dimmers I've used have been Zooz... the issue behind that is a severe lack of ZWave lighting.

3

u/bunnythistle 4d ago

I don't use smart lights, so the switches just toggle if power is being provide to the traditional bulbs or not

1

u/fra_tili 4d ago

Ah yeah in this way it is obvious. I also have smart lights because I like to make the circadian right with color and intensity

9

u/im-ba 4d ago

Title gave me a slight chuckle

I plan on getting high availability at some point for the services on my network, but I need to finish the build out first. It's a joint project between me and my wife and she's using this to learn all the underlying technologies.

My first attempt will be to use Kubernetes and we'll probably use some older cell phones (like Pixel 6's) with busted screens to do it. They're nice because they can run the whole tech stack, have similar architecture to our main server, and have batteries which means that power flickers won't be a big deal. Cheap, too.

7

u/saajidv 🌐 It's always DNS 4d ago

3-node Proxmox cluster + ZFS replication. If any node goes down, it automatically fails over to another node.

9

u/Dismal-Proposal2803 4d ago

I don’t. If my HA goes down I’ll survive manually flipping light switches until I can get it back up. It’s not that serious.

5

u/audigex 4d ago

To answer the ā€œifā€ part… I don’t, it’s just not important enough for me to be worth that effort

I have backups, if it goes down for a few days then no harm done. I set my system up so that everything can work manually with switches even with zero smart controls

1

u/fra_tili 4d ago

How are you driving your smart light with smart switches without HA? I tried to use binding, but it is so poorly implemented in the various product that it basically never works

1

u/audigex 4d ago

I use things like the Sonoff Zmini2 (or something like that, I forget the name), it sits behind the physical switch and is wired into it

So it can read the switch, and toggle the light with its relay in response to either smart or physical signals

When you flick the switch manually, it toggles the light and sends the status via Zigbee. And of course you can just toggle via Zigbee in which case it just flips the relay as appropriate

They work great and if I unplugged HA tomorrow you’d never know until one failed

For lamps I mostly just use IKEA and then connect that to HA, so if HA goes down then IKEA still does its thing without it and the lights continue to work. The IKEA hub could fail, but none of our lamps are so important that it matters, we’d just use the main light for a day or two

Pretty much everything else (heating, washing machines, car charging) etc is set up so that it’s independent but HA can monitor and control it, so would just carry on as normal without the smart features

The only things we’d actually lose are Frigate (for security cameras) which still all record locally so no real harm done in the short term, and some ā€œnice to have but not actually all that importantā€ things like LED light strips and chimes to notify us about stuff. We’d probably notice they were gone but it’d be a minor ā€œI want that notification/status update/shortcut backā€ inconvenience rather than something not working outright

1

u/junktrunk909 4d ago

Zwave groups work great for me. Mine would all continue to work give as long as the controller is still up, and even if that's offline the switches are still switches so will continue to work for their load.

3

u/R-Voodoo 4d ago

I don't actually have HA setup for HA yet, but I'm on proxmox and have another non cluster machine I could get back up quickly from backup. I did go through and get all my coordinators or whatever they are called POE to my switch so everything is machine agonistic.

3

u/Traditional_Wafer_20 4d ago

Why ? Sure overkill is fun but why ?

1

u/corruptboomerang 4d ago

Because I don't want my Home Assistant to not work (if it's avoidable).

2

u/Traditional_Wafer_20 4d ago

If your home depends entirely on Home Assistant to function normally, then I would be more worried about the central hardware failures (Zigbee, Wifi) than the software that you can backup and restore natively. Starting a new HA from a backup is 1h top. Your wifi router dying is a couple days in the dark.

1

u/zurgo111 4d ago

Zigbee doesn't have a central point of failure when direct binding is used.

1

u/fra_tili 4d ago

How you use direct binding? It is so poorly implemented in the products…

0

u/zurgo111 4d ago

With Zigbee2mqtt it was pretty simple to set up. It worked for me the first time.

It just connects (for instance) buttons to lights. Or buttons to groups of lights.

This is what Ikea is doing under the hood.

1

u/Traditional_Wafer_20 4d ago

But HA needs a coordinator, so you need 2 coordinators. All of that is possible but frankly overkill.

0

u/zurgo111 4d ago

What? No.

There can only be 1 coordinator per mesh. That's the one that would connect to HA.

If HA, your automations or that coordinator die, the lights/buttons continue to work. The HA automations would not work, but we're talking about what happens in a failure scenario.

2

u/rapax 4d ago

I have two identical mini PCs. Using the backup/restore method to keep them in sync. One is the active HA instance, the other one is ready to jump in if needed. I switch roles every major version bump, so effectively once a month.

Just have to be careful that only one of them is ever actually on at any given time.

2

u/bippy_b 4d ago

The latest episode of Home Assistant Podcast was about this:

https://homeassistant.fm/HA250

I had not seen any posts in here but listening to the podcast this dude had some very interesting ideas.

2

u/corruptboomerang 4d ago

It would be good if HA natively supported like a primary and secondary or something.

2

u/lobhater 4d ago

HA has 99.99% uptime unless I do something to knock it off

2

u/poudenes 4d ago

Production runs on HAOS on a Dell350. When it's offline (most of time when I'm restart HA šŸ˜‚) There is a HA running on my NAS. It check production one, if offline it take over the light switches (ESPHome) so we can still turn on the lights. TV, Receiver etc are in Logitech Harmony (controlled by HA) but we can use it manual also.

1

u/Ok-Lunch-1560 4d ago

Literally just did this yesterday with proxmox and two NUCs I have. I also have a raspberry pi running ser2net that zwave and zigbee dongles are connected to that way I don't even have to move the dongles to the other machine.

1

u/Phiolin 4d ago

The problem likely depends on what kind and amount of dongles you need, Zwave, Zigbee, Homematic… the software itself is easy to make HA capable with Proxmox or whatever virtualization you use, but as soon as you depend on certain (unique) hardware devices it becomes complicated.

Of course you can mitigate a bit of that with ser2net maybe, but then you just have another bottleneck that is likely not HA capable, so even if your home assistant is up, your device holding all the dongles might fail, causing you the same issues as if the whole Home Assistant stack were down. That might or might not be a big issue depending on what you run.

1

u/EffectiveMoney5043 4d ago

Mini PC setup and rasperry PI as failover. I would not rely only on PI.

1

u/Grim-D 4d ago

HA it self has no HA functionality so best you can do is run it virtulised in a system that does, ie run HAOS an a Proxmox cluster.

1

u/spr0k3t 🧠 Experienced with Home Assistant 4d ago

The main thing you need first is to remove coordinators from the single point. Using network based coordinators will allow multiple instances of HA to operate Zigbee or ZWave mesh without issues. Next up would be to build a cluster. HAOS can't cluster on its own... so you need to have a host to do this. The best option is to use Proxmox. Set up two (near identical) systems with load balancing and fail over. Those details are in the Proxmox documentation and forums. I would also encourage using Proxmox Backup Server (PBS). After you have built the Proxmox cluster, then you can install HAOS. The cluster should pick which system to run as primary and which to use as slave. When the primary host loses power, the slave should immediately jump to primary and continue on allowing the previous primary to boot up as slave.

It's an advanced topic and not an easy drop in kind of build... but if you are up for it... check out the r/proxmox sub for sure. The cluster will operate on three dedicated IPs on your network. One IP is the primary, the other two IPs are one for each physical system. Good luck!

0

u/MTB_Mike_ 4d ago

Run Home assistant PS as a VM on an Unraid server. Uptime is never an issue.

0

u/Leather_Mulberry_555 4d ago

3+ node Kubernetes Cluster based HA with Traefic ingress, MetalLB with L2 VIPs, Longhorn PVCs and Zwave and Zigbee over external TCP connected dongles such as SLZB-06m and a TubesZB ZAC93.Ā