Journal

Using Raspberry Pi to Build a Smart Home with Home Assistant: Maximize Efficiency with Add-ons and Automation

ใช้ Raspberry Pi สร้างบ้านอัจฉริยะด้วย Home Assistant: เพิ่มประสิทธิภาพด้วย Add-on และ Automation

May 16, 2026 · 2 min read
Using Raspberry Pi to Build a Smart Home with Home Assistant: Maximize Efficiency with Add-ons and Automation

Why Raspberry Pi + Home Assistant Is the Best Combination

Pairing a Raspberry Pi 5 with Home Assistant OS creates a smart home platform that supports unlimited devices, operates fully locally without cloud dependency, has no monthly subscription fee, and extends through 200+ official add-ons and 1,500+ HACS community extensions.

Essential Add-ons to Install Immediately

Zigbee2MQTT converts a Zigbee USB dongle (Sonoff Zigbee 3.0, ConBee III) into an MQTT broker, enabling Home Assistant to support thousands of Zigbee devices. Installation is done directly through Settings > Add-ons > Add-on Store.

Frigate NVR is an AI-powered camera system that runs efficiently on Raspberry Pi 5. It supports Google Coral TPU (USB or PCIe) for real-time object detection, handles multiple RTSP camera streams, and sends alerts only for person detection — dramatically reducing false alarms.

Node-RED is a flow-based programming tool for building complex automations without writing code directly. It connects to Home Assistant via MQTT and HTTP API, and integrates with LINE Notify, Google Sheets, and external APIs.

ESPHome is a firmware framework for ESP32/ESP8266 microcontrollers, enabling DIY sensors — temperature sensors, door/window sensors, smart switches — at very low cost (ESP32 chips: 60–150 THB each).

Real-World Automations for Thai Homes

Example 1: Welcome home — when a phone's GPS detects Zone Entry, activate entryway lights, turn on air conditioning at 25°C, and send a LINE notification "Welcome home, Tony."

Example 2: Nighttime energy saving — at 23:00 when the living room presence sensor shows no occupancy, turn off all lights and televisions, reduce AC to 28°C, and send a LINE alert.

Example 3: AQI alert — poll the IQAir API every 30 minutes; when PM2.5 exceeds 50 µg/m³, activate the air purifier automatically; when it drops below 25 µg/m³, switch it off.

Scaling the System

Raspberry Pi 5's PCIe 2.0 NVMe SSD support allows storing months of Frigate camera footage without a separate NAS. It also supports Hailo AI Accelerator and Google Coral for higher-accuracy, real-time object classification.

For backup, the Home Assistant Backup add-on sends weekly automated copies to Google Drive, enabling instant restoration if hardware fails.

Free consultation via LINE

Questions & answers

What is the difference between Zigbee2MQTT and ZHA?
ZHA is Home Assistant's built-in Zigbee integration — easier to start with but supports fewer devices. Zigbee2MQTT supports 3,000+ devices and offers deeper configuration. Beginners should start with ZHA, then migrate to Z2M when specific device support is needed.
How much RAM does Frigate NVR need on RPi 5?
Frigate runs well on a 4GB RPi 5 for 2–4 cameras using approximately 1–2 GB of RAM. For more than 4 cameras or intensive AI detection, an 8GB RPi 5 or a Google Coral TPU to offload AI processing is recommended.
How does Node-RED differ from Home Assistant Automation?
HA Automation handles straightforward Trigger > Condition > Action flows efficiently. Node-RED excels for complex automations involving multiple conditions, loops, or integration with external APIs such as LINE Notify or Google Sheets.
Is ESPHome difficult to set up for beginners?
ESPHome is beginner-friendly. It has a web dashboard with setup wizards, and firmware can be flashed directly from a browser without any command-line work. Creating a basic DHT22 temperature and humidity sensor takes about 30 minutes for a first-time user.
What should I do if a Home Assistant update causes problems?
Restore from backup immediately. HA supports rolling back to a previous version through Settings > System > Backups. This is why configuring automatic weekly backups is essential before any updates.

Related reading