Chapter 7. Sending Notifications from the ESP8266

In this chapter, we are going to see how to integrate a very important element of the IoT with the ESP8266: notifications. IoT devices constantly alert users when something significant is happening, or simply at regular intervals, for example to report data.

We are going to see three scenarios in this chapter. First, we'll see how to send simple e-mail notifications from the ESP8266. Then, we'll learn how to make the chip regularly send data via text messages to your phone. Finally, we will see how to send alerts via push notifications. Let's start!

Hardware and software requirements

For this project, you will of course need an ESP8266 chip. As for most of this book, I used the Adafruit Huzzah ESP8266 module, but any ESP8266 module will work fine here.

As a sensor, I'll use the DHT11 sensor here just to illustrate the behavior of two out of the three scenarios in this chapter. However, you could use any sensor, or even use dummy data for this chapter. The goal is really to learn how to send notifications.

You will also need a 3.3V/5V FTDI USB module to program the ESP8266 chip.

Finally, you will also need some jumper wires and a breadboard.

This is a list of all the components that will be used in this chapter:

On the software side, if it's not been done yet, you will need to install the latest version of the Arduino IDE, which you can get from here:

http://www.arduino.cc/en/Main/Software

Then, you will need to have an IFTTT account, which we will use for all the projects in this chapter. IFTTT is a very cool web service that can put two web services in contact via "recipes" that are activated by a trigger (the If) which in return triggers an action (the that).

To create an account, simply go to:

https://ifttt.com/recipes

You will then be able to create your free account:

Hardware and software requirements
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.191.86