Book Image

Building Smart Homes with Raspberry Pi Zero

By : Marco Schwartz
Book Image

Building Smart Homes with Raspberry Pi Zero

By: Marco Schwartz

Overview of this book

The release of the Raspberry Pi Zero has completely amazed the tech community. With the price, form factor, and being high on utility—the Raspberry Pi Zero is the perfect companion to support home automation projects and makes IoT even more accessible. With this book, you will be able to create and program home automation projects using the Raspberry Pi Zero board. The book will teach you how to build a thermostat that will automatically regulate the temperature in your home. Another important topic in home automation is controlling electrical appliances, and you will learn how to control LED Lights, lamps, and other electrical applications. Moving on, we will build a smart energy meter that can measure the power of the appliance, and you’ll learn how to switch it on and off. You’ll also see how to build simple security system, composed of alarms, a security camera, and motion detectors. At the end, you will integrate everything what you learned so far into a more complex project to automate the key aspects of your home. By the end, you will have deepened your knowledge of the Raspberry Pi Zero, and will know how to build autonomous home automation projects.
Table of Contents (17 chapters)
Building Smart Homes with Raspberry Pi Zero
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Configuring the board for remote access


At the end of this chapter, you want to be able to access the board from your own computer, without having it connected to an external screen.

The first step is to connect the Raspberry Pi board to your local Wi-Fi network. If you connected a Wi-Fi dongle to the Pi, you should see the Wi-Fi icon at the top of your Pi desktop. Click on it, and select your Wi-Fi network:

You will then be asked to enter the password for your network, and a few seconds later, you should be connected to your local Wi-Fi network and to the Internet.

Next, we need to enter the Raspberry Pi configuration panel so we can set some essential settings. You can find the Raspberry Pi Configuration tool inside the main Menu:

Inside the configuration tool, first press on Expand Filesystem:

This will make sure that the Pi now has access to all the space available on the SD card. Also, click on the Interfaces tab and check that SSL is checked:

Inside the same configuration tool, you can also give a network name to your Pi. I simply called mine pizero.

We are now going to perform some tests from your computer to make sure that Raspberry Pi is correctly configured for remote access and that it has access to the Internet.

To do so, open a terminal window on your computer (or use PuTTY if you are using Windows), and type the following:

This should initiate a connection to your Pi board and ask for your password. Once you type in your password, you should now be connected to the Pi board. If that doesn't work at this point, try replacing the name of your Raspberry Pi with the IP address of the board (you can get this by typing ifconfig inside a Terminal on the Pi itself).

Then, from your computer, type the following:

sudo apt-get update

Then type the following command:

sudo apt-get upgrade

This will upgrade your Pi board by downloading all the latest packages from the official Raspberry Pi repository, so it's a great way to make sure that your board is connected to the Internet.