Book Image

ESP8266 Home Automation Projects

By : Catalin Batrinu, Constantin Tambrea
Book Image

ESP8266 Home Automation Projects

By: Catalin Batrinu, Constantin Tambrea

Overview of this book

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.
Table of Contents (16 chapters)
Title Page
About the Author
About the Reviewer
Customer Feedback
Building a Home Thermostat with the ESP8266
Using ESP8266 to Build a Security System

Message Queue Telemetry Transport

Usually, end devices have a limited memory and CPU power, running on batteries, so connecting them with servers requires a light protocol. Enter MQTT, which was invented in 1999 by Andy Stanford-Clark from IBM and Arlen Nipper from Arcom, a SCADA protocol design initially for battery operated devices to supervise oil pipelines. Later in 2010, IBM released it as a royalty-free protocol. In 2014, OASIS announced that the MQTT v.3.1.1 had become an OASIS standard and a lot of MQTT clients were developed for all programming languages.

The characteristics of MQTT are listed as follows:

  • Data agnostic: MQTT can transport all kind of data, from sensor data to images or over the air updates
  • Lightweight and bandwidth efficient: Smallest frame is only 2 bytes long
  • Provide QoS: Three Quality of Service (QoS) levels
  • Runs on top of the TCP/IP stack
  • Simple to develop: Clients exist for all operating systems and programming languages
  • Central broker: Can connect different devices...