You are previewing BeagleBone Home Automation Blueprints.
O'Reilly logo
BeagleBone Home Automation Blueprints

Book Description

Automate and control your home using the power of the BeagleBone Black with practical home automation projects

About This Book

  • Build, set up, and develop your circuits via step-by-step tutorial of practical examples, from initial board setup to device driver management

  • Get access to several kinds of computer peripherals to monitor and control your domestic environment using this guide

  • This book is spread across 10 chapters all focused on one practical home automation project

  • Who This Book Is For

    This book is for developers who know how to use BeagleBone and are just above the “beginner” level. If you want to learn to use embedded machine learning capabilities, you should have some experience of creating simple home automation projects.

    What You Will Learn

  • Build a CO (and other gas) sensor with a buzzer/LED alarm to signal high concentrations

  • Log environment data and plot it in a fancy manner

  • Develop a simple web interface with a LAMP platform

  • Prepare complex web interfaces in JavaScript and get to know how to stream video data from a webcam

  • Use APIs to get access to a Google Docs account or a WhatsApp/Facebook account to manage a home automation system

  • Add custom device drivers to manage an LED with different blinking frequencies

  • Discover how to work with electronic components to build small circuits

  • Use an NFS, temperature sensor, relays, and other peripherals to monitor and control your surroundings

  • In Detail

    BeagleBone is a microboard PC that runs Linux. It can connect to the Internet and can run OSes such as Android and Ubuntu. BeagleBone is used for a variety of different purposes and projects, from simple projects such as building a thermostat to more advanced ones such as home security systems.

    Packed with real-world examples, this book will provide you with examples of how to connect several sensors and an actuator to the BeagleBone Black. You’ll learn how to give access to them, in order to realize simple-to-complex monitoring and controlling systems that will help you take control of the house. You will also find software examples of implementing web interfaces using the classical PHP/HTML pair with JavaScript, using complex APIs to interact with a Google Docs account, WhatsApp, or Facebook. This guide is an invaluable tutorial if you are planning to use a BeagleBone Black in a home automation project.

    Style and approach

    This step-by-step guide contains several home automation examples that can be used as base projects for tons of other home automation and control systems. Through clear, concise examples based on real-life situations, you will quickly get to grips with the core concepts needed to develop home automation applications with the BeagleBone Black using both the C language and high-level scripting languages such as PHP, Python, and JavaScript.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. BeagleBone Home Automation Blueprints
      1. Table of Contents
      2. BeagleBone Home Automation Blueprints
      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
          1. Software prerequisites
          2. Hardware prerequisites
        3. Who this book is for
        4. Conventions
          1. Codes and command lines
          2. Kernel and logging messages
          3. File modifications
          4. Serial and network connections
          5. Other conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Dangerous Gas Sensors
        1. The basic of functioning
        2. Setting up the hardware
          1. Connecting the gas sensors
          2. Connecting the alarm actuators
            1. LED and buzzer
            2. GSM module
          3. The final picture
        3. Setting up the software
          1. Managing the ADCs
          2. Managing the actuators
          3. Controlling the environment
        4. Final test
        5. Summary
      9. 2. Ultrasonic Parking Assistant
        1. The basic of functioning
        2. Setting up the hardware
          1. First setup – all devices near the BeagleBone Black
            1. Using the analog output of the distance sensor
            2. Connecting the LEDs in the first setup
          2. Second setup – the distance sensor is remotized
            1. Using the serial output of the distance sensor
            2. Connecting the LEDs in the second setup
          3. The final picture
        3. Setting up the software
          1. Managing the LEDs
        4. The distance monitor
        5. Final test
        6. Summary
      10. 3. Aquarium Monitor
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the 12V devices
          2. Setting up the webcam
          3. Connecting the temperature sensor
          4. Connecting the feeder
          5. The water sensor
          6. The final picture
        3. Setting up the software
          1. Managing the system status and configuration
          2. Building up the web control panel
          3. Handling the control panel
          4. Knowing the internal state-machine
        4. Final test
        5. Summary
      11. 4. Google Docs Weather Station
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the temperature/humidity sensor
          2. Setting up the barometric sensor
          3. The final picture
        3. Setting up the software
          1. Installing a new kernel
          2. Running the weather station software
          3. Adding the Google Docs API
        4. Final test
        5. Summary
      12. 5. WhatsApp Laundry Room Monitor
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the sound detector
          2. Setting up the light sensor
          3. Connecting the LEDs
          4. The final picture
        3. Setting up the software
          1. The sound detector manager
          2. The light sensor manager
          3. Controlling the LEDs
          4. Setting up the WhatsApp API
          5. The state-machine
        4. Final test
        5. Summary
      13. 6. Baby Room Sentinel
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the contactless temperature sensor
          2. Setting up the pressure sensor
          3. Setting up the sound detector
          4. Connecting the tiny LCD
          5. The final picture
        3. Setting up the software
          1. The ADC manager
          2. The LCD manager
        4. Final test
        5. Summary
      14. 7. Facebook Plant Monitor
        1. The basics of functioning
        2. Setting up the hardware
          1. Connecting the moisture sensor
          2. Connecting the light sensor
          3. Setting up the contactless temperature sensor
          4. Setting up the waterproof temperature sensor
          5. Setting up the webcam
          6. Adding a water pump
          7. The final picture
        3. Setting up the software
          1. The Facebook API
            1. Downloading the code
            2. Creating a new Facebook app
            3. Getting access to the Facebook account
          2. The monitoring loop
          3. The web interface
        4. Final test
        5. Summary
      15. 8. Intrusion Detection System
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the webcams
          2. The final picture
        3. Setting up the software
          1. Setting up the mailer
          2. Using motion
            1. Downloading the code
            2. Configuring the daemon
          3. The web interface
          4. Managing events
        4. Final test
        5. Summary
      16. 9. Twitter Access Control System with Smart Card and RFID
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the smart card reader
          2. Setting up the RFID LF reader
          3. Setting up the RFID UHF reader
          4. The final picture
        3. Setting up the software
          1. Setting up the Twitter utility
          2. The smart card implementation
          3. The RFID LF implementation
          4. The RFID UHF implementation
        4. Final test
        5. Summary
      17. 10. A Lights Manager with a TV Remote Controller
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the infrared detector
          2. Setting up the relays array
          3. The final picture
        3. Setting up the software
          1. Setting up the kernel driver
          2. The LIRC tools
          3. The input events manager
        4. The final test
        5. Summary
      18. 11. A Wireless Home Controller with Z-Wave
        1. The basics of functioning
        2. Setting up the hardware
          1. Setting up the Z-Wave controller
          2. Setting up the Z-Wave wall plug
          3. Setting up the Z-Wave multisensor
          4. The final picture
        3. Setting up the software
          1. Setting up the Python bindings
          2. The Z-Wave manager
        4. The final test
        5. Summary
      19. Index