Reader small image

You're reading from  Raspberry Pi 3 Home Automation Projects

Product typeBook
Published inNov 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781783283873
Edition1st Edition
Languages
Right arrow
Authors (2):
Shantanu Bhadoria
Shantanu Bhadoria
author image
Shantanu Bhadoria

Shantanu Bhadoria is an avid traveler and the author of several popular open source projects in Perl, Python, Golang, and Node.js, including many IoT projects. When in Singapore, he works on paging and building control systems for skyscrapers and large campuses in Singapore, Hong Kong, and Macau. He has authored and contributed to public projects dealing with control over gyroscopes, accelerometers, magnetometers, altimeters, PWM generators, and other sensors and controllers, as well as sensor fusion algorithms such as Kalman filters. Shantanu's work in IoT and other fields can be accessed on his GitHub account with the name shantanubhadoria. He is also the author of Device::SMBus, a popular Perl library used to control devices over the I2C bus.
Read more about Shantanu Bhadoria

Ruben Oliva Ramos
Ruben Oliva Ramos
author image
Ruben Oliva Ramos

Ruben Oliva Ramos is a computer systems engineer from Tecnologico de Leon Institute, with a master's degree in computer and electronic systems engineering and a specialization in teleinformatics and networking from the University of Salle Bajio in Leon, Guanajuato, Mexico. He has more than 5 years of experience of developing web applications to control and monitor devices connected with Arduino and Raspberry Pi, using web frameworks and cloud services to build the Internet of Things applications. He is a mechatronics teacher at the University of Salle Bajio and teaches students of the master's degree in design and engineering of mechatronics systems. Ruben also works at Centro de Bachillerato Tecnologico Industrial 225 teaching subjects such as electronics, robotics and control, automation, and microcontrollers. He is a consultant and developer for projects in areas such as monitoring systems and datalogger data using technologies (such as Android, iOS, HTML5, and ASP.NET), databases (such as SQlite, MongoDB, and MySQL), web servers, hardware programming, and control and monitor systems for data acquisition and programming.
Read more about Ruben Oliva Ramos

View More author details
Right arrow

Preface

The Raspberry Pi was first introduced by the Raspberry Pi foundation to promote the education of basic computer science in developing countries. Little did the foundation know that they had truly started a DIY home project revolution. A development board running a flavor of the Debian Linux distribution at only $25 complete with a multitude of hardware pins providing support for GPIO, UART, I2C, SPI, and more, was a godsend for tinkerers hoping to wire it up to control sensors and actuators for their home automation ideas. With the introduction of version 3 and Raspberry Pi Zero W, programmers can connect to Wi-Fi with the Pi without the need to use a USB Wi-Fi dongle.

Arduino boards were first launched in the early 2000s. With a real-time operating system, and onboard ATMega controllers, these boards have always been easy to program, and they have provided a great way to interface with analog devices. Their ability to read analog signals without a 2D chipset and the extremely low power consumption of some variants allows these boards to complement the Raspberry Pi for automation projects. Just like the Raspberry Pi, these boards also provide the ability to communicate on 12C, SPI, and other protocols. Some specialized variants, such as the ESP8266, also support Wi-Fi connectivity.

As you will read through the chapters in this book you will notice how we use the Raspberry Pi or an appropriate variant of Arduino as per the specific needs of the chapter. We will show you how to use these boards to create real-life, cool, practical automation projects.

What this book covers

Chapter 1, Creating a Raspberry Pi-Powered Magic Mirror, teaches you about the Raspberry Pi development board, how to navigate the command line using basic Linux commands, and how to set up the open source Magic Mirror modular platform to work with the Pi. Once we set up, we will take a look at configuring the Magic Mirror and integrating third-party modules to create a customized smart mirror experience.

Chapter 2, Automated Gardening System, begins by explaining how to build a simple smart gardening system that automatically waters your plants as needed. The chapter explores the use of an always-on low power Arduino Pro Mini setup and outdoor waterproofing options. We will go into the specifics of building a system that senses when your plants need watering so that you can maintain ideal conditions for your garden to grow.

Chapter 3, Integrating CheerLights into a Holiday Display, reveals how to craft a festive dynamic light display using CheerLights, ESP8266, and NeoPixels. It also navigates you through the functionality of the ESP8266 breakout board and shows you how you can get the world to light up your festive display through Twitter tweets. These Wi-Fi-connected lights change colors based on tweets sent from around the world.

Chapter 4, Erase Parking Headaches with OpenCV and Raspberry Pi, uses OpenCV, a Raspberry Pi with the Wheezy distribution, the Amazon Web Service’s Simple Notification System, and a webcam, to teach you how to create a notification system for a parking space.

