Easy Raspberry basics: Project 29a Raspberry PI 3 model B board - Home assistant for beginners

of Acoptex.com in Raspberry Pi 3

Raspberry basics: Project 29a

Project name: Raspberry PI 3 model B board - Home assistant for beginners

Tags: Raspberry, Raspberry PI 3 model B board, vers 1.1, v 1.1, Home assistant, how to intstall home assistant, easy way

Attachments: configuration.yaml

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1.Raspberry PI 3 model B 1 pc

2. Micro SD card and SD card adapter 1 pc

3. Micro USB power supply (2.1 A, max 2.5 A) 1 pc

4. USB keyboard 1 pc

5. USB mouse 1 pc

6. TV or PC monitor 1 pc

7. HDMI cable 1 pc


We will learn about Home Assistant, how to set up Home Assistant.

Home Assistant is an open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Home Assistant is running on Python 3. It is able to track and control all devices at home and offer a platform for automating control.

Home Assistant supports 895 different components.

We are going to install Home Assistant on Raspberry Pi 3 model B.

Understanding the Raspberry PI 3 model B

The Raspberry Pi 3 is the third-generation Raspberry Pi. It replaced the Raspberry Pi 2 Model B in February 2016.


  • Quad Core 1.2GHz Broadcom BCM2837 64bit CPU
  • 1GB RAM
  • BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board
  • 40-pin extended GPIO
  • 4 USB 2 ports
  • 4 Pole stereo output and composite video port
  • Full size HDMI
  • CSI camera port for connecting a Raspberry Pi camera
  • DSI display port for connecting a Raspberry Pi touchscreen display
  • Micro SD port for loading your operating system and storing data
  • Upgraded switched Micro USB power source up to 2.5A

Signals and connections of the Raspberry PI 3 model B

Step by Step instruction

We recommend using a high-performance SD card for increased stability as well as plugging your device into an external display to see the default application booting up.

We assume that you have Windows 10 installed on your PC and empty micro SD card with SD card adapter.

1. Installing Hass.io

  1. Insert micro SD card in SD card adapter. We recommend at least a 32 GB SD card to avoid running out of space. 
  2. Insert SD card adapter to SD card reader in your PC or attached with cable to your PC' USB port.
  3. Go to home-assistant.io website and select the image for your device: Raspberry Pi 3 Model B and B+ 32bit (recommended), Raspberry Pi 3 Model B and B+ 64bit
  4. We choose the Raspberry Pi 3 Model B and B+ 32bit image.
  5. Go to etcher.io website and download the Etcher on your PC for your OS (We have Windows 7 64 bits OS)
  6. When downloading completed, open Etcher (double-click on balenaEtcher-Portable-1.5.51.exe file) and click on Select image. Choose the image you’ve previously downloaded, for example we had hassos_rpi3-2.12.img.gz. Select the SD card and click on Flash! button. Please note that SD card must be formatted before doing this step. Wait a few minutes while Etcher flashes the image on the micro SD card.
  7. Make sure that Raspberry PI 3 switched off.
  8. Insert the micro SD card with image to your Raspberry Pi 3 board.
  9. Connect Raspberry PI 3 board HDMI port and to your TV or Monitor HDMI port with HDMI cable.
  10. Connect an Ethernet cable to LAN' port of Raspberry Pi 3 board.
  11. Make sure that your monitor or TV is turned on, and that you have selected the right input (e.g. HDMI 1,  etc).
  12. Plug in your USB mouse and USB keyboard to Raspberry PI 3 USB ports.
  13. Connect Micro USB power supply to Raspberry PI 3 board micro USB input.
  14. After a few minutes you should be able to access Home Assistant user interface from any device on the same local network. 
  15. We need to find the IP address of our Raspberry Pi. You can check for new device on our router (look for hassio) or use the advanced IP scanner which you can download on advanced-ip-scanner.com website.
  16. You can access home assistant on any PC/laptop/smartphone connected to the same local network. Type in any internet browser http://your-raspberrypi-ipaddress:8123 by replacing your-raspberrypi-ipaddress with your Raspberry Pi IP address (We have -
  17. On first boot, it downloads the latest version of Home Assistant which takes around 20 minutes (slower/faster depending on the platform and your Internet connection). Sometimes the screen below doesn’t load, but the installation is still continuing in the background. Wait till the installation completed.
  18. Once it’s done, your Raspberry Pi will auto reboot. Refresh your web page. You will need to enter your name, username and password. Click on Create account button.
  19. You can name your home, click on Detect to get time zone, select the unit system and click on Next.
  20. You can set your devices and services during setup or do it later. Click Finish to completed the initial setup.
  21. Congrats. You have succed with home assistant installation. First it will load the default view. You can save your login by click on Save login button in bottom right corner of screen.
  22. You can see the menu of home assistant in top left corner.
  23. You can navigate through each tab and explore what is inside.

2. Installing Add-Ons

Add-ons for Hass.io allow the user to extend the functionality around Home Assistant. This can be running an application that Home Assistant can integrate with (like an MQTT broker) or to share the configuration via Samba for easy editing from other computers. Add-ons can be configured via the Hass.io panel in Home Assistant.

