We are now going to start with the home automation series where we will try to integrate as many
smart devices as possible – from lights, to speaker system, sensors and so on, including
a voice assistant.
Home assistant is a popular open source software which is not only easy to use but it has a
lot of integrations that cover a wide range of platforms. It is designed to run on a local
device like a computer or raspberry pi and also has a cloud service which allows you
to view and control your home remotely for as little as $5 a month.
I did check out OpenHAB which is an alternative, and using that was not very straightforward
but we may try it out sometime later.
In order to have a smart home you need a central device also called a hub. All other devices
like your lights, sensors, and speakers communicate to this central device. In this video, we
are going to start with the hub by installing home assistant on the raspberry pi 3. We will
also learn how to view the live camera feed from the esp32 IP camera we built several
videos ago. This is going to be a short video, and all the details will also be available
in the written posts in the description. So let’s dive in.
All we need for this build is a raspberry pi 3 or 4, along with a suitable power source
and at least a 32GB microSD card. If you visit the home assistant website, then you will
find a nicely written getting started guide that will walk you through the process. But
in short, you simply need to click this link to go to the downloads page where you can
download the image for your board. You can then use etcher to flash the image to the
microSD card. Once you boot the board with this image, it will download all the required
installation files for home assistant and for this to work, it needs internet access.
I decided to use the onboard WiFi and to do that you will need to open the hassio-boot
partition, then create a folder with the name CONFIG as shown here, and then another folder
inside of it with the name network. You then need to create a new file in this folder with
your network details. You can click this link to obtain the contents that you need to copy
to the file. By default, home assistant is configured to use the wired connection, which
means that you wouldn’t have to do anything further. But since I’m using WiFi, I need
to copy these contents into the new file.
I’d recommend using a text editor like Sublime Text, notepad++ or atom to do this. You then
have to add your network name and password without any quotation marks. Once done, simply
save this file in the new folder that we created moments ago with the name my-network.
Once that is done, you simply need to insert the microSD card and power on the board. Give
the board about a minute to connect to your network and start the installation process.
You can then open up a web browser and type in hassio.local:8123 which should take you
to a page like this. You can also obtain the board IP address using Angry IP scanner and
use that in the URL, instead of hassio.local. The entire installation process can take up
to 20 minutes depending on your network connection. Once this has completed, you will be taken
to the onboarding pages where you can create a new account. Navigate through it all and
you will finally be able to view the home screen or user interface like this. There’s
more information about all of this in on the website, under the onboarding section.
We will keep adding more things to home assistant in future videos, but for now, let’s just
add the ESP32 camera. The first thing we need to do is test the stream and that can be done
by plugging it in, then using AngryIP scanner to obtain the board’s IP address and then
entering the following in a web browser to make sure you can view the stream.
To do add the camera to home assistant, simply click this button at the top right, confirm
that you want to control, then click the add button, select picture and replace the image
path with the URL of the stream as shown here. You should get a preview like this and you
can then select Save it. The video stream should show up on the home screen.
And that’s how easy it is to get this done. We will continue adding more devices to home
assistant and these videos will be released on Tuesday’s so do subscribe to stay notified.
Thank you for watching and I will see you in the next one!