Journal

Raspberry Pi Smart Home Setup Guide: Step-by-Step Installation and Real-World Usage

คู่มือสร้างบ้านอัจฉริยะด้วย Raspberry Pi ขั้นตอนติดตั้งและใช้งานจริง

May 16, 2026 · 1 min read
Raspberry Pi Smart Home Setup Guide: Step-by-Step Installation and Real-World Usage

Why Raspberry Pi Is the Best Starting Point for Your Smart Home

Among all smart home hub options, Raspberry Pi remains the best choice for beginners in 2025-2026 for three key reasons:

First, genuinely affordable: RPi 4B (4GB) costs approximately 1,800 THB; RPi 5 (4GB) around 2,500 THB — compared to commercial hubs starting at 5,000-15,000 THB with frequent annual subscription fees.

Second, no device limitations: Home Assistant on Raspberry Pi supports 3,000+ brands — from Xiaomi, Philips Hue, and Hikvision to Daikin and DIY sensors you build yourself.

Third, data stays home: Unlike Google Nest or Amazon Echo Hub where everything flows through the cloud, Raspberry Pi + Home Assistant operates entirely locally.

Equipment to Prepare Before Starting

For a basic smart home installation, you need:

  • Raspberry Pi 4B (4GB) or RPi 5 (4GB/8GB): 4B is sufficient for medium-sized homes; RPi 5 is recommended when adding CCTV cameras or AI add-ons
  • USB SSD or NVMe (RPi 5 via PCIe): 64-128GB — SSD strongly preferred over microSD for durability in 24/7 systems
  • Power supply: USB-C 5V/3A (RPi 4B) or 5V/5A (RPi 5) — use official adapters for stability
  • Zigbee USB Dongle: Sonoff Zigbee 3.0 Dongle Plus (~400 THB) for connecting Zigbee devices

Step 1: Install Home Assistant OS

The easiest and most recommended method is Home Assistant OS — a purpose-built operating system designed specifically for HA:

  1. Download Balena Etcher on your computer
  2. Download the Home Assistant OS Image for RPi4 or RPi5 from home-assistant.io/installation
  3. Insert SSD/microSD via USB adapter into your computer
  4. Open Balena Etcher → select Image → select Drive → click Flash (takes 5-10 minutes)
  5. Remove SSD → insert into RPi → connect LAN cable and power → boot
  6. Wait approximately 5-10 minutes for first boot
  7. Open a browser on any device on the same network and go to http://homeassistant.local:8123

Step 2: Initial Setup and Adding Devices

On first access to Home Assistant:

  1. Create admin account: Set a strong Username and Password
  2. Set home location: Enter your home's GPS coordinates for location-based automations like "turn on AC when arriving home"
  3. Install Zigbee Integration (ZHA): Settings → Devices & Services → Add Integration → search "Zigbee Home Automation" → select USB Dongle
  4. Automatic Discovery: Devices on the same network such as Xiaomi, Philips Hue Bridge, and TP-Link Kasa are detected automatically

Step 3: Build Your Dashboard and First Automation

Dashboard: Overview → Edit Dashboard → add Cards for displaying light status, temperature, CCTV cameras, and whatever else you need.

Starter Automation examples:

  • Turn off all lights when the last person leaves home (using GPS Tracking via HA Companion App)
  • Turn on hallway lights when Motion Sensor detects movement after 8:00 PM
  • Send LINE notification when Door Sensor detects the front door opening while everyone is away

Recommended Add-ons to Install

Home Assistant's Add-on Store extends its capabilities significantly:

  • File Editor: Edit config files directly — essential for advanced customization
  • Mosquitto MQTT Broker: For MQTT-based devices like Sonoff DIY and Tasmota firmware
  • Node-RED: Flow-based automation for complex multi-step workflows beyond the standard Automation Editor
  • Frigate: AI Object Detection from CCTV cameras — RPi 5 required for adequate performance

System Maintenance

A smart home system on RPi requires minimal maintenance:

  • Update HA: Home Assistant releases monthly updates — always keep current for security. Update via Settings → System → Updates
  • Automatic Backup: Schedule backups to Network Storage or Google Drive via Add-on twice monthly
  • Log Review: Check every 2-3 months for integrations with recurring errors

Questions & answers

Should I use Raspberry Pi 4B or 5 for a smart home?
RPi 4B (4GB) is sufficient for homes with 20-30 devices. RPi 5 is recommended when running Frigate AI or more than 4 CCTV cameras, as the PCIe NVMe and faster CPU make a significant difference.
Can I use microSD instead of SSD?
Yes, but not recommended. MicroSD cards typically fail from continuous writes within 6-18 months. A USB SSD costing 300-600 THB is a worthwhile investment for a 24/7 system.
What is the difference between Home Assistant OS and Docker installation?
HA OS is the simplest ready-to-use image with full Add-on Store support. Docker suits users who want to run other services on the same RPi, but some Add-ons may not be available and setup is more complex.
Which Zigbee Dongle works best with Home Assistant?
The Sonoff Zigbee 3.0 USB Dongle Plus (~400 THB) is the most popular choice for beginners, supporting both ZHA and Zigbee2MQTT. For combined Zigbee+Z-Wave, the HUSBZB-1 is recommended.
Is Raspberry Pi expensive to run in terms of electricity?
RPi 4B consumes approximately 3-5 watts; RPi 5 around 4-8 watts — roughly 20-50 THB per month at Thai electricity rates. Negligible cost for a 24/7 system.

Related reading