There are several add-ons you can add to get home assistant even better. We recommend installing Samba share and Open SSH. You can also install other add-ons that you might find useful.
Installing the Samba share add-on
The Samba share add-on gives you access to the Raspberry Pi’s folders on your computer. This is useful so that you can access and change your Home Assistant configuration settings through your computer.
1) To install the Samba share add-on, in the Home Assistant user interface go to Hass.io.
2) Click on the icon on the upright corner and then, select the Samba share add-on.
3) Then, click install. The installation may take a minute or two.
Accessing the shared files in Windows
1) Once Samba share is installed, in your computer, go to Network Devices. You should see a new device called HASSIO. Open it and there should be a couple of folders, including the config folder.
2) Inside the config folder, you should see the configuration.yaml file.

As an example we will show you how to install Samba share and Open SSH. You can also install other add-ons if you need them.

  1. The Samba share add-on gives you access to the Raspberry Pi's folders on your computer. This is useful so that you can access and change your Home Assistant configuration settings through your computer.
  2. Go to Hass.io.
  3. Go to ADD-ON STORE and select the Samba share add-on.
  4. Click on Install
  5. In config section assign password. We have "hassio". Click on Start.
  6. If you want ot access the shared files in Windows on you PC/laptop go to Start -> Computer
  7. Type your Raspberry Pi IP address in the field on top. (We had \\
  8. You will see the pop up window from Windows Security. Type your user name (in our case hassio) and password (in our case hassio). Tick on Remember my credentials box. Click on OK button.
  9. You can see the folders on Micro USB card with Home Assistant now.
  10. Go to config folder.You will see the configuration.yaml file in this folder.
  11. Go to ADD-ON STORE and select the SSH server add-on. This allows you to connect to your Raspberry Pi that is running Home Assistant over SSH.
  12. Click on Install
  13. In the Config section, add a password as follows (use your own password) and click SAVE. Click on Start. The connection will be established automatically, when you boot your Raspberry Pi.

3. Rebooting Raspberry Pi


  1. We need to reboot Raspberry Pi after installing the add-ons. Let's do it via SSH.
  2. If you’re running Windows OS on your PC/laptop, use Putty to establish the communication via SSH. If you don’t have Putty installed, you can dowload it here.
  3. Enter your Raspberry Pi IP address with Port 22 selected and click on Open button. When you first connect, you will be prompted with a Warning message. Click on Yes.
  4. Login as root and enter the password you’ve defined (we have defined "raspberry").
  5. If you type hassio help, you will see the commands you can use to communicate with the Raspberry Pi.
  6. To reboot your Raspberry Pi enter the following command: hassio host reboot

4. Modifying the configuration.yaml file

The configuration.yaml file saves data in a hierarchical format to let Home Assistant know what you want to do. This file stores what components you are using, how they are organized and how to automate with them.

Please find the example of configuration.yaml file.

  1. Go to Hass.io -> ADD-ON STORE  and select Configurator.
  2. Click on Install.
  3. Click on Start.
  4. Click on Open Web GUI.
  5. The configurator GUI opens. Go to Browse FileSystem.
  6. Go to config folder and find the configuration.yaml file.
  7. In this file, you can see homeassistant at the beginning. This is a component itself and it's the only one mandatory component. introduction is another component, frontend, config and so on.
  8. The automations are in a different file called automations (you can also add the automations directly to the configuration file).  You can organize all your different components in groups – this is also done in a separate file called groups.
  9. These separated files are linked in the configuration file at the end.
  10. You can easily add a password to your Home Assistant User Interface. In the configuration.yaml file you just need to uncomment the line, by taking out the #: 
  11. api_password: PASSWORD . Type your desired password instead of word PASSWORD.
  12. Save your configuration.yaml file.
  13. In the Home Assistant User Interface, go to Configuration->General and click the CHECK CONFIG button. This will check the syntax of the configuration.yaml file. When, it’s done, you get a Valid! message if everything is good with the syntax.
  14. Go to Server Management field (Configuration->General) and click on RESTART.
  15. Wait for the system to restart. You will be asked for password.

5. Adding integrations

  1. To add integrations to the configuration.yaml file go here and search for the desired.
  2. For example, search for Raspberry Pi GPIO switch (we just type Rapsberry Pi GPIO).
  3. Click on Raspberry Pi GPIO switch.
  4. You just need  to copy the entry given to the configuration.yaml file, and add or edit the configuration variables to meet your needs. 



We have learnt about Home Assistant, how to set up Home Assistant.

Libraries in use

  • None


  • See on the begining of this project

Other projects of Acoptex.com
Easy Basics: Project 101a Ai Thinker A9G GPRS GPS development board of Acoptex.com, Not selected 23-11-2019
Easy Basics: Project 100a Ai Thinker A9 GSM GPRS development board of Acoptex.com, Not selected 22-11-2019

Published at 06-07-2019
Viewed: 2587 times