Home Assistant · Zigbee · MQTT · ESPHome · Local-First

Local-Only Smart Home — No Cloud, No Subscriptions

I bought a "smart" thermostat that stopped working during an internet outage. Then two cloud-dependent smart plugs became paperweights when their manufacturer shut down the service. I got tired of buying hardware I didn't actually control. Here's how I built a smart home that works offline, answers to nobody, and doesn't need permission from a server to turn on my lights.

⏱ 35 min read📊 Intermediate📅 May 4, 2026

⚠️ The Cloud Betrayal Problem

In 2024 alone: MyQ garage controllers blocked第三方 API access, Insteon shut down their cloud servers with zero notice bricking hubs worldwide, and Amazon Sidewalk began opt-out sharing of your bandwidth with neighbors. Every cloud-dependent smart device is a ticking clock — it works until the company changes strategy, gets acquired, or runs out of funding. The only way to guarantee your smart home still works in 2036 is to ensure it doesn't need permission from anyone else's server.

What "Local-Only" Actually Means

I define "local-only" by three rules I learned the hard way:

  1. No internet required for core function. My lights, locks, thermostats, and automations keep working when my ISP drops out. Remote access from outside the house is nice, but it shouldn't be required to turn on a light switch.
  2. No manufacturer cloud dependency. Device firmware talks directly to my local hub, not to api.some-startup-that-might-exist-next-year.com. If the company folds tomorrow, my hardware still works. I've seen it happen.
  3. No data leaves my network. My sensor data — when rooms are occupied, when doors open, my voice commands — stays on my hardware. No "anonymized analytics," no training data for someone else's AI model, no telemetry I didn't explicitly choose to send.

This isn't privacy idealism. It's practical survival. The average cloud-dependent smart home generates 50–150 GB of telemetry per year that you don't control and can't audit. Local-only means you stop paying for that with your data and your attention.

The Architecture — One Pi, Many Protocols

At the center: a Raspberry Pi running Home Assistant. Around it, a constellation of devices communicating over protocols that don't need internet access:

🔷 Zigbee

Low-power mesh protocol operating at 2.4 GHz. Each mains-powered Zigbee device acts as a repeater, so your network gets more reliable the more devices you add. Used by Philips Hue, IKEA Trådfri, Aqara, and hundreds of others. Range: ~10–30m per hop, up to 65,000 devices theoretically, practically unlimited for a home. Requires a USB coordinator dongle on the Pi.

🔸 Z-Wave

Sub-GHz mesh (908 MHz US, 868 MHz EU) — doesn't interfere with Wi-Fi. Longer range per hop than Zigbee (~30–50m), fewer devices on the market, but generally better build quality and strict certification requirements. Z-Wave devices tend to be more expensive but more reliable. Requires a Z-Wave USB stick.

🔶 MQTT

Not a radio protocol — a lightweight publish/subscribe messaging protocol that runs over Wi-Fi or Ethernet. This is the nervous system. A sensor publishes kitchen/temperature = 21.5 to a broker (Mosquitto, running on the Pi). Anything subscribed to that topic — Home Assistant, Node-RED, a dashboard — receives it instantly. MQTT is why heterogeneous devices can talk to each other without caring about brand.

🔵 ESPHome

Firmware framework for ESP32/ESP8266 microcontrollers. You write a YAML configuration file declaring what the device is (temperature sensor, relay controller, LED strip driver), flash it over USB once, and from then on it integrates natively with Home Assistant over Wi-Fi. No Arduino IDE, no C++ — just YAML and OTA updates. A $3 ESP32 board becomes a fully integrated smart home device in about 15 minutes.

Getting Started — Home Assistant on Pi 5

Home Assistant has four installation methods. For a Pi 5, use Home Assistant OS (HAOS) — it's a full OS image that boots directly, manages add-ons through a supervisor, and handles updates as atomic snapshots. You sacrifice using the Pi for other things simultaneously, but for a dedicated smart home hub, the reliability is worth it.

