ESP8266 Home Automation Projects

Book Description

Unleash the power of the ESP8266 and build a complete home automation system with it.

About This Book

  • Harness the power of the ESP8266 Wi-Fi chip to build an effective Home Automation System
  • Learn about the various ESP8266 modules
  • Configuring the ESP8266 and making interesting home automation projects
  • A step-by-step guide on the ESP8266 chip and how to convert your home into a smart home.

Who This Book Is For

This book is targeted at people who want to build connected and inexpensive home automation projects using the ESP8266 Wi-Fi chip, and to completely automate their homes. A basic understanding of the board would be an added advantage

What You Will Learn

  • Get, compile, install, and configure an MQTT server
  • Use the Wi-Fi connectivity feature to control appliances remotely
  • Control several home appliances using the ESP8266 Wi-Fi chip
  • Control and monitor your home from the cloud using ESP8266 modules
  • Stream real-time data from the ESP8266 to a server over WebSockets
  • Create an Android mobile application for your project

In Detail

The ESP8266 is a low-cost yet powerful Wi-Fi chip that is becoming more popular at an alarming rate, and people have adopted it to create interesting projects.

With this book, you will learn to create and program home automation projects using the ESP8266 Wi-Fi chip. You will learn how to build a thermostat to measure and adjust the temperature accordingly and how to build a security system using the ESP8266. Furthermore, you will design a complete home automation system from sensor to your own cloud. You will touch base on data monitoring, controlling appliances, and security aspects.

By the end of the book, you will understand how to completely control and monitor your home from the cloud and from a mobile application. You will be familiar with the capabilities of the ESP8266 and will have successfully designed a complete ready-to-sell home automated system.

Style and approach

A practical book that will cover independent home automation projects.

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.

Publisher Resources

Download Example Code

Table of Contents

  1. Title Page
  2. Copyright
    1. ESP8266 Home Automation Projects
  3. Credits
  4. About the Author
  5. About the Reviewer
  6. www.PacktPub.com
    1. Why subscribe?
  7. Customer Feedback
  8. 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. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  9. Getting Started with the ESP8266
    1. Starting with the ESP8266 chip
    2. Installing Arduino IDE
      1. Downloading the Arduino Software IDE
      2. Configure Arduino IDE
      3. Installing the ESP8266 SDK
    3. How to install a library
      1. Libraries from the Arduino's repository
      2. Library is not in the repository
    4. It is time for your first program
      1. Seeing the result
    5. Connecting ESP8266 to Wi-Fi
    6. Getting data from the internet
    7. Sending data to the internet
    8. Summary
  10. Building and Configuring Your Own MQTT Server
    1. Message Queue Telemetry Transport
      1. Quality of service
      2. Security
      3. Retain messages and last will
      4. Basic terminology
      5. Wildcards on topics
    2. Introducing Mosquitto broker
    3. ESP8266 and MQTT
    4. Publishing data from the ESP8266
    5. Receiving MQTT messages in the ESP8266
    6. Securing Mosquitto
    7. Summary
  11. Building a Home Thermostat with the ESP8266
    1. SPIFFS
      1. SPIFFS objects
      2. Directory object
      3. File object
    2. Temperature sensor
    3. Summary
  12. Control Appliances from the ESP8266
    1. Using the WiFiManager library
      1. Adding parameters to the WiFiManager setup page and saving them into the file
    2. ESP8266 and Infrared communication
      1. Hardware components
      2. Software and libraries for this project
    3. Summary
  13. Using ESP8266 to Build a Security System
    1. Passive infrared sensor
      1. How PIRs work
      2. Testing the PIR module
      3. Connecting the PIR module to the internet
        1. The ESP8266 PIR security code
    2. Summary
  14. Securing Your Data
    1. Enabling encryption on mosquitto
      1. Installing the openssl package
      2. Generating your own certificates
    2. Securing a connection between ESP8266 and an MQTT broker
    3. Working offline
      1. Saving data on the SD card
    4. Summary
  15. Real-Time Communication
    1. WebSockets
      1. Protocol details
    2. Streaming data from ESP8266
      1. ADXL345 accelerometer
      2. Connection to the ESP8266
      3. ESP8266 code
        1. Backend code
        2. Public web page
    3. Summary
  16. Adding a Mobile Application to Your Smart Home
    1. Installing Docker and using containers
      1. Getting the development image
        1. Docker images
      2. Setting up the local broker
      3. ESP8266 code specifications
    2. Summary

Product Information

  • Title: ESP8266 Home Automation Projects
  • Author(s): Catalin Batrinu
  • Release date: November 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781787282629