Alexa + Home Assistant with Local AI β€” Complete Integration Guide

πŸ“… April 2026⏱️ 15 min read🏷️ Home Assistant Β· Alexa Β· Local AI

This is the exact integration running in a real home β€” a Raspberry Pi 5 (8GB) running Home Assistant OS, an Echo Dot 5, and a fully local AI that answers questions about the house in 3–5 seconds. No subscription AI. No data leaves the LAN. Zero cloud AI costs.

What you end up with

Three-Layer Architecture

LayerWhat it doesTechnology
Layer 1Direct device control β€” "Alexa, turn on geyser"Nabu Casa Smart Home Skill
Layer 2Natural language queries via local AICustom Alexa Skill β†’ AWS Lambda β†’ HA β†’ Node-RED β†’ Ollama
Layer 3Proactive TTS β€” HA speaks through Echo Dotalexa_devices HA integration

The Data Flow

You speak β†’ Echo Dot β†’ Alexa Cloud β†’ AWS Lambda (Python, eu-west-1)
                                          β”‚
                                          β–Ό  sets input_text.alexa_query
                                   Home Assistant (Pi 5)
                                          β”‚
                                          β–Ό  rest_command β†’ NR webhook
                                    Node-RED
                                          β”‚
                                          β–Ό  /api/chat (local)
                                     Ollama (qwen2.5:1.5b)
                                          β”‚
                                          β–Ό  {"service":"script.alexa_battery_status"}
                                   Home Assistant script
                                          β”‚
                                          β–Ό  Jinja2 templates β†’ message
                                    Echo Dot speaks

Lambda runtime: under 1 second (fire-and-forget β€” returns "Checking…" immediately)
Total latency: 3–5 seconds from spoken question to spoken answer
AI processing: 100% local on Pi 5, offline, never leaves your LAN

Hardware and Software Required

Cost Summary

ComponentCost
Nabu Casa~R150/month (~$8 USD)
AWS LambdaR0 (well within free tier)
Ollama / qwen2.5:1.5bFree, runs locally
Echo Dot 5~R700 once-off
Cloud AI API costsR0 β€” everything runs on-device

Performance

StageTime
Lambda β†’ HA (set input_text)< 1 second
HA automation β†’ NR webhook< 0.5 seconds
Ollama prompt eval (KV cache warm)~0.05 seconds
Ollama generation (~20 tokens)~2-3 seconds
HA script + Echo Dot speech< 1 second
Total end-to-end3–5 seconds

Pi 5 stats at idle with this integration running: CPU ~17%, RAM ~62% (with Ollama + Frigate also loaded).

Why Local AI Instead of ChatGPT/Claude API?

Three reasons: privacy, cost, and latency. Every query about your home β€” battery levels, solar production, sprinkler zones β€” would go through a third-party API server if you used cloud AI. With Ollama running locally, none of that data ever leaves your network. There are no API costs at all. And with the KV cache warmed up, local inference on a Pi 5 is nearly as fast as a cloud API call anyway.

The model used is qwen2.5:1.5b β€” small enough to fit alongside everything else in Pi 5 RAM (~900MB), fast enough at ~7.5 tokens/second, and accurate enough for structured JSON intent classification. For this use case (mapping spoken queries to HA script names), a 1.5B parameter model is more than sufficient.

Read the full step-by-step guides

Layer 1: Nabu Casa Smart Home Skill β†’ Layer 2: Custom Skill + AWS Lambda β†’ Layer 3: Ollama + Node-RED Local AI β†’ HA Scripts: Battery, Solar, Sprinklers β†’