Transforming an isolated Home Assistant setup into a distributed, secure architecture with local AI.
This repository documents the build of a progressive technical learning HomeLab with a clear goal: move from Home Assistant installed on an isolated device (Sonoff iHost) to a virtualized, observable, secure infrastructure with local AI capabilities.
The project is not only about deploying services. It is about operating with measurable criteria:
| Criterion | Target |
|---|---|
| ⏱️ Home Assistant uptime | ≥ 99% for 30 days after migration |
| 🔄 RTO (recovery time) | ≤ 30 minutes from backup |
| 💾 RPO (maximum data loss) | ≤ 15 minutes for critical entities |
| 📝 Documentation | Checklist + evidence in each phase |
┌─────────────────────────────────────────────────────────────┐
│ HP ProDesk 600 G6 MT │
│ i5-10500 · 16 GB RAM · 256 GB NVMe · 1 TB HDD │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Proxmox VE │ │
│ │ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────────┐ │ │
│ │ │ VM 100 │ │ LXC 200 │ │ LXC 300 │ │ │
│ │ │ Home │ │ TimescaleDB│ │ Nginx Proxy │ │ │
│ │ │ Assistant │ │ + Grafana │ │ Manager │ │ │
│ │ │ OS │ │ │ │ │ │ │
│ │ └────────────┘ └────────────┘ └────────────────┘ │ │
│ │ │ │
│ │ ┌────────────┐ ┌────────────────────────────────┐ │ │
│ │ │ LXC 400 │ │ LXC 500 │ │ │
│ │ │ AppDaemon │ │ Ollama + quantized models │ │ │
│ │ │ Python │ │ (local AI / Assist) │ │ │
│ │ └────────────┘ └────────────────────────────────┘ │ │
│ │ │ │
│ │ ┌────────────────────┐ │ │
│ │ │ VM 101 │ │ │
│ │ │ Windows Office │ │ │
│ │ │ [Acceso RDP/Tablet]│ │ │
│ │ └────────────────────┘ │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ Network segmented with VLANs (IoT / Management) │
└─────────────────────────────────────────────────────────────┘
To protect NVMe endurance and preserve the Home Assistant uptime target (>= 99%), heavy I/O and interactive workloads are intentionally split:
| Workload | Constraints and placement |
|---|---|
| VM 101 - Windows Office | Light VM (2 vCPUs, 6 GB RAM) with VirtIO drivers enabled for optimized SCSI/network performance. Dedicated to family office use and local network tablet access via RDP. System disk (50 GB) kept on NVMe for responsiveness. |
graph LR
F0["🔧 Phase 0\nHardware Selection"]
F1["🖥️ Phase 1\nInfrastructure\n& Migration"]
F2["📊 Phase 2\nPersistence\n& Observability"]
F3["🐍 Phase 3\nPython Logic"]
F4["🔒 Phase 4\nSecurity\n& Hardening"]
F5["🤖 Phase 5\nLocal AI"]
F0 -->|"✅ Hardware selected"| F1
F1 -->|"HAOS migrated"| F2
F2 -->|"DB + dashboards"| F3
F3 -->|"Automations"| F4
F4 -->|"Secure network"| F5
style F0 fill:#f0a500,color:#000
style F1 fill:#374151,color:#fff
style F2 fill:#374151,color:#fff
style F3 fill:#374151,color:#fff
style F4 fill:#374151,color:#fff
style F5 fill:#374151,color:#fff
🔧 Phase 0 - Hardware selection and validation | Closed · ~1-3 days
Objective: Select a physical host with suitable virtualization support, price, and power consumption.
Result: HP ProDesk 600 G6 MT received and BIOS/Firmware audit completed (VT-x/VT-d verified in BIOS) on 2026-07-06.
Key decision: Refurbished professional-grade mini PC over SBC or NAS, due to its performance/power/price balance (~260 EUR).
📄 phases/phase_00_hardware_selection.md · phases/phase_00_decision/
🖥️ Phase 1 - Infrastructure and clean migration | In progress · ~3-5 days
Objective: Install Proxmox VE, create the Home Assistant OS VM, and migrate the current state from Sonoff iHost with zero loss of critical automations.
Technologies: Proxmox VE · HAOS · LVM-Thin / ZFS · USB passthrough (Zigbee)
📊 Phase 2 - Persistence and observability | Pending · ~2-4 days
Objective: Externalize the state database (TimescaleDB), connect Grafana, and run operational availability dashboards.
Technologies: TimescaleDB · Grafana · InfluxDB (evaluation) · Proxmox LXC
🐍 Phase 3 - Advanced logic with Python | Pending · ~3-6 days
Objective: Build complex automations (multi-variable, time-based, with error handling) using Python over the Home Assistant REST and WebSocket APIs.
Technologies: Python · AppDaemon · HA REST/WS API · Git
🔒 Phase 4 - Security and perimeter hardening | Pending · ~2-4 days
Objective: Apply Zero Trust principles: isolation VLANs, reverse proxy with TLS, SSH hardening, Fail2ban, and port auditing, including strict segmentation for non-critical workloads and explicit deny rules for lateral traffic to Proxmox management IP and VM 100 (Home Assistant).
Technologies: VLANs · Nginx Proxy Manager · SSL/TLS · Fail2ban · nmap
🤖 Phase 5 - Local AI and inference | Pending · ~2-5 days
Objective: Integrate a local language model (via Ollama) with Home Assistant Assist for natural-language control without cloud dependency.
Technologies: Ollama · Llama / Phi (quantized) · HA Assist · latency benchmarking
| Phase | Name | Status | Target hrs. | Actual hrs. |
|---|---|---|---|---|
| 0 | Hardware Selection | 🟢 Closed | 4 | ~6.5 |
| 1 | Infrastructure & Migration | 🟡 In progress | 12 | - |
| 2 | Persistence & Observability | ⬜ Pending | 10 | - |
| 3 | Python Logic | ⬜ Pending | 14 | - |
| 4 | Security & Hardening | ⬜ Pending | 10 | - |
| 5 | Local AI | ⬜ Pending | 12 | - |
Estimated total: ~62 hours of applied technical learning.
HomeLab/
├── README.md ← This file
├── homelab_learning_plan.md ← Master plan with global criteria
├── current_phase.md ← Current status, active block, and next task
│
├── phases/
│ ├── phase_00_hardware_selection.md
│ ├── phase_00_decision/ ← Inventory, decision matrix, checklist
│ ├── phase_01_infrastructure_migration.md
│ ├── phase_02_persistence_observability.md
│ ├── phase_03_python_logic.md
│ ├── phase_04_security_hardening.md
│ └── phase_05_local_ai.md
│
└── tracking/
└── weekly_tracking_template.md
| Layer | Technology |
|---|---|
| Virtualization | Proxmox VE |
| Home Automation | Home Assistant OS |
| Storage | LVM-Thin / ZFS |
| Database | TimescaleDB |
| Observability | Grafana |
| Automation | Python · AppDaemon |
| Proxy / TLS | Nginx Proxy Manager |
| Security | VLANs · Fail2ban · SSH keys |
| Local AI | Ollama · Llama / Phi quantized |
Each phase follows the same structure:
- Measurable objective - what must be working at the end
- Technical plan - A/B/C/D blocks with concrete tasks
- Definition of Done - binary checklist of acceptance criteria
- Learning markers - initial to final level on a 1-5 scale
Daily tracking is maintained in
current_phase.md, updating the active block, next task, and completed milestones in each session.
Living documentation - updated session by session.