Home Assistant from scratch: the first three hours and your first automation
Home Assistant looks complicated until you take the first step. After that it is a construction set: devices, rules, dashboards. Here is a route for the first evening, after which the system already does something.
What you need to start
- A device to run it on: a Raspberry Pi 4 or 5 with a good power supply and an SSD (memory cards wear out faster), a small mini PC or a ready-made Home Assistant device. A virtual machine on a home server works too.
- A cable connection to the router: Wi-Fi is not the best choice for a smart home server.
- A computer to write the system image and do the first setup.
- A few smart devices you already have at home, so there is something to connect: smart bulbs, plugs, sensors.
There are several ways to install: “Home Assistant OS” (recommended for starting: the system updates itself and makes backups), “Container” and “Supervised” (for experienced users). Start with Home Assistant OS.
Step 1. Installation
- Download the Home Assistant OS image for your device from the official site.
- Write it to the SSD or card with a tool such as balenaEtcher.
- Connect the device to the network by cable and to power. The first start takes a few minutes.
- In a browser open homeassistant.local:8123 (or the address from your router and port 8123).
- Create the owner account and set your location and time zone.
Step 2. A fixed address
In the router settings make an “address reservation” for the server (see the router setup article). That way the address does not change after a reboot and everything that points to it keeps working.
Step 3. First devices
Home Assistant looks for devices on the network itself. Open “Settings → Devices & services”: discovered ones (smart bulbs, TVs, speakers, printers) will appear there. Click “Configure” next to each. For cloud services (such as Tuya) you will need to sign in to your account and sometimes create a developer key. Read the prompts: they are usually detailed.
Step 4. Zigbee without the cloud
Zigbee sensors (motion, door, leak, temperature) run on batteries, respond quickly and do not depend on the internet. They need a USB Zigbee coordinator plugged into the server. Keep it on a USB extension cable, away from the SSD and other USB 3.0 devices: they create radio noise. Plug it in, add the Zigbee integration, press “Add device” and follow the sensor's instructions to put it in pairing mode (usually a long press on a button).
Step 5. Your first automation
Take a simple scenario you will actually feel. For example, “when motion is detected in the hallway and it is dark, turn the light on for 3 minutes”.
- “Settings → Automations → Create”.
- Trigger: the motion sensor turns to “detected”.
- Condition: the sun is below the horizon (or illuminance is below a threshold).
- Action: turn the light on, wait 3 minutes, turn it off.
- Save it and test by walking through the hallway.
Then add one rule at a time. One automation per evening beats ten you cannot untangle later.
Step 6. The dashboard
On the main dashboard add cards for the devices you use every day. Hide the rest. A dashboard with everything at hand is a smart home; a heap of switches is not.
Step 7. Backups
Set up automatic backups (“System → Backups”). Be sure to copy the files not only onto the server itself but somewhere else: a NAS, the cloud or at least a computer. Otherwise a failed disk wipes everything. The principle is described in our article on the 3-2-1 rule.
Safe access from outside
- Do not expose Home Assistant straight to the internet through port forwarding: scanners find servers quickly.
- The safest way: a VPN into your home (see our WireGuard article).
- There is also an official cloud service, Home Assistant Cloud, on subscription, which is simpler but paid.
- Turn on two-step verification for the owner account.
Typical mistakes
- Overload: buying 30 devices without knowing what to do with them. Start with two or three and a clearly stated goal.
- Wi-Fi devices from several makers on the main network. It is better to keep smart devices on a guest network or a separate subnet.
- Running the system on a cheap memory card: it wears out fast and loses data.
- No backups at all.
Need help with this?
Describe the task and we will suggest where to start. The first conversation is free.