HAHA IoT Cluster Topology

Home Assistant High Availability (HAHA)

HAHA is a homelab project to build a fault-tolerant, high-performance smart home stack. Hosted on three Proxmox nodes, it ensures uninterrupted operation of key IoT services: Home Assistant, Mosquitto, Zigbee2MQTT, ESPHome, and Node-RED — all running in a high-availability cluster. Overview Aspect Details Nodes 3 Proxmox hosts Clustering Pacemaker + Corosync Storage 3.6TB DRBD dual-primary + OCFS2 Network 2x10Gbps LACP per node Services Home Assistant, Mosquitto, Zigbee2MQTT, ESPHome, Node-RED Technology Stack Clustering Pacemaker + Corosync with STONITH fencing (3-node cluster) Floating virtual IP for seamless failover Quorum-based decision making Storage 3.6TB DRBD dual-primary replication OCFS2 cluster filesystem shared via NFS KINGSTON SFYRD4000G NVMe drives with PCI passthrough Networking LACP etherchannel (2x10Gbps per node) Cisco WS-C3850-12X48U switch Network-attached IoT peripherals (no USB dependencies) Dockerized Services Home Assistant (core automation) Mosquitto (MQTT broker) Zigbee2MQTT (Zigbee gateway) ESPHome (ESP device management) Node-RED (flow-based automation) IoT Peripherals Ethernet Zigbee: TubesZB CC2652P7 Ethernet Bluetooth: Olimex ESP32-POE-ISO USB-free design for clean failover AI Integration Local LLM (Ollama) on RTX 3090 Ti Private voice control and inference No cloud dependency Architecture ┌─────────────────────────────────────────────────────────────────┐ │ Floating VIP (Active) │ └───────────────────────────┬─────────────────────────────────────┘ │ ┌───────────────────────┼───────────────────────┐ │ │ │ ▼ ▼ ▼ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ pve01 │ │ pve02 │ │ pve03 │ │ Active │◄─────────►│ Standby │◄─────────►│Arbitrator│ │ │ DRBD │ │ DRBD │ │ └────┬────┘ Sync └────┬────┘ Sync └────┬────┘ │ │ │ │ Corosync Ring │ │ └─────────────────────┴─────────────────────┘ ┌─────────────────────────────────────────────────────────────────┐ │ DRBD + OCFS2 + NFS │ │ (3.6TB Replicated Storage) │ └─────────────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────┐ │ Docker Services │ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │ │Home Assistant│ │ Mosquitto │ │ Zigbee2MQTT │ │ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │ ┌──────────────┐ ┌──────────────┐ │ │ │ ESPHome │ │ Node-RED │ │ │ └──────────────┘ └──────────────┘ │ └─────────────────────────────────────────────────────────────────┘ │ ┌──────────────────┼──────────────────┐ ▼ ▼ ▼ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Ethernet Zigbee │ │Ethernet Bluetooth│ │ Local LLM │ │ TubesZB CC2652P7│ │ Olimex ESP32-POE │ │ RTX 3090 Ti │ └─────────────────┘ └─────────────────┘ └─────────────────┘ Key Features Seamless failover via Pacemaker/Corosync High-speed, redundant storage with DRBD + NVMe passthrough USB-free Zigbee/Bluetooth to support clean failover Fully local voice assistant, no cloud dependency Challenges Overcome Fine-tuned Pacemaker quorum and timeouts to avoid split-brain Stable dual-primary DRBD sync with OCFS2 lock handling Migrated from USB to Ethernet peripherals for failover stability Balanced low-latency storage and high throughput using LACP + passthrough NVMe Performance Benchmarks For IoT workloads, targets are: 50k IOPS, 200 MiB/s bandwidth, 5000 µs latency. ...

April 1, 2025 · 3 min · Kyriakos Papadopoulos
GPU Homelab Architecture

Unified GPU Homelab: AI, Media & Gaming