Raspberry Pi Imager — HAOS install
# Method 1: Raspberry Pi Imager (recommended)
# Open Raspberry Pi Imager on your desktop
# Choose Device: Raspberry Pi 5
# Choose OS: Other specific-purpose OS > Home assistants and home automation > Home Assistant
# Choose Storage: Your SSD (not SD card — HA writes heavily)
Write, boot the Pi, wait ~5 minutes for first initialization.

# Method 2: Direct download + dd
wget https://github.com/home-assistant/operating-system/releases/latest/download/haos_rpi5-64.img.xz
xz -d haos_rpi5-64.img.xz
sudo dd if=haos_rpi5-64.img of=/dev/sda bs=4M status=progress

# After first boot, access at:
http://homeassistant.local:8123
# Or find the IP: check your router's DHCP table, or use:
avahi-browse -rt _home-assistant._tcp

Initial setup takes about 20 minutes. Home Assistant will detect some devices automatically — anything on your network with mDNS/DLNA/UPnP — but the real work starts when you add the radio coordinators.

The Radios — How Devices Talk to Your Pi

ProtocolCoordinator HardwareApprox. Cost
ZigbeeSONOFF Zigbee 3.0 USB Dongle Plus (CC2652P) or SMLIGHT SLZB-06 (PoE, recommended for placement flexibility)$15–35
Z-WaveZooz 800 Series Z-Wave USB Stick (ZST39) or Aeotec Z-Stick 7$30–45
BluetoothBuilt-in Pi 5 Bluetooth 5.0 (adequate for BLE sensors) or external long-range adapter$0–15
Thread/MatterSONOFF ZBDongle-E (EFR32MG21, multiprotocol) or Home Assistant SkyConnect$20–30

★ Dongle Placement Matters

Zigbee and Z-Wave coordinators should be on USB extension cables (at least 1m), not plugged directly into the Pi. The Pi 5's USB 3.0 ports generate 2.4 GHz noise that directly interferes with Zigbee. A $3 USB 2.0 extension cable moves the coordinator away from the interference and improves mesh reliability by 30–50%. If using the SMLIGHT SLZB-06 (PoE), you can place it centrally in the house — ideal for mesh coverage — while the Pi lives in a closet.

Building Your First Local-Only Light System

Consumer smart bulbs (Philips Hue, LIFX, etc.) all come with some cloud tie-in. But Zigbee bulbs can be paired directly to your local coordinator without the manufacturer's hub:

  1. Install the Zigbee2MQTT add-on in Home Assistant (Settings > Add-ons > Add-on Store). This replaces the manufacturer's gateway entirely — it speaks directly to the Zigbee coordinator and translates device messages into MQTT.
  2. Factory-reset a Zigbee bulb (usually: power cycle 5–6 times until it blinks).
  3. In Zigbee2MQTT, click "Permit Join (All)." The bulb appears within 30 seconds.
  4. It's now a local-only entity in Home Assistant. Create automations, add it to dashboards, group it with other lights — no cloud involved.
Zigbee2MQTT add-on configuration
# In the Zigbee2MQTT add-on configuration, set:
data_path: /config/zigbee2mqtt
socat:
enabled: false
mqtt:
server: mqtt://localhost:1883
base_topic: zigbee2mqtt
serial:
port: /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus-if00
adapter: zstack

# Find your coordinator's device path:
ls -la /dev/serial/by-id/
# Each coordinator has a unique ID — use that, not /dev/ttyUSB0

⚠️ The Tuya/Smart Life Trap

Many cheap smart plugs and bulbs sold on Amazon use Tuya's platform. Out of the box, they require the Tuya/Smart Life cloud app. However, many Tuya devices use an ESP8266 or BK7231T chip that can be reflashed with ESPHome or OpenBeken — converting them from cloud-dependent to fully local. The tuya-cloudcutter tool can flash some devices over-the-air without opening the case. Check the Blakadder device database before buying to confirm local compatibility.

DIY Sensors with ESPHome — $5 Temperature/Humidity Nodes

