After a cloud outage killed my Alexa-dependent home for 6 hours, I went nuclear: replaced every cloud dependency with a local OpenClaw node running on a Mac Mini M4 Pro. 47 Zigbee devices, local voice control, AI-powered automations β all running on my LAN. Here's the full architecture.
The Cloud Outrage
In Jan 2026, AWS-us-east-1 went down for 6 hours. My lights, thermostat, locks, and garage door were all offline. Smart home became 'dumb home.' Never again.
Architecture Overview
Everything runs on a Mac Mini M4 Pro (16GB RAM) inside a network closet. Home Assistant handles device communication. OpenClaw provides the AI intelligence layer β voice commands, smart automations, and anomaly detection. A Raspberry Pi 5 serves as hot-standby for core functions.
ββββββββββββββββββββββββββββββββββββββββββββββββββ β LAN (No Internet Required) β ββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β βββββββββββββββ ββββββββββββββββββββ β β β Mac Mini ββββββΊβ Home Assistant β β β β M4 Pro β β (Docker) β β β β β ββββββββββ¬ββββββββββ β β β OpenClaw β β β β β + Ollama β ββββββββββΌβββββββββ β β β + Whisper β β β β β β ββββββββ¬βββββββ Zigbee Z-Wave MQTT β β β β β β β β ββββββββ΄βββββββ βββ΄βββ βββ΄βββ ββββ΄ββββ β β β Whisper β β 42 β β 5 β β ESPs β β β β Mic Array β βdevsβ βlocksβ βsensorsβ β β βββββββββββββββ ββββββ ββββββ ββββββββ β β β β βββββββββββββββ Hot Standby β β β RPi 5 β (core automations only) β β βββββββββββββββ β ββββββββββββββββββββββββββββββββββββββββββββββββββ
OpenClaw Configuration
# IDENTITY.md for Smart Home Agent You are a smart home controller. You manage 47 devices via Home Assistant's REST API. You process voice commands via local Whisper transcription. ## Voice Command Patterns - "Turn [on/off] the [room] [device]" β HA service call - "Set [device] to [value]" β HA service call with data - "What's the [room] temperature?" β HA state query - "Lock/unlock the [door]" β Z-Wave command (require PIN confirmation) - "Goodnight" β Run scene: all lights off, doors locked, alarm armed - "I'm leaving" β Run scene: eco mode, cameras active, welcome sequence off ## Automation Rules - Motion at front door + after sunset β porch light on for 5 min - Outdoor temp > 30Β°C + nobody home β AC eco mode - Motion at 2AM + all doors locked β capture camera still, send to phone - Humidity > 70% in bathroom β exhaust fan on for 15 min - No motion for 30 min in room β lights off (except bedroom after 10pm) - Washing machine power < 5W for 10 min β notify "laundry done" ## Safety Rules - NEVER unlock doors via voice without PIN confirmation - NEVER disable smoke/CO detectors - Garage door: close automatically at 11pm if open - If OpenClaw goes offline, Home Assistant continues basic automations
# docker-compose.yml β Smart Home Stack
version: '3.8'
services:
openclaw:
image: openclaw/openclaw:latest
ports:
- "18789:18789"
environment:
- OPENCLAW_MODEL=ollama:llama3:8b
- HA_URL=http://homeassistant:8123
- HA_TOKEN=${HA_LONG_LIVED_TOKEN}
- WHISPER_MODEL=base.en
- MQTT_BROKER=mqtt://mosquitto:1883
volumes:
- ./identity:/app/identity
- ./data:/app/data
depends_on:
- ollama
- homeassistant
- mosquitto
restart: unless-stopped
homeassistant:
image: homeassistant/home-assistant:stable
ports:
- "8123:8123"
volumes:
- ./ha-config:/config
- /run/dbus:/run/dbus:ro
devices:
- /dev/ttyUSB0:/dev/ttyUSB0 # Zigbee dongle
- /dev/ttyUSB1:/dev/ttyUSB1 # Z-Wave stick
privileged: true
restart: unless-stopped
ollama:
image: ollama/ollama:latest
volumes:
- ollama_data:/root/.ollama
mosquitto:
image: eclipse-mosquitto:2
ports:
- "1883:1883"
volumes:
- ./mosquitto:/mosquitto/config
volumes:
ollama_data:1. Hardware Stack
The complete bill of materials for a cloud-free smart home:
| Item | Cost | Notes |
|---|---|---|
| Mac Mini M4 Pro (16GB) | $599 | Main brain β OpenClaw + Home Assistant + Ollama |
| SONOFF Zigbee 3.0 Dongle Plus | $30 | 42 devices: lights, sensors, switches, plugs |
| Aeotec Z-Wave Stick Gen7 | $45 | 5 Z-Wave locks (requires Z-Wave for security) |
| ReSpeaker USB Mic Array | $65 | 4-mic far-field array for voice pickup in kitchen/living room |
| ESP32 boards (x6) | $48 | Custom MQTT sensors: mailbox, plant moisture, garage |
| Raspberry Pi 5 (8GB) | $80 | Hot standby for core automations |
| UPS (CyberPower 850VA) | $90 | 45 min battery backup for Mac Mini + network |
2. Voice Control (100% Local)
Voice processing pipeline β no audio ever leaves the house:
Voice Flow (avg 800ms end-to-end):
User: "Hey OpenClaw, turn off the porch light"
β
βΌ [ReSpeaker Mic Array β USB Audio]
β
βΌ [Whisper base.en β local transcription: ~200ms]
β Transcript: "turn off the porch light"
β
βΌ [OpenClaw LLM β intent parsing: ~350ms]
β Intent: ha.turn_off
β Entity: light.front_porch
β
βΌ [Home Assistant REST API: ~50ms]
β POST /api/services/light/turn_off
β {"entity_id": "light.front_porch"}
β
βΌ [Zigbee command β device: ~200ms]
β
β
Light off. Total: ~800ms3. AI-Powered Automations
Unlike rule-based automations, OpenClaw makes contextual decisions using sensor data + time + occupancy patterns:
# Sample OpenClaw automation log (real output)
[2026-03-15 14:23] DECISION: AC β eco mode
Reasoning: Outdoor 32Β°C, indoor 24Β°C, nobody home
(no motion in any room for 45 min, phone GPS = office)
Action: climate.set_hvac_mode(eco) β β
Success
[2026-03-15 02:14] ALERT: Anomaly detected
Reasoning: Motion sensor (hallway) triggered,
all doors locked, all phones home (sleep mode)
Action: camera.snapshot(front_door) β sent to phone
Note: Cat jumped on hall table. False alarm logged.
[2026-03-15 18:30] DECISION: Welcome sequence
Reasoning: Front door opened, sunset was 17:45,
family phone detected on WiFi
Action: lights.living_room(warm, 60%),
thermostat(22Β°C),
speaker("welcome home")4. Failover & Reliability
The system has three layers of resilience:
Failover Hierarchy: Layer 1: OpenClaw + LLM (Mac Mini) ββ AI automations, voice control, anomaly detection ββ If down β Layer 2 takes over in <5 seconds Layer 2: Home Assistant (Mac Mini Docker) ββ Rule-based automations continue independently ββ Zigbee/Z-Wave direct control still works ββ If Mac Mini dies β Layer 3 Layer 3: Raspberry Pi 5 (Hot Standby) ββ Runs mosquitto + basic MQTT automations ββ Core: lights, locks, thermostat only ββ Starts automatically via systemd heartbeat ββ No AI, no voice β just basic function Layer 4: Physical (always works) ββ All smart switches have physical buttons ββ Z-Wave locks have keypads ββ Thermostat has manual controls
Living Without The Cloud β 8 Months Later
Here's the honest comparison after 8 months of fully air-gapped operation:
| Metric | Cloud Setup | Air-Gapped | Winner |
|---|---|---|---|
| Monthly cost | $37/mo subscriptions | $8/mo electricity | π Air-Gapped |
| Outages in 8 months | 4 (total 14h) | 0 | π Air-Gapped |
| Voice response time | 1.2-3.5 seconds | 0.6-0.9 seconds | π Air-Gapped |
| Privacy | Audio β cloud servers | All local, zero upload | π Air-Gapped |
| Setup complexity | Plug and play | 2 weekends | βοΈ Cloud |
| Device compatibility | 800+ devices | Zigbee/Z-Wave/MQTT | βοΈ Cloud |
"My neighbor's Alexa went down last week. He came over and asked if mine was working. I said 'mine doesn't need the internet.' His face was priceless." β u/AirGapMaxwell
Cost Comparison (1-Year)
| Cloud Smart Home | Air-Gapped | |
|---|---|---|
| Hardware | $200 (Echo devices) | $957 (Mac Mini + RPi + dongles) |
| Year 1 subscriptions | $444 ($37/mo) | $0 |
| Year 2+ ongoing | $444/year | $96/year (electricity) |
| 3-year total | $1,532 | $1,149 |
| Privacy | β All audio to cloud | β 100% local |
Break-even at month 26. After that, savings of $348/year + total privacy. No vendor lock-in β if OpenClaw disappears tomorrow, Home Assistant continues working.
Security & Privacy
β οΈ Physical security: if someone gains physical access to the Mac Mini, they can control all devices. Keep it in a locked network closet. Enable disk encryption (FileVault).
Frequently Asked Questions
Q1. Does voice control work as well as Alexa?
Q2. What about firmware updates?
Q3. Can my family use it?
Q4. What about remote access?
Q5. What's the weakest link?
Lessons Learned
Physical controls are non-negotiable
Every 'smart' switch must have a physical button. If the AI goes down, the house must still be manually controllable. This is the #1 rule.
Start with lights, expand slowly
Don't migrate everything at once. I started with 5 lights, got them reliable, then added sensors, then locks, then voice. Each phase took 2-3 days.
VLAN isolation is essential
IoT devices are notoriously insecure. Put them on a separate VLAN with no internet access and no access to your main network. The only bridge is the Mac Mini.
The UPS is not optional
Power flickers kill automations mid-execution. A $90 UPS prevents corrupted databases, stuck relays, and scary 'all lights flash' events at 3AM.