High-performance, multi-purpose homelab setup running on a single powerful node with PCI-e GPU passthrough for AI inference, media transcoding, and cloud gaming workloads. Overview Aspect Details Host Dell Precision 3680 CPU Intel Core i9-14900K RAM 128 GB GPU NVIDIA RTX 3090 Ti (PCI-e passthrough) Hypervisor Proxmox VE 8.4.5 VM 16 vCPUs, 40 GB RAM, Ubuntu 24.04.3 LTS Workload Breakdown AI Inference & Language Tasks Ollama - Local LLM inference Whisper / Faster-Whisper - Speech-to-text Piper TTS - Text-to-speech LibreTranslate - Machine translation Stable Diffusion - Image generation Viseron - AI-powered video analysis Immich - AI-powered photo management Ollama API Integrations Open WebUI (ChatGPT-style interface) Nextcloud AI features Perplexica (AI search) n8n workflow automation Home Assistant voice control Media Streaming & Transcoding Jellyfin - Media server with hardware transcoding Viseron - NVR with AI object detection Immich - Photo/video library with ML features Cloud Gaming Stack Sunshine - Game streaming server Xorg - Display server Steam with Proton + Wine Tested: Cyberpunk 2077 Clients: Moonlight (Android TV), Xbox controllers Architecture ┌─────────────────────────────────────────────────────────────────┐ │ Dell Precision 3680 │ │ i9-14900K | 128 GB RAM │ │ Proxmox VE 8.4.5 │ └─────────────────────────────────────────────────────────────────┘ │ │ PCI-e Passthrough ▼ ┌─────────────────────────────────────────────────────────────────┐ │ GPU VM (Ubuntu 24.04.3) │ │ 16 vCPUs | 40 GB RAM │ │ RTX 3090 Ti (24GB VRAM) │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │ AI Workloads │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ │ │ Ollama │ │ Whisper │ │ Piper │ │ Stable │ │ │ │ │ │ LLM │ │ STT │ │ TTS │ │Diffusion │ │ │ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │ │ └─────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │ Media Services │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ │ │ Jellyfin │ │ Viseron │ │ Immich │ │ │ │ │ │ (NVENC) │ │ (NVR) │ │ (Photos) │ │ │ │ │ └──────────┘ └──────────┘ └──────────┘ │ │ │ └─────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │ Cloud Gaming │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ │ │ Sunshine │ │ Steam │ │ Xorg │ │ │ │ │ │(Streamer)│ │ (Proton) │ │(Display) │ │ │ │ │ └──────────┘ └──────────┘ └──────────┘ │ │ │ └─────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ Network ▼ ┌─────────────────────────────────────────────────────────────────┐ │ Clients │ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │ │ Open WebUI │ │Home Assistant│ │ Moonlight │ │ │ │ (AI Chat) │ │(Voice Control)│ │(Game Stream) │ │ │ └──────────────┘ └──────────────┘ └──────────────┘ │ └─────────────────────────────────────────────────────────────────┘ Key Features Efficient resource consolidation - Single GPU serves multiple workloads PCI-e passthrough - Full GPU performance in VM Hardware transcoding - NVENC for media streaming Local AI - No cloud dependencies, complete privacy Cloud gaming - Stream AAA games to any device Use Cases AI Chat & Assistance Local ChatGPT-style interface via Open WebUI, integrated with Home Assistant for voice control. ...

February 1, 2025 · 3 min · Kyriakos Papadopoulos
Home Assistant HA architecture diagram

Home Assistant High Availability (HAHA)

The problem with smart homes There is a certain irony in building a smart home that becomes useless the moment a single Raspberry Pi decides to fail. I had been running Home Assistant on a standalone VM for years, and while it worked, I found myself increasingly aware of just how fragile the setup was. A failed disk, a corrupted SD card, an unfortunate kernel panic during a firmware update — any of these would leave me fumbling for light switches like it was 1995. ...

April 15, 2025 · 5 min · Kyriakos Papadopoulos