Intermediate 11 minHome automation

Home Assistant + local LLM: private home automation, without cloud

Home Assistant + local LLM: private home automation, no cloud

Cloud home automation—Google Home, Alexa, SmartThings—continuously sends snippets of information about what's happening in your home to remote servers. A privacy-focused local home automation LLM reverses the equation: your Home Assistant server controls your lights and thermostats, an Ollama model translates your requests into actions, and nothing leaves the local network. This guide shows how to connect Ollama to Home Assistant in practice, which lightweight model to choose to stay under two seconds of latency, and what you actually gain in privacy.

By Mohamed Meguedmi·Update 2026-10-14·Tested on Windows, macOS, and Linux

#Why use a local LLM for a smart home?

With a typical cloud speaker, every sentence you say is sent to a remote server to be transcribed, understood, and acted on. The transcription is retained and sometimes listened to by contractors to train the models, while the manufacturer knows when you get home, what time you turn on the bedroom light, and when you start your evening playlist. For many households, that's too much information given to too many third parties.

Home Assistant addresses the problem at its root: it’s an open-source platform that runs on your hardware and communicates locally with connected devices (Zigbee, Z-Wave, Matter, MQTT). Add a local LLM via Ollama, and you get an assistant that can understand free-form phrases (“lower the living room temperature by two degrees,” “turn off all the downstairs lights”) without any audio or command ever leaving the LAN.

Real privacy
No usage data sent to third parties. No advertising profile built from your habits.
Works offline
Internet outage, cloud provider failure—the system at home keeps responding to commands.
Predictable latency
No more round trips to a datacenter; latency depends only on your machine.
Full control
You choose the model, update it whenever you want, and replace it when a better one comes out.
i
Home Assistant in two sentences
This is a Python server that brings together hundreds of home automation integrations under a single interface. It deploys in minutes on a Raspberry Pi, NUC, mini-PC, or Docker container—and does not depend on any online service to operate.

#Prerequisites

The complete kit for building your own AI assistant.

Benefit from our experience and a guided path to build your local assistant and use your AI every day.

  • Lifetime online access
  • PDF + files
  • Refunded within 30 days
Home Assistant in place
Use Home Assistant OS or Container on a current version. Home Assistant Supervised and Core lost support with version 2025.12. The Ollama integration has existed since 2024.4; device control is an experimental feature that requires a model compatible with tools.
A machine for Ollama
Ollama can run on the same machine as HA if it is powerful enough, or on a separate PC on the LAN. A Mac mini M4, an i7 NUC, or a PC with an 8 GB+ GPU can handle it very well.
Ollama installed
Daemon active on port 11434. Check with curl http://localhost:11434—the response should be Ollama is running. If nothing is set up, first follow the Ollama installation guide from the site.
Stable local network
Ideally, HA and Ollama should be on the same VLAN, with a static IP for the Ollama server. Port 11434 must be open between them.
A suitable model
We'll get to that next. For now, remember that you need a model that supports tool calling (calling tools).
!
Is the Raspberry Pi 5 alone enough?
A Pi 5 8 GB can run Home Assistant AND a small 3B model on the CPU for short commands—but latency rises quickly (4–8 s per request). For a smooth family setup, dedicate one machine to Ollama and keep the Pi for HA. See the LLM on Raspberry Pi 5 guide if you want to combine everything.

#Lightweight models suited to home automation commands

The right model for home automation isn’t necessarily the largest: it must (1) properly support tool calling to call Home Assistant services, (2) speak French well, and (3) respond quickly. 3B to 8B models in Q4_K_M are the sweet spot.

Qwen 3.5 9B (Q4_K_M, ~6.6 GB VRAM)
The reference 8 GB choice in 2026. Robust tool calling, excellent French, vision, and 256k context, with reasonable GPU latency. It's the right starting point for home automation.
Granite 4.2 8B (Q4_K_M, ~5.3 GB VRAM)
IBM, Apache 2.0, very token-efficient with 128k context. Reliable, restrained tool calling: a good alternative if Qwen drifts on your commands.
Granite 4.2 3B (Q4_K_M, ~2.2 GB VRAM)
For modest setups (Pi 5, NUC without a GPU). Very lightweight, with tool calling available but less reliable for complex commands—stick to short, explicit sentences.
Gemma 4 12B (Q4_K_M, ~7.6 GB VRAM)
If you have an RTX 3060 12 GB or better. Multimodal, Apache 2.0, with a clear improvement on ambiguous commands (“set a cozy mood in the living room”) and contextual understanding.
Mistral Small 24B (Q4_K_M, ~14 GB VRAM)
Very good in French and strong as a general-purpose model; best reserved for 16 GB cards and larger. Comfortable for rich dialogue in addition to strict home control.
→
Recommended quantization: Q4_K_M
For home automation, Q4_K_M offers the best VRAM/quality tradeoff. There is no need to move up to Q5 or Q8: for short, structured commands, the difference is invisible. Reserve higher quantizations for open-ended dialogue or RAG.

