Skip to main content

Self-Host Home Assistant: Smart Home Automation 2026

·OSSAlt Team
home-assistantsmart-homeiotautomationself-hostingdocker2026

TL;DR

Home Assistant (Apache 2.0, ~70K GitHub stars, Python) is the most comprehensive self-hosted smart home platform. It integrates 3,000+ devices and services — from Philips Hue lights to Tesla cars — into a single local hub with automations, dashboards, and energy monitoring. SmartThings and Apple Home are walled gardens. Home Assistant is local-first: your automations run without internet, your data stays on your network, and you're not locked into any ecosystem.

Key Takeaways

  • Home Assistant: Apache 2.0, ~70K stars — 3000+ integrations, runs 100% locally
  • HAOS vs Docker: HAOS (Home Assistant OS) has add-ons; Docker is more flexible
  • Automations: Trigger → condition → action, with visual editor and YAML
  • Dashboards: Fully customizable Lovelace UI with cards and views
  • Energy monitoring: Track home electricity usage, solar, and EV charging
  • Voice: Works with local Whisper/Piper (100% private) or Google/Alexa

Home Assistant OS vs Docker

HAOSDocker
SetupEasierMore control
Add-onsYes (500+ curated)Use separate containers
SupervisedYesNo
Updates1-clickManual docker compose pull
Best forDedicated Pi/NUCExisting homelab server
# For Raspberry Pi 4:
# 1. Download HAOS image from home-assistant.io/installation
# 2. Flash to SD card with Raspberry Pi Imager
# 3. Boot Pi → browse to http://homeassistant.local:8123

Part 1: Docker Setup

# docker-compose.yml
services:
  homeassistant:
    image: ghcr.io/home-assistant/home-assistant:stable
    container_name: homeassistant
    restart: unless-stopped
    privileged: true
    network_mode: host   # Required for mDNS/SSDP device discovery
    volumes:
      - homeassistant_config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro   # Bluetooth access
    environment:
      TZ: America/Los_Angeles

volumes:
  homeassistant_config:
docker compose up -d

Visit http://your-server:8123 → create account on first visit.


Part 2: HTTPS with Caddy

ha.yourdomain.com {
    reverse_proxy localhost:8123
}

Also add to configuration.yaml:

# configuration.yaml
http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1
    - ::1

Part 3: Adding Integrations

Auto-discovered integrations

Home Assistant automatically discovers devices on your network:

  • Settings → Devices & Services → shows discovered devices

Click any discovered device → Add → enter credentials if needed.

Manual integration setup

  1. Settings → Devices & Services → + Add Integration
  2. Search for your device/service
  3. Common integrations:
IntegrationWhat it does
Philips HueHue bridge, lights, switches
MQTTGeneric IoT devices, Zigbee via Zigbee2MQTT
Z-Wave JSZ-Wave devices via USB stick
Google CastChromecast, Google Home speakers
SonosSonos speakers
NestNest thermostats, cameras
TeslaTesla car, charging, location
WLEDLED strips
ESPHomeDIY ESP32/ESP8266 devices
TasmotaSonoff/Tasmota devices

Part 4: Automations

Automations: trigger → condition → action

Example: Turn on porch light at sunset

# Settings → Automations → + Create automation → Edit in YAML:
alias: "Porch light on at sunset"
trigger:
  - platform: sun
    event: sunset
    offset: "-00:30:00"  # 30 min before sunset
condition:
  - condition: state
    entity_id: person.your_name
    state: home
action:
  - service: light.turn_on
    target:
      entity_id: light.porch
    data:
      brightness: 150
      color_temp: 4000

Example: Motion-activated lights with timeout

alias: "Hallway motion light"
trigger:
  - platform: state
    entity_id: binary_sensor.hallway_motion
    to: "on"
