Control Things using Amazon Alexa

Published Sep 06, 2018
 8 hours to build
 Intermediate

Built an application to control home appliances like fan, 60 W Bulb using Amazon Alexa.

display image

Components Used

NodeMCU
NodeMCUNodeMCU
1
Relay Module Single Channel
Relay Module Single Channel
1
Lamps
Lamps Candelabra Screw 230V
1
Description

Introduction

Alexa is Amazon’s cloud-based voice service available on millions of devices from Amazon and third-party device manufacturers. This service is also available on smartphones.

With Alexa, we can build natural voice experiences that offer customers a more intuitive way to interact with the technology they use every day.

We can control smart home devices including lights, switches, fans and thermostats using our Amazon Alexa.

I build an application which can control home appliances like 60W bulb and fan using Amazon Alexa.

This application includes Amazon Alexa along with Adafruit server and IFTTT service.

Hardware Used

·         NodeMCU – 32-bit ESP8266 development board with Wi-Fi SoC.

·         Relay module

·         One 60 W Bulb

·         DC Motor as fan

To build home automation application, I used three different platforms

·         Amazon Alexa

·         Adafruit

·         IFTTT

To use above services, we need to configure them.

Adafruit

To control things or appliances from Adafruit dashboard, I created dashboard with two different feeds for light and fan (DC motor as fan).

To know about how to create dashboard and feed on Adafruit, you can refer my project Control appliances using google assistant.

Now, my dashboard is ready for IoT application like IoT based application like home automation.

IFTTT

Create Applet for Amazon Alexa and Adafruit on IFTTT to create a bridge between Alexa and Adafruit. I have created four applets i.e. two for fan and light ON and other two for fan and light OFF

To know how to create applet on IFTTT for controlling things or appliances, one can visit my project Control appliances using google assistant.

Interfacing Diagram

 

Control Bulb and Fan using Amazon Alexa

Library

Here, I used Adafruit MQTT library for receiving data from Adafruit server. To install this library, select option Sketch -> Include Library -> Manage Libraries.

In that library, search for Adafruit MQTT and installed it.

Control Light and Fan using Amazon Alexa and NodeMCU

I build an IoT based home appliances control application in which I control the 60 W bulb and Fan remotely using AI based Alexa.

Here, I used NodeMCU to read data from Adafruit server and act accordingly. 60 W bulb connected to NodeMCU via relay for controlling it, I use voice command using google assistant. Whereas Fan is directly connected to digital I/O of NodeMCU.

Video

Codes
Comments
Ad