Introduction
When we talk about smart homes, the first image that comes to my mind is Tony Stark’s futuristic house — an intelligent assistant that controls every appliance: turning on the lights when I come home and even boiling water at the exact time I like.
However, my own home setup is far less advanced. I still have to flip light switches manually; there’s not even a basic remote control function. Ironically, I work in the smart home field!
My interest in this area started in college. For my final-year project, I built a Zigbee-based switch that could be controlled via smartphone. However, the system only worked over Bluetooth, meaning there was no true remote control.
After graduation, I continued designing smart home systems at work. Last year, a friend introduced me to Home Assistant, and since then, I’ve been learning and experimenting with it. Now, I’m excited to share my experience and the small demos I’ve built along the way.
1. What is Home Assistant?
Home Assistant is an open-source platform designed to help you automate and control smart devices within your home.
If you’re new to it, I highly recommend this article: [What is Home Assistant and What Can It Do?]
2. Setting Up Home Assistant
2.1 Installing Home Assistant
For installation, I followed a detailed guide: Installing Home Assistant on Raspberry Pi or Orange Pi.
2.2 Installing HACS
To extend Home Assistant’s functionality, you’ll need HACS (Home Assistant Community Store). I referred to [chln’s guide: “>span class="16">”] which clearly explains each step.
2.3 Setting Up MQTT Integration
Navigate to Settings → Devices & Services → Add Integration, and choose MQTT.
Since MQTT requires a broker (server), I used our company’s remote MQTT service. If you’d like to set up your own, check out:
“Deploying an Open-Source MQTT Broker (EMQX) on Raspberry Pi.” (around ¥99 per year):
https://www.aliyun.com/benefit/waitou/V2
2.4.1 Setting up FRP (Fast Reverse Proxy)
I used FRP for tunneling my local network to the public internet. The guide I followed was:
“Using FRP for Home Assistant Remote Access.”
However, I used the latest version v0.57.0, which requires .toml configuration files.
Example Configuration
On the Server (frps.toml): bindPort = 8120 On the Home Assistant Device (frpc.toml): serverAddr = "Your_Public_IP"serverPort = 8120 [[proxies]]name = "ssh"type = "tcp"localIP = "127.0.0.1"localPort = 22remotePort = 8122 [[proxies]]name = "homeassistant"type = "tcp"localIP = "127.0.0.1"localPort = 8123remotePort = 8123
Don’t forget to open the relevant ports in your cloud server’s Security Group Settings.
2.4.2 Running FRP
On your cloud server:
./frps -c ./frps.toml
On your Home Assistant device:
./frpc -c ./frpc.toml
2.4.3 Running FRP in the Background
FRP needs to stay active at all times. If you close the terminal, the connection stops. The best practice is to set FRP as a system service. You can follow this helpful guide:
“FRP for Internal Network Penetration: Access Local Services via Domain.”
3. Customizing the Home Assistant Dashboard
The Overview page in Home Assistant (Dashboard) shows your device states and controls. By default, it’s simple and doesn’t allow much customization. To create a personalized layout, switch to Custom Mode.
- Go to the “Overview” tab.
- Click the three-dot menu → Edit Dashboard.
- In the next window, select the menu again → Take Control.
- Choose Start with an empty dashboard if desired, then edit freely.
Once done, you can add cards, organize your layout, and make your interface truly yours.
That’s all for this chapter. In the next post, I’ll share how I integrated different smart devices with Home Assistant — including setup tips and automation examples.
Ai-Thinker