#1. Connect Ollama to Home Assistant

The Ollama integration has been official since Home Assistant 2024.4. It is configured in the interface. Device control uses the model’s tools and remains experimental: start with a limited scope.

  1. 01
    Pull the model with Ollama
    On the machine hosting Ollama, run the shell command below. The download takes 3-5 GB depending on the selected model.
Terminal — machine Ollama
ollama pull qwen3.5:9b
ollama list  # vérifier que le modèle apparaît
  1. 01
    Make Ollama accessible on the LAN
    By default, Ollama listens only on localhost. To let Home Assistant (potentially running on another machine) call it, expose the service on all interfaces.
Linux/macOS — expose Ollama on the LAN
# systemd (Linux)
sudo systemctl edit ollama
# ajouter dans le bloc [Service]
# Environment="OLLAMA_HOST=0.0.0.0:11434"
sudo systemctl restart ollama

# macOS (lancement manuel ou launchctl)
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"
# puis relancer Ollama
  1. 01
    Add the integration to Home Assistant
    Settings > Devices & services > Add integration > search for “Ollama”.
  2. 02
    Enter the URL
    URL: http://IP-DU-SERVEUR-OLLAMA:11434 (e.g., http://192.168.1.42:11434). If Ollama runs on the same machine as HA Container, use http://host.docker.internal:11434.
  3. 03
    Choose the model
    Home Assistant automatically queries Ollama and displays the list of available models. Select qwen3.5:9b.
  4. 04
    Enable control (Home Assistant Control)
    In the integration options, check “Control Home Assistant.” This authorizes the LLM to call services (turn on, turn off, adjust the temperature). Without this option, it can only chat.
!
No authentication by default on Ollama
Ollama has no built-in authentication. If you expose port 11434 on the LAN, make sure your router does not route it to the Internet. For a tighter setup, put Ollama behind a reverse proxy with basic auth (Caddy, nginx), or restrict it by IP at the firewall.

#2. Expose the right entities to the assistant

Home Assistant sometimes manages hundreds of entities (sensors, plugs, bulbs, views, automations…). Sending them all to the LLM would saturate the context and confuse the model. The trick is to expose only what the assistant actually needs to control.

  1. 01
    Settings > Voice > Expose
    List of all entities. Enable the ones the assistant should control: lights, thermostats, outlets, shutters. Disable internal sensors (Pi RAM, Zigbee signal, and so on) that are useless to a human.
  2. 02
    Rename in natural language
    An entity named light.salon_lampe_principale_zigbee_3 is unreadable. Rename it to “Lampe principale du salon.” The LLM chooses the right entity much more reliably from a human-readable name.
  3. 03
    Group by zone
    Assign each entity to a zone (Living Room, Kitchen, Bedroom…). The LLM can then understand “turn off the living room” without manually listing every lamp.
  4. 04
    Test
    In Settings > Voice > Assistants, click the chat icon for your Ollama pipeline and try: “What is the room temperature?” followed by “Turn on the living room’s main light.”
→
Start with fewer than 25 entities
The documentation recommends fewer than 25 entities to start. Expose only the devices you need, give them distinct names, and validate several known commands before expanding the scope.

#3. 100% local voice pipeline (optional)

If you want to speak aloud (instead of typing in the HA app), Assist can chain speech recognition → LLM → speech synthesis, entirely locally. No Google or Amazon dependency.

Wake word — openWakeWord
Local wake-word detection. On Home Assistant OS, install the openWakeWord application available for your hardware. In Container, host the voice service separately and connect it through Wyoming.
STT (speech-to-text) — Whisper
Local speech recognition, available as an application under Home Assistant OS or as a separate service with Container. Choose the model based on a French transcription test; throughput depends on the machine.
LLM — Ollama (already configured)
Receives the transcript, calls the appropriate HA tool, and returns a confirmation sentence.
TTS (text-to-speech) — Piper
Local text-to-speech with French voices. OS can use the Piper application; Container requires an external service. Measure the latency of the selected voice instead of assuming a fixed duration per sentence.

Once the four add-ons are installed and started, Settings > Voice > Assistants lets you assemble the pipeline: select Whisper for STT, your Ollama integration as the conversational agent, and Piper for TTS. This is when your home becomes voice-controllable, with no outbound connection.

i
Voice satellite without a PC microphone
An ESP32-S3-BOX or an M5Stack Atom Echo flashed with ESPHome becomes an Assist satellite: it detects the wake word, sends audio to HA, and plays the TTS response. Cost: €20–30. Multiple satellites can coexist in the same home.

