Smart Home + Fresh Air System Architecture Overview
A professional Smart Home + Fresh Air System installation requires designing the full architecture before purchasing any equipment. The recommended architecture has five layers: Hardware Layer (RPi5 + Zigbee Coordinator + Network Switch + ERV), Protocol Layer (Zigbee ZHA + Z-Wave JS + Wi-Fi + MQTT), Platform Layer (Home Assistant OS), Service Layer (Node-RED + AppDaemon + Homebridge), and Visualization Layer (Grafana + InfluxDB).
Installing Home Assistant OS on Raspberry Pi 5
Installation follows four steps.
Step 1: Prepare hardware — RPi5 8GB RAM + NVMe SSD 256GB (far superior to MicroSD for I/O endurance) + 5V/5A power supply + a case with active cooling.
Step 2: Flash Home Assistant OS to the SSD using Raspberry Pi Imager. Select the latest HAOS version, configure hostname and SSH key before flashing.
Step 3: Attach the Zigbee Coordinator USB — Sonoff Zigbee 3.0 USB Dongle Plus or HUSBZB-1 (dual Zigbee + Z-Wave). Plug into a USB 3.0 port and configure in ZHA Integration.
Step 4: Configure networking — assign a static IP to RPi5 on your router and create a dedicated IoT VLAN separate from the main network for security.
Installing and Configuring Key Add-ons
Node-RED is a visual programming tool for complex automations. Install via the Home Assistant Add-on Store. Use it to connect the ERV to sensors via Modbus nodes and send LINE Notify alerts when PM2.5 or CO2 thresholds are breached.
AppDaemon is a Python application server for logic too complex for standard automations. It is ideal for ML prediction, such as forecasting that CO2 will exceed 800 ppm in two hours based on trend data from InfluxDB, and activating the ERV preemptively. Train the model on 30 days of historical sensor data.
Homebridge bridges devices that lack native HomeKit support — such as certain ERV models — enabling control from the Apple Home app. This significantly improves usability for iOS users.
MQTT Broker (Mosquitto) provides Pub/Sub communication between all devices. Install via the Add-on Store and configure with User/Password and TLS certificates for security.
Connecting ERV to Home Assistant via Modbus
Most Panasonic and Mitsubishi ERVs include an RS-485 port for Modbus RTU. Connection requires an RS-485 to USB adapter on the RPi5, then configuration through the Home Assistant Modbus Integration.
Example Modbus registers for Panasonic ERV: Register 1 = Power On/Off, Register 2 = Fan Speed (0-3), Register 3 = Current Airflow CMH, Register 40 = Supply Air Temperature, Register 41 = Exhaust Air Temperature. Once connected, automations can control fan speed based on live CO2 and PM2.5 readings.
Setting Up Grafana + InfluxDB for Dashboards
Install the InfluxDB Add-on and create a database named homeassistant with a 365-day retention policy. Install the Grafana Add-on, connect it to InfluxDB, and build dashboards displaying CO2, PM2.5, VOC, temperature, humidity, and energy consumption in real time.
The most useful panels are: Time Series for 24-hour sensor history, Stat Panels for current readings, Gauge for PM2.5 and CO2 levels with color thresholds, and Heatmap for energy consumption patterns.
Testing and Fine-Tuning the System
After full installation, validate with a 30-Day Protocol. Week 1: verify automations fire correctly (ERV activates when CO2 > 800 ppm, purifier runs when PM2.5 > 50 µg/m³). Week 2: adjust thresholds to match actual behavior patterns. Weeks 3-4: analyze data and optimize automation rules for maximum efficiency and comfort.
