Below is a proposed plan for a whole-house smart home control system based on Home Assistant, covering Zigbee device integration, multi-scene automation, compatibility with old and new devices, and more. The plan is divided into modules such as hardware selection, system architecture, scene design, and automation logic, and includes schematic diagrams.
一、System Architecture Diagram

二、 Hardware Selection List
1. Core Control Devices
Type | Model | Function Description |
---|---|---|
Smart Host | Raspberry Pi 4B or X86 Mini PC | Installs Home Assistant OS |
Zigbee Gateway | Sonoff Zigbee 3.0 USB Dongle / Wired Gateway Zigbee (Silicon Labs EFR32MG21) | Supports ZHA/Z2M protocols, strong compatibility |
Backup Gateway | Xiaomi Multi-mode Gateway 2 | Compatible with Mi Home devices (Optional) |
2. Zigbee Sensors and Actuators
Type | Model | Features |
---|---|---|
Occupancy Sensor | Tuya Human Body Sensor | Light + Human Body Dual Detection, Low Power Consumption |
Temperature & Humidity Sensor | Tuya Temp & Humidity | Zigbee 3.0, Battery Powered |
Smart Switch | Tuya Single Wire / Live Wire Switch | Zigbee 3.0 Supports Local Control, Compatible with Old Light Fixtures |
Curtain Motor | Tuya Curtain Motor | Zigbee Protocol, Silent Design |
Door/Window Sensor | Tuya Zigbee Door/Window Magnet | Ultra-long Battery Life, False Alarm Prevention |
Smart RGB Light | Tuya RGBCW RGB Light | Zigbee 3.0, Controllable Color and Brightness |
LED Strip | Bluetooth LED Controller | Bluetooth BLE |
Speaker | Xiaomi Speaker Pro / Xiaodu Speaker / | Xiao Ai voice assistant, integrated via Bemfa Cloud into HomeAssistant |
3. Legacy Device Integration Solutions
Device Type | Integration Method | Adapter/Integration |
---|---|---|
Infrared Air Conditioner 1 | Infrared to Zigbee | Broadlink RM4 Pro + Zigbee Bridge |
Infrared Air Conditioner 2 | Dian Xiaoku AC Companion | WiFi Communication, Power & Energy Collection |
Wi-Fi Plug | Local Protocol Integration | TP-Link Kasa Integration (Native HA Support) |
Bluetooth Thermostat | Bluetooth Proxy | ESP32 Bluetooth Relay |
三、 Zigbee Network Deployment
- Topology
- The main gateway is directly connected to the Home Assistant host via USB.
- Wired Zigbee gateways are connected to the Home Assistant host via a switch and integrated via Z2M.
- Deploy at least 1 Zigbee device with routing capabilities (such as smart plugs, constantly powered devices) in each room.
- Use Zigbee2MQTT to manage the network topology (supports OTA upgrades, signal strength optimization).
- Channel Planning
- Zigbee Channel: Select channel 25 (2.485GHz) which does not overlap with Wi-Fi channels.
- Power Setting: Adjust the gateway transmission power to 20dBm (coverage radius approximately 30 meters).
四、 Home Assistant Configuration Steps
1. Installation and Integration
yaml
# Example: Zigbee2MQTT configuration (configuration.yaml)
zigbee2mqtt:
serial:
port: /dev/ttyUSB0
frontend: true
advanced:
log_level: debug
2. Device Pairing
- Add devices through the Zigbee2MQTT console.
- Use permit_join mode for bulk pairing.
- Rename device IDs (e.g., living_room_light).
五、 Scene and Automation Design
1. Basic Scene Templates
Scene Name | Trigger Conditions | Actions |
---|---|---|
Home Mode | Door/Window Sensor Open + Occupancy Detection | Turn on entrance light, disable security, play welcome voice message |
Sleep Mode | Voice Command / 22:00 Schedule | Turn off all house lights, set AC to 26℃, turn on night light |
Movie Mode | TV Infrared Signal Trigger | Dim lights, close curtains, mute smart speaker |
Away Mode | Door Lock Double-Locked + Phone GPS Leaving | Activate security cameras, turn off non-essential appliances |
2. Advanced Automation Example (YAML)
yaml
# Temperature联动 Air Conditioner (Legacy Infrared Device)
alias: "Living Room High Temperature Auto AC On"
trigger:
- platform: numeric_state
entity_id: sensor.living_room_temperature
above: 28
condition:
- condition: state
entity_id: binary_sensor.living_room_occupancy
state: "on"
action:
- service: remote.send_command
target:
entity_id: remote.broadlink_ir
data:
command: "b64:JgBQAAABKpITEhMSEhITEhMSExITEhMSExITEhMSExITEhMSExITEhMSExITEhMSExITEhMSExITEhMSExI="
六、 Legacy Device Integration Solutions
Infrared Devices
- Use Broadlink RM4 Pro Infrared Remote + Node-RED for infrared code learning.
- Forward commands to Home Assistant via MQTT.
Wi-Fi Devices
- Enable local control protocols (e.g., python-kasa library for TP-Link Kasa).
- Disable cloud services to improve responsiveness.
七、 System Optimization Recommendations
- Network Isolation
- Create a separate VLAN for IoT devices.
- Minimize Zigbee/Wi-Fi frequency interference (use Wi-Fi analysis tools for optimization).
- Backup Strategy
- Regularly export Home Assistant snapshots to NAS.
- Use Git to manage configuration file versions.
八、 Budget Estimation
Category | Quantity | Unit Price (Yuan) | Subtotal (Yuan) |
---|---|---|---|
Zigbee Gateway | 2 | ||
Sensor Set | 18 | ||
Smart Switch | 12 | ||
Bridging Device | 5 | ||
Total | - |
九、 Diagram Examples
1. Zigbee Network Topology Diagram
Home Assistant Control Panel
HA-UI
For more detailed configuration code or device selection suggestions, please provide a specific room floor plan for further customized solutions.