#Latency: local vs. cloud

Local execution removes the dependency on the connection to a remote AI service, but does not guarantee a faster response. The delay includes transcription, generation, action, and speech synthesis. The earlier figures in this section were not accompanied by measurements; here are the points to test for each configuration.

Cloud (Google/Alexa)
Latency was not measured in this guide. Time the same command from the end of speech to the start of the response, then repeat with an already loaded model. Record transcription, generation, and synthesis separately if the logs allow it.
Local — Pi 5 + 3B CPU LLM
Latency was not measured in this guide. Time the same command from the end of speech to the start of the response, then repeat with an already loaded model. Record transcription, generation, and synthesis separately if the logs allow it.
Local — PC + 8B LLM GPU 8 GB
Latency was not measured in this guide. Time the same command from the end of speech to the start of the response, then repeat with an already loaded model. Record transcription, generation, and synthesis separately if the logs allow it.
Local — Mac mini M4 24 GB
Latency was not measured in this guide. Time the same command from the end of speech to the start of the response, then repeat with an already loaded model. Record transcription, generation, and synthesis separately if the logs allow it.
→
Keep the model warm
In the Ollama integration options, Keep alive defaults to -1: the model remains loaded indefinitely after the request. Setting it to 0 unloads it; a positive value indicates seconds. This request parameter can take precedence over OLLAMA_KEEP_ALIVE. Also check Think before responding, which is disabled by default, if you want to reduce latency.

#Privacy: check what leaves the local network

Let’s concretely check the scope of the data. With a properly configured HA + Ollama + Whisper + Piper setup:

Audio captured by the microphone
Processed by local Whisper. No audio leaves the network.
Transcribed text from your command
Sent to local Ollama. No transcription leaves the network.
List of your devices and zones
Shared with Ollama locally so it can call the right entity. Stays on the LAN.
HA decision and action
Executed by HA, which communicates directly with Zigbee/Z-Wave/Matter/MQTT locally.
Piper voice response
Audio synthesized locally. No synthetic voice fetched online.

The AI steps described can work on the LAN after the models are downloaded. However, other Home Assistant integrations, devices, and tools may use remote services. Check each component before disconnecting from the Internet: a local LLM configuration does not guarantee that the entire home will work offline.

i
To verify it yourself
Monitor traffic from Home Assistant hosts, Ollama, and voice services across several commands, for example on the router or with tcpdump. Identify external destinations and the integrations that call them. The absence of cloud services must be established from your configuration, not inferred from the software names alone.

#Tips and troubleshooting

The LLM responds in English
Add a system prompt to the Ollama integration: “You are the home's home-automation assistant. Always reply in French, in one short sentence.” This instruction is sufficient with Qwen 3.5 or Granite 4.2.
It invents nonexistent entities
A symptom of a model that is too small or an ambiguous entity name. Rename the entities in natural language, reduce the number exposed, or switch to Gemma 4 12B if VRAM is available.
It calls the right service but in the wrong region
Make sure every entity has an “area” assigned in HA. Without an area, the model guesses and gets similar names wrong.
Latency collapses after a few hours
Check Keep alive in the integration options (-1 to keep the model loaded), the available memory, and the Ollama logs. A global service variable is not enough if the request specifies a different duration.
Connection refused from HA
Ollama is still listening on 127.0.0.1. Check OLLAMA_HOST=0.0.0.0:11434 in the systemd unit, restart, and test with curl from the HA machine.
Pi 5 overheating under CPU load
The CPU LLM pushes all 4 cores to 100%. Add an active fan (or an Argon ONE V3 Pi 5 case) if you want to run everything on the Pi. Otherwise, offload Ollama to another host.
Want to confine Ollama to the LAN only
You can listen on the specific LAN IP instead of all interfaces, then restrict connections with the firewall. This address choice does not replace network rules and, by itself, is not authentication.

#Sources and verification for October 14, 2026

Official documentation verified on October 14, 2026. Requirements may change: consult these sources before installation.

#Go further

You have a working local LLM home automation assistant. Here are a few ways to take it further:

Install Ollama on Linux
If you want to dedicate a Linux machine to Ollama (the cleanest setup for 24/7 home automation), the Linux installation guide covers systemd, NVIDIA/AMD GPUs, and network configuration.
LLM on Raspberry Pi 5
To assess concretely what runs on pure CPU on a Pi 5 8 GB, with tokens/sec benchmarks and a selection of 1-3B models.
Choosing your quantization (Q4, Q5, Q8)
To understand why Q4_K_M is the smart-home sweet spot, and when moving up to Q5_K_M or down to Q3 makes sense.
Did this guide help you?

Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.

Prices in euros (€) are French market prices including VAT, as checked by BestLLMfor. US prices differ: the Amazon buttons show the current US price.