Commercial smart sensors (Aqara, Eve, etc.) cost $15–40 each. A DIY ESP32 + BME280 sensor on a breakout board costs under $5 and gives you the same data, locally, with no brand lock-in. Here's the full build:

ESPHome — D1 Mini + BME280 temperature/humidity/pressure sensor
# Install ESPHome add-on via Home Assistant > Add-ons
# Create new device: ESPHome > New Device > Continue

# configuration.yaml for the node:
esphome:
name: living-room-sensor
friendly_name: Living Room Environment

esp32:
board: esp32dev
framework:
type: arduino

i2c:
sda: GPIO21
scl: GPIO22
scan: true

sensor:
- platform: bme280
temperature:
name: "Living Room Temperature"
humidity:
name: "Living Room Humidity"
pressure:
name: "Living Room Pressure"
address: 0x76
update_interval: 60s

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

# Flash via USB once, then OTA updates forever

BOM (bill of materials) for one sensor node:

PartModelCost
MicrocontrollerWemos D1 Mini (ESP32) or ESP32-C3 Super Mini$2–4
SensorBME280 breakout board (I²C, 3.3V)$1.50–3
PowerMicro USB cable + old phone charger$0 (salvaged)
Enclosure3D-printed or small project box$1

Total: ~$6 per room. Deploy five of these around the house for less than the cost of two Aqara sensors. ESPHome also supports PIR motion sensors (HC-SR501, $1.50), door/window reed switches (50¢), lux sensors (BH1750, $2), VOC/eCO2 sensors (SGP30, $8), and mmWave presence detectors (LD2410, $5) — detecting actual human presence through walls, not just motion.

Voice Control — Yes, Offline

The number-one reason people cling to Alexa and Google Home is voice control. But Home Assistant's voice pipeline has matured dramatically. The stack:

  • Wake word detection: microWakeWord (runs on the Pi's CPU, <2% utilization) or openWakeWord. Custom wake words are trainable.
  • Speech-to-text: Whisper — can run locally on the Pi via the whisper-local add-on, or accelerated on a Hailo-8L NPU (see our Hailo guide) for near-realtime transcription. The medium model gives excellent accuracy for smart home commands.
  • Intent processing: Home Assistant's built-in conversation agent (no LLM needed for basic commands — "turn off kitchen lights" is pattern-matched, not AI-generated). For natural-language commands, a local LLM via Ollama (qwen2.5:3b or llama3.2:3b) running on the same Pi or a secondary Pi gives ChatGPT-like flexibility with zero cloud calls.
  • Text-to-speech: Piper — high-quality neural TTS with <100ms latency on a Pi 5. Over 100 voices across 30 languages.
Voice pipeline — hardware shopping list
# Minimum: a USB microphone/speaker combo
A $15 USB conference speakerphone (Jabra Speak 410 used on eBay) works perfectly.

# Better: distributed voice satellites
ESP32-S3 "Box" or "Wireless Tag" — $10–15, runs ESPHome
Has onboard mic + speaker, connects to HA via Wi-Fi
Wake word runs on-device, audio streamed to Pi for STT

# Best: dedicated voice hardware
Seeed Studio Respeaker Lite — $20, i2s mic array
Home Assistant Voice Preview Edition — $59, purpose-built, plug-and-play
Both are fully local with zero cloud processing

★ The "Privacy Moment" Test

Here's how you know your voice assistant is truly local: disconnect your internet, then say "turn on the living room lights." If the lights turn on, you own your assistant. If not, you're renting permission from a data center. Every commercial smart speaker fails this test by design. A properly configured Home Assistant voice pipeline passes it every time.

Automations That Actually Help

Home Assistant's automation engine is event-driven: triggers (time, state change, sensor threshold), conditions (only if someone's home, only during daylight), and actions (turn on lights, send notification, call a script). Beyond the obvious "motion sensor turns on light," here are automations that justify the entire project:

Arrive / Leave Home