Chapter 5, Building Netflix's The Switch for the Living Room, helps you design your own button, which, when pressed, will dim the lights, order pizza, turn on Netflix, and silence notifications on your phone—Netflix, being fans of the maker movement, put out a great project called The Switch. This is an excellent way to quickly get into the movie-watching mood, and it will be sure to impress any guests.

Chapter 6, Lock Down with a Windows IoT Face Recognition Door System, is for you, if you have ever wanted to create a locking system that relies on facial recognition. You will use ideas taken from Microsoft's Hack the Home initiative, the Raspberry Pi, an electric door strike, and other components to create a security system using Windows IoT Core for Raspberry Pi 3.

What you need for this book

For this book, the main component you will need is, of course, a control board, which, depending on the chapter, may be a Raspberry Pi or an Arduino-based board. The beginning of each chapter lists the complete list of items required to build your project. We will also show you how to program the control boards for the project and how to connect all the components together. We will guide you step-by-step through building the hardware so that you are not left behind.

An understanding of electronic hardware, networking, and basic programming skills would help you move quickly through the chapters, however, we will provide detailed explanations of the software setup in case you need more hand-holding at any point.

Who this book is for

This book is for you if you agree with one of these:

  • You have seen cool projects on the internet that amateur beginners have set up in their homes and you have an interest in hopping on the DIY automation bus, but don’t know where to start.
  • You have used the Raspberry Pi for a media center or as a Linux desktop and you want to take it to the next level and find the answer to the question "what else can it do?"
  • You want to impress your friends with your use of technology to simplify mundane everyday home tasks.
  • You want someone to hold your hand through creating some cool home automation setups so that you may get the confidence to try your own big idea next.

All the projects in this book are examples of how you may use these boards. You may customize these ideas for your own situations; it depends on what you want to do or create. Your creativity and imagination is the limit.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning. Code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Make sure your Raspberry Pi is updated and upgraded. You can do this by typing sudo apt-get update && sudo apt-get upgrade".

A block of code is set as follows:

{
module: 'module name',
position: 'position',
header: 'optional header',
config: {
extra option: 'value'
}
},

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

{
module: 'module name',
position: 'position',
header: 'optional header',
config: {
extra option: 'value'
}
},

Any command-line input or output is written as follows:

wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg –i node_latest_armhf.deb

New terms and important words are shown in bold.

Warnings or important notes appear like this.
Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important to us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply email feedback@packtpub.com, and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title. To view the previously submitted errata, go to https://www.packtpub.com/books/content/support, and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the internet, please provide us with the location address or website name immediately so that we can pursue a remedy. Please contact us at copyright@packtpub.com with a link to the suspected pirated material. We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Raspberry Pi 3 Home Automation Projects
Published in: Nov 2017Publisher: PacktISBN-13: 9781783283873
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Shantanu Bhadoria

Shantanu Bhadoria is an avid traveler and the author of several popular open source projects in Perl, Python, Golang, and Node.js, including many IoT projects. When in Singapore, he works on paging and building control systems for skyscrapers and large campuses in Singapore, Hong Kong, and Macau. He has authored and contributed to public projects dealing with control over gyroscopes, accelerometers, magnetometers, altimeters, PWM generators, and other sensors and controllers, as well as sensor fusion algorithms such as Kalman filters. Shantanu's work in IoT and other fields can be accessed on his GitHub account with the name shantanubhadoria. He is also the author of Device::SMBus, a popular Perl library used to control devices over the I2C bus.
Read more about Shantanu Bhadoria

author image
Ruben Oliva Ramos

Ruben Oliva Ramos is a computer systems engineer from Tecnologico de Leon Institute, with a master's degree in computer and electronic systems engineering and a specialization in teleinformatics and networking from the University of Salle Bajio in Leon, Guanajuato, Mexico. He has more than 5 years of experience of developing web applications to control and monitor devices connected with Arduino and Raspberry Pi, using web frameworks and cloud services to build the Internet of Things applications. He is a mechatronics teacher at the University of Salle Bajio and teaches students of the master's degree in design and engineering of mechatronics systems. Ruben also works at Centro de Bachillerato Tecnologico Industrial 225 teaching subjects such as electronics, robotics and control, automation, and microcontrollers. He is a consultant and developer for projects in areas such as monitoring systems and datalogger data using technologies (such as Android, iOS, HTML5, and ASP.NET), databases (such as SQlite, MongoDB, and MySQL), web servers, hardware programming, and control and monitor systems for data acquisition and programming.
Read more about Ruben Oliva Ramos