O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BeagleBone Home Automation

Book Description

The Internet of Things is now being taken up by tech corporations but this fantastic book brings you the DIY approach to home automation using BeagleBone. From dimming the lights to opening the garage door –– it’s all here.

  • Practical approach to home automation using BeagleBone; starting from the very basics of GPIO control and progressing up to building a complete home automation solution
  • Covers the operating principles of a range of useful environment sensors, including their programming and integration to the server application
  • Easy-to-follow approach with electronics schematics, wiring diagrams, and controller code all broken down into manageable and easy-to-understand sections

In Detail

Home automation lets you control daily activities such as changing the temperature, opening the garage door, or dimming the lights of your house using microprocessors. BeagleBone is a low-cost, high-expansion, hardware-hacker-focused BeagleBoard. It is small and comes with the high-performance ARM capabilities you expect from a BeagleBoard. BeagleBone takes full-featured Linux to places it has never gone before.

Starting with the absolute basics, BeagleBone Home Automation gives you the knowledge you will require to create an Internet-age home automation solution. This book will show you how to set up Linux on BeagleBone. You will learn how to use Python to control different electronic components and sensors to create a standalone embedded system that also accepts control remotely from a smartphone.

This book starts with the very basics of Linux administration and application execution using terminal connections. You will learn the basics of the general purpose input/output pins and discover how various electronic sensors and electronic components work. The “hardware jargon” is explained, and example applications demonstrating their practical use are created so that you will feel in control of the capabilities provided.

Network programming is also a big part of this book, as the created server will be made accessible from the Internet through a smartphone application. You will also learn how to create a fully working Android application that communicates with the home automation server over the Internet.

Table of Contents

  1. BeagleBone Home Automation
    1. Table of Contents
    2. BeagleBone Home Automation
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. The Initial Setup
      1. The hardware required
      2. The software required
      3. Preparing the host machine
        1. Windows
        2. Mac OS X
        3. Linux
      4. Starting the target board for the first time
      5. Logging in to the system
      6. Operating Linux from the console
        1. Basic filesystem operations
        2. File permissions
      7. Running a Hello World program on BeagleBone
      8. Summary
    9. 2. Input and Output
      1. Hardware interfaces
      2. General-Purpose Input/Output pins (GPIOs)
        1. On-board LEDs
        2. GPIO library for Python
          1. Setting the proper time
        3. External output
        4. External hardware input
        5. Pulse width modulator
      3. Summary
    10. 3. Creating the Client and Server Applications
      1. Sockets
        1. An example socket application
      2. Echo server
      3. Echo client
      4. Summary
    11. 4. Extending Server Capabilities
      1. Environmental sensors
        1. Light sensor
        2. Temperature sensor
      2. Advanced server
        1. Defining our Beagle protocol
        2. The new server code
        3. The new client code
      3. Transistors
      4. Summary
    12. 5. Implementing Periodic Tasks
      1. Implementing a save/load framework
        1. Retrieving and changing permanent settings
          1. The client side
          2. The server side
      2. Periodic tasks on the server
      3. Movement-detection alarm system
      4. Hardware extensions
        1. BeagleBone HD camera cape
          1. Changing the boot media
          2. Controlling cameras with Python
      5. Summary
    13. 6. Creating an Android Client
      1. Setting up our Android project
        1. Creating an emulator
      2. The socket client on Android
        1. Defining the UI components
          1. Application permissions
        2. The support classes
        3. The main UI
        4. The network thread
      3. The new server features
      4. Working from outside your home network
      5. Summary
    14. A. Security, Debugging, and I2C and SPI
      1. Kernel traces and advanced debugging
        1. Boot time kernel traces
        2. JTAG debugging
      2. The I2C and SPI buses
        1. The I2C bus
          1. Generating the start signal
          2. The Slave address transfer
          3. Transferring data
          4. Generating the STOP signal
        2. The SPI bus
      3. Considering the security aspects
        1. Making the client identify his intentions first
        2. Implementing the encrypted password login
          1. Version 2.1 modifications to the server code
          2. Version 2.2 modifications to Android client code
        3. Encrypting all of the communication
      4. The GPIO mapping of the P8 and P9 headers
    15. Index