---
title: "Home Assistant from scratch: your first working smart home"
description: "From an empty Home Assistant to three working devices and a first automation: a metering plug, a leak sensor and a door sensor. Steps for a beginner, without buying more than you need."
canonical: "https://realhomeautomations.com/en/projects/home-assistant-from-scratch/"
language: en-US
updated: 2026-11-23T16:24:04+00:00
---

# Home Assistant from scratch: your first working smart home

From an empty Home Assistant to three working devices and a first automation: a metering plug, a leak sensor and a door sensor. Steps for a beginner, without buying more than you need.

> Canonical HTML page: https://realhomeautomations.com/en/projects/home-assistant-from-scratch/

- **Difficulty:** Beginner
- **Build time:** 120–240 minutes
- **Reading time:** 3 minutes

## Tools required

- A computer for Home Assistant (per the documentation: Home Assistant Green, Raspberry Pi, a mini computer or a virtual machine)
- Sonoff S60TPF (Wi-Fi plug with energy metering)
- Sonoff SNZB-05P (Zigbee leak sensor)
- Sonoff SNZB-04PR1 (Zigbee door and window sensor)
- Zigbee adapter (USB adapter for Home Assistant (ZHA); not included in the parts)


## What readers will learn

- Choose hardware for Home Assistant and install it
- Add a Wi-Fi plug and see its power
- Add two Zigbee sensors
- Build your first automation: a notification on a leak


## Skill requirements

- Work with a browser and a router
- Follow a guide step by step

## Project kit

- [Smart plug Sonoff S60TPF, 16A, with energy monitoring](https://realhomeautomations.com/en/product/smart-plug-sonoff-s60tpf-16a-with-energy-monitoring/index.md)

Every smart home starts with one empty screen and the question “Where do I start?”. Here we take the shortest path: Home Assistant, three devices and one automation you really need.

 ## What you will get

- A working Home Assistant on a computer that stays on.
- A plug that shows how much power the appliance plugged into it draws.
- A leak sensor and a door or window sensor.
- One automation: a notification on your phone when there is a leak.

 Nothing else. No lamps, no blinds. They come once this stage works.

 ## What you need

 You buy only what you're missing:

- **A computer for Home Assistant.** According to the documentation, it can be a Home Assistant Green, a Raspberry Pi, a mini computer or a virtual machine. Choose using the [installation page](https://www.home-assistant.io/installation/).
- [Sonoff S60TPF](https://realhomeautomations.com/bg/produkt/smart-plug-sonoff-s60tpf-16a-with-energy-monitoring/): you need 1 piece. 16 A Wi-Fi plug with energy metering.
- [Sonoff SNZB-05P](https://realhomeautomations.com/bg/produkt/flood-sensor-sonoff-snzb-05p-with-flood-detection-cable-included/): you need 1 piece. Zigbee leak sensor with a sensing cable.
- [Sonoff SNZB-04PR1](https://realhomeautomations.com/bg/produkt/smart-door-and-window-sensor-sonoff-snzb-04pr1-zigbee-3-0-protocol-cr2477-battery-powered-real-time-opening-alerts-ewelink-home-assistant/): you need 1 piece. Zigbee door and window sensor, CR2477 battery.
- You need a Zigbee hub or Home Assistant with a Zigbee adapter.

 The adapter isn't in the list above. In Marto's Home Assistant it is a Connect ZBT-1 USB adapter; our catalogue also has other Zigbee adapters.

 Time: two to four hours, mostly for the installation and the first getting acquainted.

 ## How it works

 Home Assistant is a program. It sits on a computer and talks to the devices. The Wi-Fi plug talks over your Wi-Fi network. The Zigbee sensors talk over their own radio network to the adapter, and the adapter is attached to Home Assistant.

 That is why there are two "add" steps: the plug is discovered on the network, and the sensors are paired to the Zigbee integration.

 ## Steps

- Install Home Assistant following the documentation for your hardware. You should see an initial setup screen in the browser.
- Create a user and set the home's location. It is needed for sunset and the time zone.
- Plug in the plug and add it following the manufacturer's guide. In Settings → Devices & services you should see a new device with power and energy entities.
- Plug an appliance into the plug, for example a fan. The power should change.
- Plug the Zigbee adapter into a USB port and add the ZHA integration from Settings → Devices & services. You should see the Zigbee network installation start.
- Pair the leak sensor and the door sensor. Usually you hold the sensor's button while ZHA is in "add" mode. Follow the manufacturer's guide for the exact gesture.
- Check the sensors: wet the end of the leak sensor's cable with a little water and open the door in front of the door sensor. Their state in Home Assistant should change.
- Create the first automation. An example for a leak; the names are examples:

 ```
alias: Leak – notification
triggers:
  - trigger: state
    entity_id: binary_sensor.datchik_tech
    to: "on"
actions:
  - action: notify.mobile_app_telefon
    data:
      title: Leak
      message: The leak sensor is wet.
mode: single
```

 You put it in Settings → Automations & scenes → Create automation → Edit in YAML. Also install the Companion app on your phone, so the notification has somewhere to go.

 ## Checking the result

- Wet the leak sensor and see whether the notification arrives. Dry it and see whether the state goes back.
- Open and close the door a few times. The sensor should follow.
- Restart Home Assistant. The devices come back on their own.

 ## If it doesn't work

- ZHA doesn't find the adapter: the USB port or the device permissions. Try another port.
- The sensor doesn't pair: the battery, or it is too far from the adapter. Move it closer and repeat.
- The plug doesn't appear: Home Assistant and the plug are not on the same network.
- No notification: Companion isn't signed in or has no permission for notifications.

 ## Limitations

 A leak sensor doesn't stop the water, it only notifies. A single Home Assistant is a single point of failure: make a backup once you have more than a few devices.

 ## Sources and verification status

- [Home Assistant installation](https://www.home-assistant.io/installation/), checked on 22.11.2026.
- [ZHA](https://www.home-assistant.io/integrations/zha/), checked on 22.11.2026.
- [Automations](https://www.home-assistant.io/docs/automation/), checked on 22.11.2026.
- The product pages of the three devices in the shop.
- Marto's home setup was read in read-only mode in his Home Assistant on 22.11.2026.

 The existing “First kit: plug, leak and door” in the shop contains similar things, but it is a separate product and we don't use it here.