Quick Answer: A Raspberry Pi can be the brain of a smart home. The usual route is Home Assistant, which its documentation says runs on a Raspberry Pi 4 or 5 with at least 2GB of RAM. The Pi reads sensors, talks to smart devices and runs your automations. It should not switch mains-powered loads directly. Use certified plug-in smart plugs, and leave any mains wiring to a licensed electrician.

Home automation on a Pi means a small always-on computer that links your devices and decides what they do. One safety point comes first, because it decides what you should make. For the install itself, see how to install Home Assistant on a Raspberry Pi.

Can a Raspberry Pi switch mains power?

Not on its own, and you should not wire it to do so. A Raspberry Pi runs on low voltage. Wall power is a different job. Mains wiring is work for a licensed electrician where your local rules require one, and a bare relay board wired to mains by a beginner is not a safe project. This guide gives no mains wiring steps.

If you want a lamp or a fan on a schedule, buy a plug-in smart plug or another certified product made for mains use, and plug it in like any appliance. The US Consumer Product Safety Commission advises having a licensed electrician check a home's electrical system, and its home electrical checklist asks whether a heater carries the seal of a nationally recognized testing laboratory such as UL, ETL or CSA. Look for a lab listing on anything you buy. Never open a power supply or a mains-rated socket.

What can a Raspberry Pi do in a smart home?

It acts as the hub. Home Assistant is open source home automation software that, in its own words, keeps your data local with no need for a cloud. As of October 2026 its home page lists over a thousand brands and 1500+ integrations. The Pi runs it, and the devices stay on your network.

Three kinds of work fit a Pi well:

  • Hub and automations. Lights, plugs, thermostats and sensors from many brands, controlled from one dashboard.
  • Radio networks. Z-Wave devices need an adapter and software on the Pi. Our Raspberry Pi Z-Wave guide covers it. Apple Home users can try Homebridge on a Raspberry Pi.
  • Your own sensors. Temperature, motion or door sensors wired to the GPIO pins, as in our Raspberry Pi sensors guide. Keep these on low-voltage parts only.

What do you need to run Home Assistant on a Raspberry Pi?

You need a Pi 4 or Pi 5 with at least 2GB of RAM, a good power supply, a microSD card and a network cable. The Home Assistant Raspberry Pi install page, checked in October 2026, asks for a card of at least 32GB, preferably Application Class 2 (A2). It warns that mobile chargers may not be suitable and that a computer's USB port will not supply enough power.

You write the Home Assistant image with Raspberry Pi Imager, boot, and open homeassistant.local in a browser on your computer. The page says it should be available within a minute on a Pi 4 or 5, and that if it does not show after 5 minutes, the image may not have been written properly.

Which home automation setups work on a Pi?

The installation type decides what you can add. Apps, which Home Assistant used to call add-ons, are only available on the Home Assistant Operating System method, per its documentation. The table compares the main routes, using Home Assistant's pages from October 2026.

SetupPi models in the docsApps availableNotes
Home Assistant Operating SystemPi 4 or 5, 2GB RAM minimumYesThe recommended type for most people bringing their own hardware
Home Assistant ContainerPi 3, 4 or 5NoYou manage updates; no out-of-the-box Thread or Z-Wave support
Z-Wave on top of eitherSame as aboveZ-Wave JS app on OS onlyNeeds a Z-Wave adapter and a Z-Wave JS server

Containers add steps of their own, covered in our Docker guide. If you are unsure, take the Operating System route. The Home Assistant pages do not list a Pi Zero for either method.

How do you start a first project?

A sensible first project is one certified smart plug on a lamp and one rule that turns it on at dusk.

  1. Write Home Assistant to the card with Imager and boot the Pi.
  2. Create the owner account on the first screen. Home Assistant states the owner credentials cannot be recovered, so store them somewhere safe.
  3. Add one device from the integrations screen.
  4. Build one automation and watch it for a week before adding more.
  5. Back up before big changes, as in our backup guide.

When is a Raspberry Pi the wrong choice?

When you do not want a hobby. Home Assistant Green is a ready-made hub, listed at a recommended MSRP of $199 as of October 2026 on the Home Assistant Green page, and that page says it suits people not familiar with tinkering with Raspberry Pi. If you already own a Pi, you can start with what you have. If you want it to work like an appliance, Green is simpler.

Frequently asked questions

What is home automation with a Raspberry Pi?

It means using a Raspberry Pi as the controller that links smart devices and runs rules. Most people install Home Assistant on it.

Which Raspberry Pi do I need for Home Assistant?

For the recommended Operating System install, Home Assistant lists a Raspberry Pi 4 or 5 with at least 2GB of RAM. The Container method lists a Pi 3, 4 or 5.

Can a Raspberry Pi control lights?

Yes, through smart bulbs and plug-in smart plugs that Home Assistant supports. That is the route this site recommends, instead of wiring the Pi to a light fitting.

Is it safe to connect a relay board to a Raspberry Pi for mains power?

No, not as a beginner project. Switching a mains load needs certified parts and, where wiring is involved, a licensed electrician. Use a certified smart plug instead.

Does Home Assistant need the internet?

Its home page says it communicates with devices locally and falls back to the cloud only if there is no other option. Some devices still need their maker's cloud, so check each one.

Can I use Z-Wave devices with a Raspberry Pi?

Yes. You need a Z-Wave adapter and a Z-Wave JS server. On Home Assistant OS that server is available as an app.

Can a Raspberry Pi Zero run home automation?

Home Assistant's install pages do not list a Pi Zero. A Zero can still read a sensor for a project of your own, but it is not the hub.