The Pi monitors which devices are connected to your Wi-Fi. When your phone disconnects for more than 5 minutes: turn off all lights, arm security sensors, set thermostat to eco mode, and close smart blinds. When it reappears: reverse all of that. No geofencing app, no GPS tracking — just "is the phone on the local network?"

Laundry Finished

A $10 vibration sensor (Aqara, or ESP32 + SW-420) stuck to the washing machine. Home Assistant learns the vibration pattern: it spikes during spin cycle, then drops to zero for 2+ minutes. That's the trigger — send a notification to phones, announce over speakers, flash a smart bulb. No "smart" washer required.

Bedtime Lockdown

At 11pm (or triggered by a bedside button): verify all exterior doors are locked (Z-Wave/Zigbee door sensors), garage is closed, thermostat is set to night mode, all lights except bedroom lamps turn off. If any door reports "open," announce specifically which one over the bedroom speaker instead of a generic warning.

Leak Detection

Zigbee water leak sensors (Aqara, ~$18) or DIY ESP32 + water detection PCB traces placed under sinks, washing machines, and water heaters. On detection: cut power to the washing machine via a smart plug, shut off a motorized water valve (Z-Wave, ~$40), and sound every alarm. A $60 investment against a $5,000+ flood damage claim.

Node-RED — Visual Automation Programming

For automations more complex than "if X then Y," Home Assistant has Node-RED as an add-on. It's a flow-based visual programming tool where you drag nodes onto a canvas and wire them together:

Node-RED example — smart heating with presence
[Every 5min timer] ─── [Check: anyone home?] ──┬── yes ── [Room temp < target?] ── [Turn on heat]
└── no ── [All thermostats to ECO]

# Combine inputs in ways simple triggers can't:
"If living room temp drops below 19°C AND a phone is home AND it's
between 6am–10pm AND electricity price is below 15¢/kWh, then boost heating 2°C."

Electricity price node: pulls from local Tibber/Awattar API (or static config).
All decision logic runs locally — no if-this-then-that cloud service.

Remote Access — Without Cloud

The one legitimate use case for cloud is remote access. You're not home, you want to check if you left the garage open. Two fully local solutions:

  1. Tailscale (easiest): Free for personal use. Install on the Pi and on your phone — creates a WireGuard mesh VPN. You access Home Assistant at http://homeassistant:8123 from anywhere as if you were on your home network. No port forwarding, no dynamic DNS. Tailscale's coordination server is technically "cloud," but it relays only encrypted WireGuard handshake metadata — device traffic is direct P2P and never touches their servers. If Tailscale disappears tomorrow, you switch to straight WireGuard with zero hardware changes.
  2. WireGuard VPN (pure local): Install the WireGuard add-on in Home Assistant. Port-forward a single UDP port. Connect your phone's WireGuard client to your home IP. This is the zero-third-party option, but requires a static IP or dynamic DNS.

★ Nabu Casa — The Ethical Cloud Option

Home Assistant's parent company, Nabu Casa, offers a $6.50/month remote access service. The revenue directly funds Home Assistant development (it's the project's primary funding source). If you need easy remote access and want to support open-source smart home development, this is the ethical choice — and their privacy policy explicitly states they don't store or mine your data. But it's optional. The system works identically without it.

Dashboards That Non-Technical Household Members Can Use

A smart home that requires an engineering degree to operate is a failed project. Home Assistant's dashboard system lets you build room-by-room control panels that pass the "grandparent test":

  • Tablet wall mount: Repurpose an old Android tablet or Fire HD ($30 used), install Fully Kiosk Browser ($8 one-time), mount on the wall with a 3D-printed bracket. Displays a full-screen Home Assistant dashboard. Use the tablet's camera as a motion sensor — it wakes the screen when someone approaches.
  • Per-room dashboards: Each room's view shows only what's relevant to that room: a bedroom dashboard has lights, blinds, and morning alarm; a kitchen dashboard has timers, shopping list, and energy monitoring.
  • Physical buttons: Not everything needs a screen. Zigbee buttons (IKEA TRÅDFRI shortcut button, $7; Aqara Mini Switch, $10) placed on nightstands and walls give tactile control for the most common actions. Double-tap the bedside button = "goodnight" automation. Press the kitchen button = "cooking scene."

