# Build a Privacy-First LLM Smart Home on Raspberry Pi 5

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/raspberry-pi-smart-home/)
- [Run LLMs locally on Raspberry Pi 5 for Edge AI](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/raspberry-pi-smart-home/1-overview/)
- [Set up software dependencies on Raspberry Pi 5 for Ollama and LLMs](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/raspberry-pi-smart-home/2-software-dependencies/)
- [Test Raspberry Pi 5 GPIO pins for smart home devices](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/raspberry-pi-smart-home/3-test-gpio/)
- [Build and Run a Smart Home Assistant on Raspberry Pi 5 with LLMs](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/raspberry-pi-smart-home/4-smart-home-assistant/)
- [Next Steps](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/raspberry-pi-smart-home/_next-steps/)

## About this Learning Path

| Skill level:         | Introductory                                  |
|----------------------|-----------------------------------------------|
| Reading time:        | 45 min                                       |
| Last updated:        | 13 Aug 2026                                  |

| Author:                  | Fidel Makatia Omusilibwa [GitHub](https://github.com/fidel-makatia) [LinkedIn](https://linkedin.com/in/fidel-makatia-hsc-mieee) |
|--------------------------|--------------------------------------------------------------------------------------------------|
| Arm IP:                  | [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors)    |
| Tags:                    | ML, Linux, Python, Ollama, FastAPI, Raspberry Pi                                               |

### Who is this for?
This is an introductory topic for edge AI developers, Raspberry Pi hobbyists, and software engineers who want to build privacy-first smart home assistants. You’ll learn how to run large language models (LLMs) locally on the Raspberry Pi 5 using Ollama, control GPIO-connected devices, and deploy a web-based assistant without relying on cloud services.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Understand how the Arm architecture enables efficient, private, and responsive LLM inference
- Run a smart home assistant on Raspberry Pi 5 with local LLM integration
- Wire and control physical devices (for example, LEDs) using Raspberry Pi GPIO pins
- Deploy and interact with a local language model using Ollama
- Launch and access a web-based dashboard for device control

### Prerequisites
Before starting, you will need the following:
- An Arm-based single board computer (for example, Raspberry Pi 5 running Raspberry Pi OS)
- Electronic components (breadboard, LEDs, resistors, jumper wires) for GPIO testing
- Familiarity with Python programming, Raspberry Pi GPIO pinout, and basic electronics

### Summary
You’ll build a local, privacy-first smart home assistant on a Raspberry Pi 5. First, you’ll install Python and Ollama, wire an LED to GPIO 17, and verify GPIO access. Then, you’ll run `smart_home_assistant.py`, interact through a terminal or browser, and use natural-language requests that the local model converts into actions for configured devices.

### Frequently asked questions
<details>
<summary>What result should I expect when I run the GPIO test script?</summary>
The LED connected to GPIO 17 should turn on and off as coded without GPIO-related errors. If nothing changes, check the wiring and pin selection in the script.
</details>

<details>
<summary>Which GPIO pin and resistor value does the LED example use?</summary>
Use GPIO 17 (physical pin 11) with a 220Ω series resistor. Connect the LED anode (long leg) to GPIO 17 through the resistor and the cathode (short leg) to a GND pin.
</details>

<details>
<summary>How do I access the assistant’s web interface and know it started correctly?</summary>
The script starts a local web server and prints the address and port in the terminal. Open a browser to your Raspberry Pi’s IP at that port. A responsive page indicates the server is running.
</details>

<details>
<summary>Where should I run the assistant code after cloning it, and what should I see?</summary>
Change into the cloned project directory before launching `smart_home_assistant.py`. On start, it initializes the configured GPIO devices and brings up the local web server.
</details>

<details>
<summary>What should I check if natural language commands don't control the LED or other device?</summary>
Verify the wiring to GPIO 17 and GND, and ensure the script’s pin assignments match your setup. Confirm Ollama is installed and available so the assistant can process model replies, and review the console for JSON parsing or connection errors.
</details>
