Journal

Step-by-Step Guide to Installing Home Assistant on Raspberry Pi 5: From Flash to First Automation

วิธีติดตั้ง Home Assistant บน Raspberry Pi 5 ทีละขั้นตอน: จาก Flash จนถึง Automation แรก

May 16, 2026 · 1 min read
Step-by-Step Guide to Installing Home Assistant on Raspberry Pi 5: From Flash to First Automation

Hardware You Need Before Starting

Prepare the following components before installation:

  • Raspberry Pi 5 (4GB ~2,000 THB, 8GB ~2,800 THB)
  • 128GB NVMe SSD + PCIe HAT+ (strongly recommended over microSD — 5-10x more durable and faster)
  • Official Raspberry Pi 27W USB-C Power Supply (official only, to avoid undervoltage issues)
  • Active Cooling Case (essential in Bangkok's average 30-35°C ambient temperature)
  • Zigbee USB Dongle (Sonoff Zigbee 3.0 Dongle Plus, ~400 THB) for Zigbee devices
  • LAN cable for a stable connection during initial setup

Total hardware cost: approximately 4,000-6,000 THB for a complete Home Assistant Hub.

Step 1: Flash Home Assistant OS

  1. Download Balena Etcher from balena.io/etcher (supports Windows, macOS, Linux)
  2. Download the Home Assistant OS image for Raspberry Pi 5 from home-assistant.io/installation
  3. Open Balena Etcher → select the image file → select your SSD/microSD → click Flash
  4. Insert SSD/microSD into Raspberry Pi 5 → connect LAN cable and Power Supply
  5. Wait approximately 3-5 minutes for the first boot (installation is fully automatic)

Step 2: Initial Setup via Browser

Open a web browser on any device on the same network and navigate to:

The Setup Wizard guides you through:

  1. Creating your Admin User Account
  2. Setting your home name and Location (important for Sunrise/Sunset Automations)
  3. HA automatically scans and lists Auto-discovered Devices on your network

Step 3: Add Zigbee via ZHA Integration

ZHA (Zigbee Home Automation) is Home Assistant's built-in Zigbee integration:

  1. Settings → Devices & Services → Add Integration → search "Zigbee Home Automation"
  2. Select the Serial Port of your Sonoff Dongle (usually /dev/ttyUSB0 or /dev/serial/by-id/...)
  3. ZHA creates your Zigbee network
  4. Pair devices: click "Add Device" then hold the Pair button on your Zigbee device for 3 seconds

Devices with strong ZHA compatibility: Aqara Temperature Sensor, Sonoff ZBMINI, Philips Hue bulbs, IKEA Tradfri

Step 4: Create Your First Automation

Example: Auto-turn on entrance light when motion detected after sunset

  1. Settings → Automations & Scenes → Create Automation
  2. Trigger: Device → PIR Motion Sensor → State = "Motion detected"
  3. Condition: Sun → Sun is below horizon (after sunset)
  4. Action: Device → Smart Bulb → Turn On → Brightness 80%
  5. Save and test by walking past the sensor

Recommended Add-ons for Beginners

From the HA Add-on Store (Settings → Add-ons):

  • File Editor: edit configuration.yaml through the browser
  • Mosquitto Broker: MQTT support for MQTT-based devices
  • Node-RED: build complex automations using visual flow diagrams
  • Frigate: AI Object Detection for CCTV cameras

HappySmart provides complete installation and configuration — Survey → single-day installation → training → 24H Support — getting your RPi5 + Home Assistant running from day one.

Questions & answers

Why use NVMe SSD instead of microSD?
microSD wears out quickly from repeated writes — typically failing in 6-12 months. NVMe SSD lasts 5-10x longer and boots significantly faster.
Is Balena Etcher difficult to use?
Very simple — just 3 steps: select image file, select drive, click Flash. Takes about 5 minutes.
Which Zigbee dongle works best with Home Assistant?
The Sonoff Zigbee 3.0 Dongle Plus is easy to source, costs ~400 THB, and works excellently with both ZHA and Zigbee2MQTT.
How long does the first boot take?
Approximately 5-10 minutes for the first boot and initial setup. Keep the LAN cable connected during this period.
What if I don't have time to install it myself?
HappySmart provides complete installation and configuration in a single day, with 24H support throughout the system's life.

Related reading