Advanced Home Assistant: Node-RED, InfluxDB + Grafana, and Local Voice (Assist).
Master advanced Home Assistant architectures: flow-based Node-RED logic, Recorder tuning, long-term telemetry in InfluxDB and Grafana, and 100% local voice control via Wyoming, Whisper, and Piper.
Advanced Home Assistant: Node-RED, InfluxDB + Grafana, and Local Voice (Assist)
Series: Smart Home with Home Assistant — Part 10 of 10 (Series Finale)
Level: Advanced
Reading time: About 28 minutes
Last verified: November 28, 2026 (Home Assistant 2026.11.2)
We have come a long way together. Starting from core local-first philosophy in Part 1, we walked through installation, initial configuration, Zigbee/Thread/Z-Wave radios, DIY ESPHome sensors, automations, dashboards, energy management, and finally security and 3-2-1 backups in Part 9.
With a hardened, reliable foundation in place, you are ready for advanced engineering layers. In this final chapter, we deliver on the three major advanced topics promised earlier in the series, alongside long-term maintainability for large homes:
- Node-RED: Flow-based visual automation and deciding what belongs in Node-RED vs. the native engine
- Recorder Optimization, InfluxDB, and Grafana: Multi-year, high-resolution sensor and energy telemetry without bloating Home Assistant's SQLite database
- 100% Local Voice Control (Home Assistant Assist, Wyoming, Whisper, and Piper): Private voice commands without shipping audio clips to big-tech clouds
- Scaling & Long-Term Maintainability: Reusable Jinja2 template macros, performance hygiene, and a 10-part series wrap-up checklist
The Big Picture: Keep the Core Lean, Offload Specialized Workloads#
Home Assistant's built-in automation engine, Sections dashboards, and SQLite Recorder handle 85–90% of households effortlessly on their own. However, once your home crosses 100+ devices, when you want multi-year second-by-second climate and power charts, or when you deploy local neural speech recognition, separation of concerns keeps your core snappy and reliable:
┌────────────────────────────────────────┐
│ HOME ASSISTANT CORE │
│ Device Layer, State Machine, UI Shell │
└──────┬─────────────────┬───────────────┘
│ │
┌────────────────────▼───┐ ┌─────▼──────────────────────┐
│ NODE-RED │ │ INFLUXDB / POSTGRESQL │
│ Complex Flows & │ │ Long-Term Time-Series DB │
│ External API Logic │ │ ──► GRAFANA │
└────────────────────────┘ └────────────────────────────┘
│
┌────────────────────▼────────────────────────────────────────┐
│ WYOMING LOCAL VOICE PIPELINE │
│ [Satellite Mic] ─► openWakeWord ─► Whisper ─► Assist ─► Piper │
└─────────────────────────────────────────────────────────────┘
In this architecture, Home Assistant remains your single source of truth for device states and core reflexes, while heavy time-series analytics, intricate orchestration flows, and speech models run cleanly in dedicated sidecar Apps or Docker containers.
1. Flow-Based Automation with Node-RED#
In Part 6, we saw how mature Home Assistant's native automation engine has become by 2026. With purpose-specific triggers, graphical Traces, and structured choose / parallel blocks, most everyday rules can be built cleanly without touching YAML.
So why do many experienced engineers still run Node-RED alongside Home Assistant?
Native Automation Engine vs. Node-RED: Choosing the Right Tool
| Use Case | Native Home Assistant Engine | Node-RED |
|---|---|---|
| Motion lighting, window-open HVAC shutoff, basic schedules | Best choice (fast, minimal, zero extra moving parts) | Unnecessary overhead |
| Deep multi-branch state machines (occupancy + tariff + weather + guest flags) | Long nested choose blocks can get hard to read | Highly readable (visual flow canvas) |
| Calling external REST/JSON APIs, transforming payloads, custom JS logic | Awkward in Jinja2 templates | Outstanding (Function nodes + full NPM ecosystem) |
| Rate limiting, debouncing, message queues, sliding-window timers | Requires multiple helper entities and timer objects | Built-in (trigger, delay, rbe filter nodes) |
| Integrating custom TCP sockets, Telegram interactive menus, or external DBs | Often requires custom integrations | Native (thousands of ready community nodes) |
Golden Rule: Keep life-safety and core home reflexes (hallway motion lights, water leak shutoff valves, thermostat cutoffs) inside native Home Assistant automations. That way, even while updating or restarting Node-RED, your home's essential physical behavior never misses a beat. Use Node-RED for complex multi-step decision trees, notification routing, and external API workflows.
Setup and Core Node Architecture
Installing the official Node-RED App on Home Assistant OS (or running nodered/node-red via Docker) links both engines over a low-latency local WebSocket using node-red-contrib-home-assistant-websocket.
Most flows rely on four core Home Assistant node types:
events: stateortrigger: state: Listens in real time for specific entity state transitions.current state/switch: Queries secondary conditions (time of day, occupancy mode, ambient lux) and branches the flow.function/change: Reshapesmsg.payloador applies JavaScript logic cleanly.action(formerlycall service): Dispatcheslight.turn_on,climate.set_temperature, ornotifycommands back to Home Assistant.
Practical Node-RED Example: Smart Laundry & Quiet-Hours Notifier
Suppose your washing machine sits on a power-metering smart plug. Power crossing 15W means a cycle started, yet between rinse and spin the draw pauses at 3W for two minutes. You want to detect true completion (power staying < 5W for 5 consecutive minutes), send an immediate alert only during waking hours (08:00–23:00), queue overnight finishes to notify at 08:30 AM, and finally cut standby power.
While achievable in native YAML using extra helpers, in Node-RED it reads like a clean circuit diagram on a single screen:
[power > 15W] ─► [State: Running] ─► [power < 5W for 5 min] ─► [Time between 08:00–23:00?]
├── Yes ─► [Notify Now]
└── No ─► [Delay until 08:30 ─► Notify]
Node-RED's biggest day-to-day advantage is live visual debugging: timestamps and exact payloads appear directly underneath each node as events flow through the canvas.
Function Nodes, Subflows, and catch Error Handling
When you need custom payload normalization or conditional logic across multiple steps, a short Function node often replaces dozens of lines of fragile Jinja2 templates:
// Node-RED Function node: Normalizes appliance power readings and quiet hours
const watt = Number(msg.payload);
const hour = new Date().getHours();
const quietHours = hour >= 23 || hour < 8;
if (Number.isNaN(watt)) {
return null; // Drop invalid readings cleanly
}
msg.summary = {
powerWatts: watt,
isQuietHours: quietHours,
timestamp: new Date().toISOString()
};
return msg;
Two additional patterns keep large Node-RED canvases clean and dependable:
- Subflows: Wrap reusable logic—such as "Notify immediately during daytime, defer to 08:30 AM overnight"—into a single Subflow node shared across your washer, dryer, dishwasher, and robot vacuum flows.
catchError Nodes: Drop acatchnode wired to a notification action on critical tabs. If an HTTP call or entity action fails, Node-RED alerts your phone immediately instead of silently dropping events.
Node-RED Security and Backup Note
- Inside Home Assistant OS, the Node-RED editor sits behind Home Assistant authentication; additionally set a strong
credentialSecretin your configuration. - If running Node-RED in an external Docker container, generate a dedicated Long-Lived Access Token from your Home Assistant profile and store it securely.
- Your flows live in
flows.json, which is automatically included in standard Home Assistant full backups.
2. Recorder Optimization, InfluxDB, and Grafana#
In Part 8, we noted that Home Assistant keeps your energy history locally. Understanding how Home Assistant splits short-term and long-term data prevents database bloat and unlocks deeper analytics:
- Short-Term States (
statestable): Home Assistant's Recorder stores every raw state change for a rolling retention window (10 days by default) before purging (purge). - Long-Term Statistics (
statisticstable): Sensors carrying a validstate_class(temperature, humidity, kWh energy) are automatically summarized into hourly buckets (mean, min, max) and retained indefinitely.
If you want to answer questions like "What was the exact minute-by-minute temperature curve across all five rooms during last January's cold snap?" or "How many minutes after the boiler fired did the hallway radiator peak?", don't force Home Assistant's SQLite database to hold five years of raw events. Instead, keep Recorder lean and stream high-resolution telemetry into InfluxDB paired with Grafana.
Step 1: Trim Recorder Noise First
Even before adding InfluxDB, tuning recorder: in configuration.yaml makes Home Assistant noticeably snappier and dramatically extends SSD lifespan. Many Zigbee and ESPHome devices emit rapid linkquality, uptime, voltage, and wifi_signal updates every few seconds. Excluding diagnostic chatter routinely cuts database writes by 60–80%:
recorder:
purge_keep_days: 10
commit_interval: 5
exclude:
domains:
- updater
- media_player
entity_globs:
- sensor.*_linkquality
- sensor.*_uptime
- sensor.*_wifi_signal
- sensor.sun_*
Tip: Setting
commit_interval: 5(or higher) batches database writes in memory for a few seconds rather than hammering your storage on every single Zigbee packet—essential for preserving flash endurance on eMMC and budget SSDs.
Step 2: Stream Selected Telemetry to InfluxDB
To build a dedicated time-series warehouse, combine three pieces:
- InfluxDB (InfluxDB v2 deployed as a Home Assistant App or Docker container)
- Home Assistant's built-in
influxdb:integration inconfiguration.yaml - Grafana for dashboards and correlation charts
Golden Rule: Never stream every entity blindly into InfluxDB! Always define an explicit include: allowlist containing only the metrics worth analyzing over years:
influxdb:
api_version: 2
ssl: false
host: 192.168.1.50
port: 8086
token: !secret influxdb_token
organization: "iotonom_home"
bucket: "home_assistant"
tags:
source: ha
tags_attributes:
- friendly_name
include:
entity_globs:
- sensor.*_temperature
- sensor.*_humidity
- sensor.*_co2
- sensor.*_power
- sensor.*_energy
- climate.*
entities:
- binary_sensor.boiler_status
- sensor.ups_battery_charge
With this configuration, every temperature, humidity, CO2, wattage (W), and boiler cycle change is forwarded asynchronously to InfluxDB. Home Assistant stays light with its 10-day rolling Recorder window, while InfluxDB accumulates years of sub-minute precision.
Alternative: PostgreSQL / TimescaleDB and Reclaiming Recorder Space
If you are already comfortable with SQL and prefer writing SQL queries in Grafana over InfluxDB's Flux language, PostgreSQL with TimescaleDB is a strong alternative. Likewise, for massive smart homes (200+ active devices), pointing Home Assistant's recorder: db_url: to an external MariaDB or PostgreSQL server removes SQLite write-locking bottlenecks altogether:
recorder:
db_url: !secret recorder_postgres_url # e.g., postgresql://ha:pass@192.168.1.50/homeassistant
purge_keep_days: 14
For most households, however, keeping SQLite for Recorder plus selective InfluxDB streaming is simpler to back up and maintain. After trimming noisy entities in recorder: exclude:, you can reclaim disk space immediately by running the recorder.purge action with repack: true once from Developer Tools > Actions.
What You Can Build in Grafana
Connecting Grafana to your InfluxDB v2 bucket unlocks analytical views that go far beyond standard Lovelace cards. For instance, a Flux query comparing living room temperature against boiler duty over your selected Grafana time range looks like this:
from(bucket: "home_assistant")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["entity_id"] == "living_room_temperature" or r["entity_id"] == "boiler_status")
|> filter(fn: (r) => r["_field"] == "value")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
- Thermal Loss & Heating Efficiency: Overlay outdoor temperature, indoor room temperatures, and boiler duty cycles on one timeline to pinpoint poorly insulated rooms or radiator imbalances.
- Peak Power & Circuit Auditing: Inspect second-level wattage spikes when appliances overlap (oven + dryer + EV charger) to prevent breaker trips.
- Battery Voltage Degradation Curves: Track coin-cell voltage trends across Zigbee sensors over 12 months so you replace dying batteries before a sensor drops offline.
- Embed Back into Home Assistant: Embed key Grafana panels inside any Home Assistant dashboard using a
webpage(iframe) card or rendered PNG endpoint.
3. 100% Local Voice Assistant: Home Assistant Assist, Wyoming, Whisper, and Piper#
Voice control is one of the most natural smart home interfaces—yet commercial smart speakers remain the weakest link in a local-first household. Sending every spoken word to distant cloud servers, losing voice control during ISP outages, and facing sudden feature removals has pushed privacy-conscious homeowners away from big-tech speakers.
Born out of the Open Home Foundation's "Year of the Voice" initiative and refined through 2026, Home Assistant Assist combined with the Wyoming protocol solves this completely: you can speak natural voice commands without a single audio packet leaving your home network.
Inside the Local Voice Pipeline
When you say "Hey Jarvis, turn on the living room lights," four modular stages execute locally in sequence:
[1. Satellite Mic: HA Voice PE / ESP32]
│ (Always listening locally; zero cloud recording)
▼ (Wake Word triggered: microWakeWord / openWakeWord)
[2. Wyoming Whisper (STT - Speech-to-Text)]
│ Audio ──► "turn on the living room lights"
▼
[3. Home Assistant Conversation Agent (Intent Parser)]
│ Area "Living Room" + domain "light" ─► light.turn_on
│ (Optional local LLM fallback via Ollama / Llama)
▼
[4. Wyoming Piper (TTS - Text-to-Speech)]
│ "Turned on the lights" ──► Natural local audio
▼
[Satellite Speaker Plays Response]
Each block communicates cleanly over the open Wyoming protocol:
- Wake Word (
microWakeWord/openWakeWord):microWakeWordruns directly on the satellite's own microcontroller (such as an ESP32-S3), meaning zero audio streams over your Wi-Fi until the wake phrase is heard. For dumb microphones, server-sideopenWakeWordhandles detection on the host. - Whisper (STT — Speech-to-Text):
faster-whisper, an optimized implementation of OpenAI's open-source Whisper model, transcribes speech locally into text. - Assist Conversation Agent (Intent Resolution): Home Assistant's deterministic sentence parser matches your configured Areas, device types, and entity aliases in under 20 milliseconds without needing an LLM. Optionally, you can attach a local Ollama instance as a fallback agent for open-ended questions or complex reasoning.
- Piper (TTS — Text-to-Speech): A lightweight neural voice synthesizer engineered to run at real-time speed even on a Raspberry Pi, supporting dozens of languages and accents natively.
Hardware Realities: Where Should Whisper Run?
Setting realistic hardware expectations saves hours of frustration:
- Home Assistant Green / Raspberry Pi 4:
Piper(TTS) runs very fast, whereasWhisper(STT) struggles on CPU withsmallormediummodels (requiring several seconds per utterance, whiletinyhurts recognition accuracy). Keep Green/Pi as your core server and offload Whisper to another machine on your LAN if needed. - x86-64 Mini PC (Intel N100 / N305): Handles
faster-whispersmall(int8) comfortably in ~1–2 seconds—ideal for standalone single-box voice control. - Dedicated Homelab / GPU Offload (Best Performance): If you already have a desktop or homelab server with an NVIDIA/AMD GPU, run Wyoming Faster-Whisper and Piper in Docker on that GPU machine and point Home Assistant to its local IP and TCP ports (
10300and10200). Even a low-power Home Assistant Green gains sub-second neural voice recognition!
Here is a minimal docker-compose.yml to host both local voice engines on a separate LAN Docker host:
services:
whisper:
image: rhasspy/wyoming-whisper:latest
container_name: wyoming-whisper
command: --model small --language en --beam-size 5
ports:
- "10300:10300"
volumes:
- ./whisper-data:/data
restart: unless-stopped
piper:
image: rhasspy/wyoming-piper:latest
container_name: wyoming-piper
command: --voice en_US-lessac-medium
ports:
- "10200:10200"
volumes:
- ./piper-data:/data
restart: unless-stopped
Once running, open Settings > Devices & services > Add integration > Wyoming Protocol in Home Assistant, enter your Docker host's IP with ports 10300 and 10200, and bind both services to a fresh local pipeline under Settings > Voice assistants.
Voice Satellite Hardware Options
- Home Assistant Voice Preview Edition (Voice PE): The Open Home Foundation's official open-hardware voice satellite featuring dual microphones, a physical hardware mic-mute switch, tactile rotary volume dial, LED ring, and built-in
microWakeWordsupport out of the box. - ESP32-S3-BOX-3 or Custom ESPHome I2S Satellites: Using the ESPHome YAML skills from Part 5, you can build custom room satellites with I2S microphones and speakers tailored to your enclosure.
Practical Tips for Reliable Voice Recognition
To push local voice accuracy past 95% in daily family use, follow four simple rules:
- Expose Only What You Speak To: Under Settings > Voice assistants > Expose, never expose 400 diagnostic entities. Expose only the ~30–50 lights, switches, covers, locks, and thermostats you actually control by voice. A smaller entity search space makes intent matching faster and far more accurate.
- Add Natural Spoken Aliases: Alongside technical names, add human aliases to entities—for example,
"main ceiling","couch lamp", or"kitchen strip". - Clean Area & Floor Taxonomy: The cleaner your Areas from Part 3, the more reliably commands like "Turn off all lights in the bedroom" or "What's the living room temperature?" work automatically.
- Custom Sentence Triggers: Build personalized voice routines directly in Home Assistant automations using the
conversationtrigger:
alias: "Voice Routine - Goodnight Mode"
triggers:
- trigger: conversation
command:
- "Goodnight"
- "I am going to bed"
- "Lock down the house"
actions:
- action: light.turn_off
target:
floor_id: ground_floor
- action: lock.lock
target:
entity_id: lock.front_door
- action: tts.speak
target:
entity_id: tts.piper
data:
media_player_entity_id: media_player.living_room_assist
message: "Goodnight. Ground floor lights are off and the front door is locked."
4. Scaling, Template Macros, and Long-Term Maintenance Culture#
As your device count and automation library grow over months and years, clean structure separates an effortless home from a fragile hobby project.
Reusable Jinja2 Template Macros
Instead of copy-pasting complex Jinja2 expressions (such as counting open windows, formatting alerts, or computing active tariffs) across ten different automations and template sensors, centralize them in config/custom_templates/home_helpers.jinja:
{# config/custom_templates/home_helpers.jinja #}
{% macro open_windows() %}
{% set open_list = states.binary_sensor
| selectattr('attributes.device_class', 'defined')
| selectattr('attributes.device_class', 'eq', 'window')
| selectattr('state', 'eq', 'on')
| map(attribute='name')
| list %}
{{ open_list | join(', ') if open_list | length > 0 else 'None' }}
{% endmacro %}
Then import and call it anywhere in a single line:
{% from 'home_helpers.jinja' import open_windows %}
Open windows: {{ open_windows() }}
A 15-Minute Biannual Maintenance Routine
A well-engineered Home Assistant system runs quietly for months on end. Spending 15 minutes twice a year keeps it healthy indefinitely:
- Audit Battery & Silent Sensors: Check a maintenance dashboard listing battery entities below 20% and sensors stuck in
unavailablefor over 48 hours. - Verify Backup Restore Integrity: Following Part 9, confirm your latest
.tarbackup opens cleanly with your stored Emergency Kit key. - Inspect Database Size: Check
home-assistant_v2.db. If it grew unexpectedly, identify the noisy entity and add it torecorder: exclude:. - Prune Retired Entities: Remove leftover orphaned entities and labels from hardware you replaced or unplugged.
- Test UPS Battery Health: Run a brief wall-plug pull test on your UPS; sealed lead-acid UPS batteries typically need replacement every 2–3 years.
Troubleshooting#
| Symptom | Likely Cause | Fix |
|---|---|---|
Node-RED shows Disconnected from Home Assistant | Wrong WebSocket server setting or expired Long-Lived Access Token | Check "I use the Home Assistant Add-on" when running as an HA App, or regenerate the access token for external Docker setups. |
| InfluxDB disk usage grows rapidly | Streaming all entities without an include: allowlist | Add an explicit include: block in configuration.yaml covering only temperature, power, energy, CO2, and key state entities. |
| Grafana panel refuses to load inside Home Assistant iframe | Embedding disabled or HTTP/HTTPS mixed-content block | Set GF_SECURITY_ALLOW_EMBEDDING=true in Grafana and align HTTP/HTTPS schemes (or proxy through your domain). |
| Local Whisper takes > 6 seconds to transcribe | Running medium or large model on a low-power CPU | Switch faster-whisper to small (int8) or base, or offload the Wyoming Whisper container to a PC/GPU host on your LAN. |
| Assist replies "I couldn't find that device" | Entity is not exposed to Assist or lacks natural spoken aliases | Enable the entity under Settings > Voice assistants > Expose, assign it to an Area, and add clear spoken aliases. |
SQLite database is locked warnings in logs | High-frequency writes from dozens of noisy entities or slow SD storage | Set commit_interval: 5, exclude linkquality/uptime globs under recorder:, and run HA on NVMe/SSD storage. |
Frequently Asked Questions#
Can I build an advanced smart home without installing Node-RED?
Absolutely. Home Assistant's 2026 built-in automation engine, Jinja macros, and blueprints cover nearly every household scenario cleanly. Only add Node-RED if you genuinely prefer flow-based visual programming or need heavy JSON/external API orchestration.
If I set up InfluxDB, should I disable Home Assistant's built-in Recorder?
No. Home Assistant dashboards, the Energy panel, and built-in Long-Term Statistics rely on Recorder. Keep Recorder enabled with a compact window like purge_keep_days: 7 or 10, and let InfluxDB handle multi-year raw archival.
Do I need a local LLM (Ollama) to use Home Assistant Assist?
No. Over 95% of everyday commands ("Turn on the kitchen light," "Set thermostat to 22°," "Are any windows open?") are handled by Home Assistant's deterministic intent parser in under 20 ms with zero GPU or LLM required. Local LLMs are purely an optional fallback for open-ended conversation.
Is the built-in Energy dashboard enough without Grafana and InfluxDB?
For most households, yes. The Energy dashboard and Long-Term Statistics covered in Part 8 cover daily, monthly, and yearly cost insights effortlessly. Add InfluxDB + Grafana when you want custom multi-sensor correlation charts.
I finished all 10 parts—what should I do next?
Audit your current home setup, pick one concrete upgrade to implement next, verify hardware local-control compatibility in the IoTonom Compatibility Matrix, and prototype new automation rules quickly using YAML & Blueprint Studio.
Series Wrap-Up: Your 10-Step Autonomous Home Blueprint#
Across these 10 parts, you have covered the complete engineering blueprint for a private, resilient smart home:
- Philosophy & Core: What Is Home Assistant? — Open Home Foundation, local control, and core architecture.
- Infrastructure: Installation Guide — Green, Raspberry Pi 5, Mini PC, Proxmox, and Docker.
- Organization: First Configuration — Floors, Areas, Labels, and naming hygiene.
- Radio Networks: Zigbee, Thread, and Z-Wave — Adapter selection, interference hygiene, and protocol tradeoffs.
- Custom Hardware: ESPHome and MQTT — DIY environmental nodes and Bluetooth Proxies.
- Intelligence: Automations — Triggers, conditions, scripts, scenes, and Trace debugging.
- Interfaces: Dashboards & Mobile App — Sections grid, tile cards, and wall kiosk tablets.
- Energy Economics: Energy Management — Time-of-use tariffs, smart plugs, solar, and savings automations.
- Resilience: Security, Remote Access, and Backups — Portless remote tunnels, 3-2-1 backups, and UPS protection.
- Mastery: Advanced Architectures — Node-RED, InfluxDB + Grafana, and 100% local Assist voice control.
Sources#
- Home Assistant — Recorder Integration
- Home Assistant — InfluxDB Integration
- Home Assistant — Assist (Voice Assistant)
- Home Assistant — Wyoming Protocol Integration
- Home Assistant — Voice Preview Edition
- Home Assistant — Templating & Custom Jinja Macros
- Node-RED Home Assistant WebSocket Docs
- Open Home Foundation — Piper & Wyoming Faster-Whisper
← Previous Part: Security, Remote Access, and Backups · Back to Home Assistant Guide Series →
Complete series overview for building an autonomous, privacy-first smart home: