Book Image

Home Automation with Intel Galileo

By : Onur Dundar
Book Image

Home Automation with Intel Galileo

By: Onur Dundar

Overview of this book

Table of Contents (16 chapters)
Home Automation with Intel Galileo
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

All of us have heard about the Internet of Things. Every new device is being developed around this new concept; all of them being connected. Our residences can't be outside of this world. We can design and create new use cases to connect every device we own at home to manage them through the Internet.

In this book, we have used the Intel Galileo development board to show the various methods to make a connected home using open source software and the Linux operating system to develop applications. We have tried to cover all common devices and sensors with sample applications developed with the C programming language, hoping to be an inspiration to help you make greater home automation applications.

We have tried to end the book by merging all the sample applications into one home automation application to manage devices remotely to make a connected home and easily automate and manage this with a smartphone, tablet, or a PC.

What this book covers

Chapter 1, Getting Started with Intel Galileo, introduces the Intel Galileo development board and presents step-by-step instructions for you to set up a development environment to get started with application development.

Chapter 2, Getting Started with Home Automation Applications, explains home automation concepts and introduces existing technologies and open source projects related to home automation.

Chapter 3, Energy Management with Environmental and Electrical Sensors, introduces sensors and devices for use in a home automation application. This chapter takes you inside the energy management with temperature sensors and power meters.

Chapter 4, Energy Management with Light Sensors and Extending Use Cases, introduces new sensors, which you can use to manage the lighting of your home with sample applications.

Chapter 5, Home Monitoring with Common Security Sensors, introduces new sensors and devices you can use to add security in your home. This chapter presents example applications to instruct you on how to use these sensors.

Chapter 6, Home Surveillance and Extending Security Use Cases, gets you inside the surveillance world with the help of a camera. This chapter tells you how you can use a camera with Intel Galileo and include it in your home automation application.

Chapter 7, Building Applications and Customizing Linux for Home Automation, introduces the basics of the Yocto project and how you can customize Linux to make Intel Galileo run your application and make it ready to serve as a home automation hub.

Chapter 8, Extending Use Cases, introduces other technologies available that can be used with Intel Galileo. We provide Node.js and Android application samples to extend our home automation application with a better user experience and user interface.

What you need for this book

For this book, you will need following hardware peripherals and software:

  • A computer running Ubuntu 12.04 or other Linux distribution (a virtual machine with Ubuntu 12.04 can be used as well depending on your preference).

  • An Intel Galileo Generation 2 development board.

  • A microSD card.

  • An Ethernet cable to connect Intel Galileo to your local network or router (if you have a PCI-e Wi-Fi card, you can use it to connect your Intel Galileo to your Wi-Fi router).

  • A USB to TTL serial cable (3.5 mm jack to USB serial cable is needed if you already have Intel Galileo Generation 1); the suggested cable is TTL-232R-3V3.

  • A micro USB to USB 2.0 cable.

  • Sensirion SHT11 or SHT15 temperature sensor.

    Note

    The following Z-Wave devices need to be selected according to your region. Each region (US, EU, and so on) has a different Z-Wave frequency. In this book, we have used EU devices.

  • A Z-Wave Aeon Labs Z-Stick S2 USB controller.

  • A Z-Wave Fibaro Wall plug.

  • Z-Wave Philio Multisensor—door / PIR / light / temperature.

  • A Z-Wave Everspring screw-in module.

  • A Z-Wave Everspring flood sensor.

  • MQ-9 gas sensor.

  • D-Link DCS-930L IP camera (any other IP cam or USB cam can also be used with its own configurations).

  • An Android smartphone (it is optional; in the last chapter, we develop a sample Android application. You can also use an Android virtual device. If you are already able to develop for other mobile devices, iOS, or the Windows phone, you can develop a similar sample application for them.)

Who this book is for

This book is aimed at developers, hobbyists, and makers who have some experience with Linux, C, and Arduino programming and want to explore opportunities in the home automation world. The book also includes some introductory examples and practices for people who are interested in starting software development for Intel Galileo, similar devices, and embedded Linux.

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 text are shown as follows: "The following piece of code shows two functions setGPIO(int number, int direction) and getGPIO(int number)."

A block of code is set as follows:

float readTemperature(){
  int register_address = 0x4600;
  return getTemperature(register_address);
}

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

float readTemperature(){
  int register_address = 0x4600;
return getTemperature(register_address);
}

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

$ cp /usr/src/asterisk-addons/configs/cdr_mysql.conf.sample
     /etc/asterisk/cdr_mysql.conf

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Now we can click on the Fibaro Wall Plug item on the list to switch it on or off from our smartphone."

URLs in the text are shown as follows: https://www.packtpub.com

Note

Warnings or important notes appear in a box like this.

Tip

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 for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , 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.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: https://www.packtpub.com/sites/default/files/downloads/5776OS_ColoredImages.pdf.

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 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 , and we will do our best to address the problem.