action:
  - service: light.turn_on
    target:
      entity_id: light.hallway
  - delay: "00:05:00"
  - condition: state
    entity_id: binary_sensor.hallway_motion
    state: "off"
  - service: light.turn_off
    target:
      entity_id: light.hallway

Example: Notify when laundry is done

alias: "Laundry done notification"
trigger:
  - platform: state
    entity_id: sensor.washer_power
    # When power drops below 5W after being high (washer finished)
condition:
  - condition: numeric_state
    entity_id: sensor.washer_power
    below: 5
  - condition: template
    value_template: >
      {{ (now() - states.sensor.washer_power.last_changed).seconds > 300 }}
action:
  - service: notify.mobile_app_phone
    data:
      message: "Laundry is done!"

Part 5: Dashboards (Lovelace)

Create a dashboard

  1. Settings → Dashboards → + Add dashboard
  2. Choose layout: Sidebar / Panel

Common cards

# Entities card — show multiple entities:
type: entities
title: Living Room
entities:
  - entity: light.living_room
  - entity: climate.living_room
  - entity: media_player.tv

# Gauge card — show a sensor value:
type: gauge
entity: sensor.outdoor_temperature
min: -20
max: 50
unit: °C

# Energy card — home energy monitoring:
type: energy-distribution
title: Energy

# Button card — trigger an action:
type: button
entity: script.movie_mode
name: Movie Mode
icon: mdi:movie

Part 6: Zigbee/Z-Wave Devices

Zigbee via Zigbee2MQTT

# Add to docker-compose.yml:
services:
  mosquitto:   # MQTT broker
    image: eclipse-mosquitto:latest
    ports:
      - "1883:1883"
    volumes:
      - mosquitto_config:/mosquitto/config
      - mosquitto_data:/mosquitto/data

  zigbee2mqtt:
    image: koenkk/zigbee2mqtt:latest
    restart: unless-stopped
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0  # Your Zigbee USB stick
    volumes:
      - zigbee2mqtt_data:/app/data
    environment:
      TZ: America/Los_Angeles

In Home Assistant → Settings → Devices → MQTT → + Add integration

Pair a Zigbee device

  1. Zigbee2MQTT → Permit join (All) (starts 60-second pairing window)
  2. Put your Zigbee device in pairing mode (usually hold button 5 seconds)
  3. Device appears in Zigbee2MQTT → automatically shows in Home Assistant

Part 7: Voice Assistant (100% Local)

With Whisper + Piper, all voice processing is on your hardware:

# Via HAOS Add-ons (easiest):
# Settings → Add-ons → + Add-on store:
# Install: "Whisper" (speech-to-text)
# Install: "Piper" (text-to-speech)
# Install: "openWakeWord" (wake word: "Hey Jarvis")

# Configure in Settings → Voice assistants → + Add assistant:
# Wake word: openWakeWord
# Speech-to-text: Whisper
# Conversation agent: Home Assistant
# Text-to-speech: Piper

Part 8: Energy Monitoring

Home Assistant has a built-in energy dashboard:

  1. Settings → Energy → configure your meters
  2. Electricity grid (if you have a smart meter)
  3. Solar production (if you have solar panels)
  4. Individual device monitoring (smart plugs with energy monitoring)
  5. Battery storage (if you have a home battery)

Energy-monitoring devices that work well:

  • Shelly 1PM / Shelly EM — clamp on your main panel
  • TP-Link Kasa EP25 — smart plug with energy monitoring
  • SMETS2 smart meter (UK) — direct MQTT integration

Maintenance

# Update (Docker):
docker compose pull
docker compose up -d

# Backup:
tar -czf ha-backup-$(date +%Y%m%d).tar.gz \
  $(docker volume inspect homeassistant_homeassistant_config --format '{{.Mountpoint}}')

# Logs:
docker compose logs -f homeassistant

# Check HA version:
docker exec homeassistant python -c "import homeassistant; print(homeassistant.__version__)"

See all open source smart home tools at OSSAlt.com/categories/smart-home.

Comments