The Full Hardware Map — Starter Kit vs. Advanced

ComponentStarter KitAdvanced
HubPi 5 4GB + 128GB NVMe SSD in USB enclosurePi 5 8GB + 512GB NVMe HAT
Zigbee CoordinatorSONOFF Dongle Plus (CC2652P)SMLIGHT SLZB-06 (PoE, central placement)
Z-Wave Coordinator— (start without it)Zooz ZST39 800 Series
Lights4× IKEA TRÅDFRI Zigbee bulbsInovelli Blue Series (Zigbee, scene control, power monitoring per bulb)
Sensors2× Aqara temp/humidity, 2× Aqara door/window5× ESPHome DIY nodes, mmWave presence sensors, CO2/VOC
VoiceUSB speakerphone (used Jabra)HA Voice PE + 2× ESP32-S3 satellites
Buttons2× IKEA shortcut buttonsZigbee scene controllers + NFC tags
Remote AccessTailscale (free)WireGuard + domain + static IP

Starter Kit total: ~$200–250 (including Pi). Advanced: ~$500–700. Compare to a professionally installed Control4 or Crestron system at $5,000–15,000 + annual maintenance contracts. The local-only Pi approach gives you more capability, more privacy, and zero recurring fees — for the cost of parts that are commodity, replaceable, and not dependent on any single vendor's survival.

Backup & Disaster Recovery

Your smart home configuration represents dozens of hours of tuning. Protect it:

Home Assistant automated backup to network storage
# Install the "Samba Backup" or "Google Drive Backup" add-on
# For fully local backup to a NAS or another Pi:
Samba Backup add-on config:
host: 192.168.1.100
share: homeassistant-backups
username: backup-user
keep_days: 30

# Schedule: daily at 3am
Every backup includes: full config, all add-on data, Zigbee2MQTT network
key, Home Assistant Core settings, and the entire /config directory.

Restore from backup on a fresh Pi: flash HAOS, upload backup during onboarding
- everything back to exactly how it was in ~15 minutes.

The No-Cloud Guarantee Checklist

★ When You Can Cut the WAN Cable

☐ All devices pair directly to a local coordinator (Zigbee/Z-Wave), not through a manufacturer hub
☐ Home Assistant OS runs from SSD with regular automated backups
☐ All automations trigger without internet (test: disconnect WAN, walk through every room)
☐ Voice control works with WAN disconnected (Whisper + Piper + openWakeWord, all local)
☐ Remote access uses Tailscale or WireGuard — no manufacturer cloud relay
☐ No Tuya/Smart Life cloud accounts required for any device (check Blakadder database)
☐ Energy monitoring and dashboards populate from local MQTT, not cloud polling
☐ Each family member has a dashboard they can use without asking "how do I..."
☐ The Pi's firewall blocks outbound connections from smart devices to WAN (they shouldn't phone home)

⚠️ What You Give Up

Local-only means no Alexa/Google Home integration (those ecosystems are cloud-native by design). It means some commercial devices (Ring, Nest, Blink, Arlo, Eufy without RTSP mode) won't work at all without their cloud apps. It means you'll spend more time initial setup than you would with an out-of-the-box solution. And it means when something breaks, troubleshooting is on you — there's no 1-800 support line. The trade-off: your smart home still works in 2036 regardless of which companies have pivoted, been acquired, or shut down. I consider that a feature.

A note for when you're three hours in and nothing's working: Home Assistant has a learning curve that can feel like a wall. You'll hit a YAML indentation error, or a device won't show up, or an automation silently fails. It happens to everyone. The difference between giving up and succeeding isn't talent — it's willingness to read one more log file and try one more thing. That feeling of "this should be easier" is valid. It's also temporary.

Further Reading in the TechLounge

← Back to Guides

Join the conversation.

Running Home Assistant locally? Share your setup, favorite automations, and the one device you wish you'd never bought.