Md. Khairul AlamUmme Nur Mafiha Majid
Published © MIT

Voice Controlled Smart Home

Control your home appliances by using your voice.

IntermediateFull instructions provided5 hours18,355

Things used in this project

Hardware components

Amazon Echo
Amazon Alexa Amazon Echo
Optional (Raspberry Pi can do the job)
×1
Raspberry Pi 1 Model B
Raspberry Pi 1 Model B
Other version should also work.
×1
Relay (generic)
Using relay module can make the task easy.
×4
Pi-Cubes Raspberry Pi compatible WiFi adapter.
×1

Software apps and online services

Alexa Skills Kit
Amazon Alexa Alexa Skills Kit
Alexa Voice Service
Amazon Alexa Alexa Voice Service
AWS IoT
Amazon Web Services AWS IoT
AWS Lambda
Amazon Web Services AWS Lambda

Story

Read more

Schematics

Voice User Interface (VUI) diagram

Only a few sample voice commands are added in the diagram. To see all the available voice command please see the Sample Utterances section.

Block Diagram

How the system works. One Raspberry Pi can work as Alexa Voice Client & Paho MQTT Client simultaneously.

Schematic

Designed in Fritzing.

Fritzing Source File

Code

Raspberry PI

Python
import paho.mqtt.client as mqtt
import ssl
import json
import RPi.GPIO as GPIO
import time

# make sure python gpio library is installed
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
kitchenLightPin = 23 # Broadcom pin 23 (P1 header pin 16)
bedLightPin = 10     # Broadcom pin 17 (P1 header pin 19)
bedFanPin = 11       # Broadcom pin 27 (P1 header pin 23)
bathLightPin = 22    # Broadcom pin 22 (P1 header pin 15)
GPIO.setup(kitchenLightPin, GPIO.OUT) # pin set as output
GPIO.setup(bedLightPin, GPIO.OUT)     # pin set as output
GPIO.setup(bedFanPin, GPIO.OUT)       # pin set as output
GPIO.setup(bathLightPin, GPIO.OUT)    # pin set as output
GPIO.output(kitchenLightPin, GPIO.LOW)
GPIO.output(bedLightPin, GPIO.LOW)
GPIO.output(bedFanPin, GPIO.LOW)
GPIO.output(bathLightPin, GPIO.LOW)

client = mqtt.Client()

def on_connect(client, userdata, flags, rc):
    print("Connected with result code "+str(rc))
    client.subscribe("taifur/test/pi/voice")

def on_message(client, userdata, msg):
    
     if str(msg.payload) == 'Kitchenlighton':
        print("Kitchen light on command received ")
        print(str(msg.payload))
        GPIO.output(kitchenLightPin, GPIO.HIGH)  # gpio pin high
        
     if str(msg.payload) == 'Kitchenlightoff':
        print("Kitchen light off command received ")
        print(str(msg.payload))
        GPIO.output(kitchenLightPin, GPIO.LOW)

     if str(msg.payload) == 'Bedlighton':
        print("Bedroom light on command received ")
        print(str(msg.payload))
        GPIO.output(bedLightPin, GPIO.HIGH)  # gpio pin high
        
     if str(msg.payload) == 'Bedlightoff':
        print("Bedroom light off command received ")
        print(str(msg.payload))
        GPIO.output(bedLightPin, GPIO.LOW)

     if str(msg.payload) == 'Bedroomfanon':
        print("Bedroom fan on command received ")
        print(str(msg.payload))
        GPIO.output(bedFanPin, GPIO.HIGH)  # gpio pin high
        
     if str(msg.payload) == 'Bedroomfanoff':
        print("Bedroom fan off command received ")
        print(str(msg.payload))
        GPIO.output(bedFanPin, GPIO.LOW)

     if str(msg.payload) == 'Bathroomlighton':
        print("Bathroom light on command received ")
        print(str(msg.payload))
        GPIO.output(bathLightPin, GPIO.HIGH)  # gpio pin high
        
     if str(msg.payload) == 'Bathroomlightoff':
        print("Bathroom light off command received ")
        print(str(msg.payload))
        GPIO.output(bathLightPin, GPIO.LOW)
       
        

client.on_connect = on_connect
client.on_message = on_message

client.tls_set(ca_certs='rootCA.pem', certfile='certificate.pem.crt', keyfile='private.pem.key', cert_reqs=ssl.CERT_REQUIRED, tls_version=ssl.PROTOCOL_SSLv23, ciphers=None)
client.connect("a3jra11pv5kiyg.iot.us-east-1.amazonaws.com", 8883, keepalive=60)
client.loop_forever()

AWS Lambda

JavaScript
Save the code as named index.js
/**
 * Alexa voice home automation
 * Developed by Md. Khairul Alam
 * Date: 25 August, 2016
 */
var awsIot = require('aws-iot-device-sdk');
var deviceName = "voice-chair";   //thing name from AWS IoT
var host = "a3jra11pv5kiyg.iot.us-east-1.amazonaws.com"; //host address
var app_id = "amzn1.ask.skill.2b38790d-905a-4005-ad73-908f63e1622f" //app id from Alexa skill
/*
 thing shadow requires the private key, certificate and rooCA file you 
 downloaded at the time of certificate creation of AWS IoT
*/

var thingShadows = awsIot.thingShadow({
   keyPath: './private.pem.key',
  certPath: './certificate.pem.crt',
    caPath: './rootCA.pem',
  clientId: deviceName,
    region: "us-east-1",
});

var ctx = null;

// Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the request is provided in the event parameter.
exports.handler = function (event, context) {
    try {
        console.log("event.session.application.applicationId=" + event.session.application.applicationId);
        ctx = context;

        if (event.session.application.applicationId !== app_id) {
             ctx.fail("Invalid Application ID");
         }
 
        thingShadows.on('connect', function() {
			thingShadows.register('voice-chair');
 
		});
		
		thingShadows.on('message', function(topic, payload) {
            console.log('message', topic, payload.toString());
        });
     
        if (event.session.new) {
            onSessionStarted({requestId: event.request.requestId}, event.session);
        }
        if (event.request.type === "LaunchRequest") {
            onLaunch(event.request, event.session);
        }  else if (event.request.type === "IntentRequest") {
            onIntent(event.request, event.session);
        } else if (event.request.type === "SessionEndedRequest") {
            onSessionEnded(event.request, event.session);
            ctx.succeed();
        }
    } catch (e) {
        console.log("EXCEPTION in handler:  " + e);
        ctx.fail("Exception: " + e);
    }
};

/**
 * Called when the session starts.
 */
function onSessionStarted(sessionStartedRequest, session) {
    console.log("onSessionStarted requestId=" + sessionStartedRequest.requestId + ", sessionId=" + session.sessionId);
}


/**
 * Called when the user launches the skill without specifying what they want.
 */
function onLaunch(launchRequest, session, callback) {
    console.log("onLaunch requestId=" + launchRequest.requestId + ", sessionId=" + session.sessionId);

    // Dispatch to your skill's launch.
    getWelcomeResponse(callback);
}

/**
 * Called when the user specifies an intent for this skill.
 */
function onIntent(intentRequest, session ) {                  //, callback) {
    console.log("onIntent requestId=" + intentRequest.requestId + ", sessionId=" + session.sessionId);

    var intent = intentRequest.intent,
    intentName = intentRequest.intent.name;

    console.log("REQUEST to string =" + JSON.stringify(intentRequest));

    var callback = null;
    // Dispatch to your skill's intent handlers
    if ("BedroomLightOn" === intentName) {
		thingShadows.publish('taifur/test/pi/voice', 'Bedlighton', function(){
			var cardTitle = "Bedroom Lamp on";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your bedroom light is on. ";
			repromptText = "Your bedroom light is on. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
	
    }else if ("BedroomLightOff" === intentName) {
		thingShadows.publish('taifur/test/pi/voice', 'Bedlightoff', function(){
			var cardTitle = "Lamp on";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your bedroom light is off. ";
			repromptText = "Your bedroom light is off. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
	
    }else if ("KitchenLightOn" === intentName) {
		thingShadows.publish('taifur/test/pi/voice', 'Kitchenlighton', function(){
			var cardTitle = "Lamp on";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your kitchen light is on. ";
			repromptText = "Your kitchen light is on. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
	
    }else if ("KitchenLightOff" === intentName) {
		thingShadows.publish('taifur/test/pi/voice', 'Kitchenlightoff', function(){
			var cardTitle = "Lamp on";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your kitchen light is off. ";
			repromptText = "Your kitchen light is off. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
	
    }else if ("BathroomLightOn" === intentName) {
		thingShadows.publish('taifur/test/pi/voice', 'Bathroomlighton', function(){
			var cardTitle = "Lamp on";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your bathroom light is on. ";
			repromptText = "Your bathroom light is on. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
	
    }else if ("BathroomLightOff" === intentName) {
        thingShadows.publish('taifur/test/pi/voice', 'Bathroomlightoff', function(){
			var cardTitle = "Lamp off";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your bathroom light is off. ";
			repromptText = "Your bathroom light is off. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
		
    }else if ("BedroomFanOn" === intentName) {
		thingShadows.publish('taifur/test/pi/voice', 'Bedroomfanon', function(){
			var cardTitle = "Lamp on";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your bedroom fan is on. ";
			repromptText = "Your bedroom fan is on. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
	
    }else if ("BedroomFanOff" === intentName) {
        thingShadows.publish('taifur/test/pi/voice', 'Bedroomfanoff', function(){
			var cardTitle = "Lamp off";
			var repromptText = "";
			var sessionAttributes = {};
			var shouldEndSession = false;
			var speechOutput = "Your bedroom fan is off. ";
			repromptText = "Your bedroom fan is off. ";
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
		});
		
    }else if ("IncreaseSpeed" === intentName) {
		  var speedLevelSlotInc = intent.slots.Speed;
		  var speedLevelInc = speedLevelSlotInc.value;
	      thingShadows.publish('taifur/test/pi/voice', 'Inc' +speedLevelInc, function(){
		    var cardTitle = "Fan Speed";
		    var repromptText = "";
		    var speechOutput = "Fan speed is adjusted to " + speedLevelInc + " percent. ";
			var sessionAttributes = {};
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));			
	    });
	
	}else if ("DecreaseSpeed" === intentName) {
          var speedLevelSlot = intent.slots.Speed;
		  var speedLevel = speedLevelSlot.value;
	      thingShadows.publish('taifur/test/pi/voice', 'Dec' +speedLevel, function(){
		    var cardTitle = "Fan Speed";
		    var repromptText = "";
		    var speechOutput = "Fan speed is adjusted to " + speedLevel + " percent. ";
			var sessionAttributes = {};
			var shouldEndSession = false;
			ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));			
	    });
		
    }else if ("AMAZON.HelpIntent" === intentName) {
        getHelp(callback);
    }else if ("AMAZON.StopIntent" === intentName || "AMAZON.CancelIntent" === intentName) {
        handleSessionEndRequest(callback);
    }else {
        throw "Invalid intent";
    }

}

/**
 * Called when the user ends the session.
 * Is not called when the skill returns shouldEndSession=true.
 */
function onSessionEnded(sessionEndedRequest, session) {
    console.log("onSessionEnded requestId=" + sessionEndedRequest.requestId + ", sessionId=" + session.sessionId);
    // Add cleanup logic here
}

// --------------- Functions that control the skill's behavior -----------------------

function getWelcomeResponse() {
    // If we wanted to initialize the session to have some attributes we could add those here.
    var sessionAttributes = {};
    var cardTitle = "Welcome";
    var speechOutput = "Welcome to Pi Home Master . I can control your electrical appliances. Tell me what can I do for you. ";

    var repromptText = "I am ready for command.";
    var shouldEndSession = false;

    ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));

}

function getHelp() {
	var sessionAttributes = {};
    var cardTitle = "Help";
    var speechOutput = "Welcome to pi home master, I can control your light and fan. " + 
    "You can ask me by saying, turn on my bedroom light or turn off my bedroom fan.";
    var repromptText = "Would you like to control your light or fan?";
    var shouldEndSession = false;

    ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
}

function handleSessionEndRequest() {
	var sessionAttributes = {};
    var cardTitle = "Session Ended";
    var speechOutput = "Thank you for using pi home master, Have a nice day!";
    var shouldEndSession = true;
	var repromptText = "";
    ctx.succeed(buildResponse(sessionAttributes, buildSpeechletResponse(cardTitle, speechOutput, repromptText, shouldEndSession)));
}


// --------------- Helpers that build all of the responses -----------------------

function buildSpeechletResponse(title, output, repromptText, shouldEndSession) {
    return {
        outputSpeech: {
            type: "PlainText",
            text: output
        },
        card: {
            type: "Simple",
            title: title,
            content: output
        },
        reprompt: {
            outputSpeech: {
                type: "PlainText",
                text: repromptText
            }
        },
        shouldEndSession: shouldEndSession
    }
}

function buildResponse(sessionAttributes, speechletResponse) {
    return {
        version: "1.0",
        sessionAttributes: sessionAttributes,
        response: speechletResponse
    }
}

rootCA

Plain text
Same for all
-----BEGIN CERTIFICATE-----
MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB
yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL
MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln
biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1
nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex
t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz
SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG
BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+
rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/
NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
-----END CERTIFICATE-----

Intent Schema

JSON
{
  "intents": [
    {
      "intent": "BedroomLightOn"
    },
    {
      "intent": "BedroomLightOff"
    },
    {
      "intent": "KitchenLightOn"
    },
    {
      "intent": "KitchenLightOff"
    },
    {
      "intent": "BathroomLightOn"
    },
    {
      "intent": "BathroomLightOff"
    },
    {
      "intent": "BedroomFanOn"
    },
    {
      "intent": "BedroomFanOff"
    },
    {
      "intent": "AMAZON.HelpIntent"
    },
    {
      "intent": "AMAZON.StopIntent"
    },
    {
      "intent": "AMAZON.CancelIntent"
    }
  ]
 }

Sample Utterances

Plain text
BedroomLightOn on bedroom light
BedroomLightOn turn on bedroom light
BedroomLightOn turn on my bedroom light
BedroomLightOn turn on the bedroom light
BedroomLightOn on bedroom lamp
BedroomLightOn turn on bedroom lamp
BedroomLightOn turn on my bedroom lamp
BedroomLightOn turn on the bedroom lamp
BedroomLightOn turn the bedroom lamp on
BedroomLightOn turn the bedroom light on
BedroomLightOn turn my bedroom lamp on
BedroomLightOn turn my bedroom light on
BedroomLightOn bedroom light on
BedroomLightOn bedroom lamp on
BedroomLightOn make the bedroom lamp on
BedroomLightOn make the bedroom light on
BedroomLightOn make my bedroom lamp on
BedroomLightOn make my bedroom light on
BedroomLightOn make bedroom lamp on
BedroomLightOn make bedroom light on
BedroomLightOn switch on the bedroom light
BedroomLightOn switch on the bedroom lamp
BedroomLightOn switch on my bedroom light
BedroomLightOn switch on my bedroom lamp
BedroomLightOn switch on bedroom light
BedroomLightOn switch on bedroom lamp
BedroomLightOn light my bedroom
BedroomLightOn light the bedroom
BedroomLightOn bright my bedroom
BedroomLightOn bright the bedroom
BedroomLightOn make bedroom bright
BedroomLightOn i want light on my bedroom
BedroomLightOn i want light on the bedroom


BedroomLightOff off bedroom light
BedroomLightOff turn off bedroom light
BedroomLightOff turn off my bedroom light
BedroomLightOff turn off the bedroom light
BedroomLightOff off bedroom lamp
BedroomLightOff turn off bedroom lamp
BedroomLightOff turn off my bedroom lamp
BedroomLightOff turn off the bedroom lamp
BedroomLightOff turn the bedroom lamp off
BedroomLightOff turn the bedroom light off
BedroomLightOff turn my bedroom lamp off
BedroomLightOff turn my bedroom light off
BedroomLightOff bedroom light off
BedroomLightOff bedroom lamp off
BedroomLightOff make the bedroom lamp off
BedroomLightOff make the bedroom light off
BedroomLightOff make my bedroom lamp off
BedroomLightOff make my bedroom light off
BedroomLightOff make bedroom lamp off
BedroomLightOff make bedroom light off
BedroomLightOff switch off the bedroom light
BedroomLightOff switch off the bedroom lamp
BedroomLightOff switch off my bedroom light
BedroomLightOff switch off my bedroom lamp
BedroomLightOff switch off bedroom light
BedroomLightOff switch off bedroom lamp
BedroomLightOff dark my bedroom
BedroomLightOff dark the bedroom
BedroomLightOff keep my bedroom dark
BedroomLightOff keep the bedroom dark
BedroomLightOff make bedroom dark
BedroomLightOff i want no light on my bedroom
BedroomLightOff i want no light on the bedroom
BedroomLightOff i want to sleep now
BedroomLightOff i will sleep now
BedroomLightOff i wanna sleep now
BedroomLightOff i wanna sleep


KitchenLightOn on kitchen light
KitchenLightOn on my kitchen light
KitchenLightOn on the kitchen light
KitchenLightOn on the kitchen lamp
KitchenLightOn on my kitchen lamp
KitchenLightOn turn on kitchen light
KitchenLightOn turn on my kitchen light
KitchenLightOn turn on the kitchen light
KitchenLightOn on kitchen lamp
KitchenLightOn turn on kitchen lamp
KitchenLightOn turn on my kitchen lamp
KitchenLightOn turn on the kitchen lamp
KitchenLightOn turn the kitchen lamp on
KitchenLightOn turn the kitchen light on
KitchenLightOn turn my kitchen lamp on
KitchenLightOn turn my kitchen light on
KitchenLightOn kitchen light on
KitchenLightOn kitchen lamp on
KitchenLightOn make the kitchen lamp on
KitchenLightOn make the kitchen light on
KitchenLightOn make my kitchen lamp on
KitchenLightOn make my kitchen light on
KitchenLightOn make kitchen lamp on
KitchenLightOn make kitchen light on
KitchenLightOn switch on the kitchen light
KitchenLightOn switch on the kitchen lamp
KitchenLightOn switch on kitchen light
KitchenLightOn switch on kitchen lamp
KitchenLightOn light my kitchen
KitchenLightOn light the kitchen
KitchenLightOn bright my kitchen
KitchenLightOn bright the kitchen
KitchenLightOn make kitchen bright
KitchenLightOn i want light on my kitchen
KitchenLightOn i want light on the kitchen
KitchenLightOn i want to cook now
KitchenLightOn i wanna cook now
KitchenLightOn i will cook now
KitchenLightOn i wanna cook
KitchenLightOn i want to cook


KitchenLightOff off kitchen light
KitchenLightOff off my kitchen light
KitchenLightOff off the kitchen light
KitchenLightOff off the kitchen lamp
KitchenLightOff off my kitchen lamp
KitchenLightOff turn off kitchen light
KitchenLightOff turn off my kitchen light
KitchenLightOff turn off the kitchen light
KitchenLightOff off kitchen lamp
KitchenLightOff turn off kitchen lamp
KitchenLightOff turn off my kitchen lamp
KitchenLightOff turn off the kitchen lamp
KitchenLightOff turn the kitchen lamp off
KitchenLightOff turn the kitchen light off
KitchenLightOff turn my kitchen lamp off
KitchenLightOff turn my kitchen light off
KitchenLightOff kitchen light off
KitchenLightOff kitchen lamp off
KitchenLightOff make the kitchen lamp off
KitchenLightOff make the kitchen light off
KitchenLightOff make my kitchen lamp off
KitchenLightOff make my kitchen light off
KitchenLightOff make kitchen lamp off
KitchenLightOff make kitchen light off
KitchenLightOff switch off the kitchen light
KitchenLightOff switch off the kitchen lamp
KitchenLightOff switch off kitchen light
KitchenLightOff switch off kitchen lamp
KitchenLightOff dark my kitchen
KitchenLightOff dark the kitchen
KitchenLightOff make kitchen dark
KitchenLightOff i don't want light on my kitchen
KitchenLightOff i don't like bright kitchen



BathroomLightOn on bathroom light
BathroomLightOn on my bathroom light
BathroomLightOn on the bathroom light
BathroomLightOn on the bathroom lamp
BathroomLightOn on my bathroom lamp
BathroomLightOn turn on bathroom light
BathroomLightOn turn on my bathroom light
BathroomLightOn turn on the bathroom light
BathroomLightOn on bathroom lamp
BathroomLightOn turn on bathroom lamp
BathroomLightOn turn on my bathroom lamp
BathroomLightOn turn on the bathroom lamp
BathroomLightOn turn the bathroom lamp on
BathroomLightOn turn the bathroom light on
BathroomLightOn turn my bathroom lamp on
BathroomLightOn turn my bathroom light on
BathroomLightOn bathroom light on
BathroomLightOn bathroom lamp on
BathroomLightOn make the bathroom lamp on
BathroomLightOn make the bathroom light on
BathroomLightOn make my bathroom lamp on
BathroomLightOn make my bathroom light on
BathroomLightOn make bathroom lamp on
BathroomLightOn make bathroom light on
BathroomLightOn switch on the bathroom light
BathroomLightOn switch on the bathroom lamp
BathroomLightOn switch on my bathroom light
BathroomLightOn switch on my bathroom lamp
BathroomLightOn switch on bathroom light
BathroomLightOn switch on bathroom lamp
BathroomLightOn light my bathroom
BathroomLightOn light the bathroom
BathroomLightOn bright my bathroom
BathroomLightOn bright the bathroom
BathroomLightOn make bathroom bright
BathroomLightOn make the bathroom bright
BathroomLightOn make my bathroom bright
BathroomLightOn i want light on my bathroom
BathroomLightOn i want light on the bathroom
BathroomLightOn i want to go bathroom now
BathroomLightOn i wanna bath now
BathroomLightOn i will bath now


BathroomLightOff off bathroom light
BathroomLightOff off my bathroom light
BathroomLightOff off the bathroom light
BathroomLightOff off the bathroom lamp
BathroomLightOff off my bathroom lamp
BathroomLightOff turn off bathroom light
BathroomLightOff turn off my bathroom light
BathroomLightOff turn off the bathroom light
BathroomLightOff off bathroom lamp
BathroomLightOff turn off bathroom lamp
BathroomLightOff turn off my bathroom lamp
BathroomLightOff turn off the bathroom lamp
BathroomLightOff turn the bathroom lamp off
BathroomLightOff turn the bathroom light off
BathroomLightOff turn my bathroom lamp off
BathroomLightOff turn my bathroom light off
BathroomLightOff bathroom light off
BathroomLightOff bathroom lamp off
BathroomLightOff make the bathroom lamp off
BathroomLightOff make the bathroom light off
BathroomLightOff make my bathroom lamp off
BathroomLightOff make my bathroom light off
BathroomLightOff make bathroom lamp off
BathroomLightOff make bathroom light off
BathroomLightOff switch off the bathroom light
BathroomLightOff switch off the bathroom lamp
BathroomLightOff switch off my bathroom light
BathroomLightOff switch off my bathroom lamp
BathroomLightOff switch off bathroom light
BathroomLightOff switch off bathroom lamp
BathroomLightOff dark my bathroom
BathroomLightOff dark the bathroom
BathroomLightOff dark my bathroom
BathroomLightOff dark the bathroom
BathroomLightOff make bathroom dark
BathroomLightOff make the bathroom dark
BathroomLightOff make my bathroom dark


BedroomFanOn on bedroom fan
BedroomFanOn turn on bedroom fan
BedroomFanOn turn on my bedroom fan
BedroomFanOn turn on the bedroom fan
BedroomFanOn on bedroom fan
BedroomFanOn turn on bedroom fan
BedroomFanOn turn on my bedroom fan
BedroomFanOn turn on the bedroom fan
BedroomFanOn turn the bedroom fan on
BedroomFanOn turn the bedroom fan on
BedroomFanOn turn my bedroom fan on
BedroomFanOn turn my bedroom fan on
BedroomFanOn bedroom fan on
BedroomFanOn bedroom fan on
BedroomFanOn make the bedroom fan on
BedroomFanOn make the bedroom fan on
BedroomFanOn make my bedroom fan on
BedroomFanOn make my bedroom fan on
BedroomFanOn make bedroom fan on
BedroomFanOn make bedroom fan on
BedroomFanOn switch on the bedroom fan
BedroomFanOn switch on the bedroom fan
BedroomFanOn switch on my bedroom fan
BedroomFanOn switch on my bedroom fan
BedroomFanOn switch on bedroom fan
BedroomFanOn switch on bedroom fan
BedroomFanOn cool my bedroom
BedroomFanOn cool the bedroom
BedroomFanOn cool my bedroom
BedroomFanOn cool the bedroom
BedroomFanOn make bedroom cool
BedroomFanOn i am feeling hot
BedroomFanOn i want cool bedroom


BedroomFanOff off bedroom fan
BedroomFanOff turn off bedroom fan
BedroomFanOff turn off my bedroom fan
BedroomFanOff turn off the bedroom fan
BedroomFanOff off bedroom fan
BedroomFanOff turn off bedroom fan
BedroomFanOff turn off my bedroom fan
BedroomFanOff turn off the bedroom fan
BedroomFanOff turn the bedroom fan off
BedroomFanOff turn the bedroom fan off
BedroomFanOff turn my bedroom fan off
BedroomFanOff turn my bedroom fan off
BedroomFanOff bedroom fan off
BedroomFanOff bedroom fan off
BedroomFanOff make the bedroom fan off
BedroomFanOff make the bedroom fan off
BedroomFanOff make my bedroom fan off
BedroomFanOff make my bedroom fan off
BedroomFanOff make bedroom fan off
BedroomFanOff make bedroom fan off
BedroomFanOff switch off the bedroom fan
BedroomFanOff switch off the bedroom fan
BedroomFanOff switch off my bedroom fan
BedroomFanOff switch off my bedroom fan
BedroomFanOff switch off bedroom fan
BedroomFanOff switch off bedroom fan
BedroomFanOff cool my bedroom
BedroomFanOff make bedroom hot
BedroomFanOff make my bedroom hot
BedroomFanOff make the bedroom hot
BedroomFanOff i am feeling cold
BedroomFanOff i want hot bedroom

Github link of all necessary files and code.

In the directory lambda you will get all the necessary files for AWS Lambda. Just replace certificate and private key files with you own files and make a .ZIP file. Upload the .ZIP file to AWS Lambda. Don't forget to replace app id in the index.js file with your own Alexa skill app id.

Credits

Md. Khairul Alam

Md. Khairul Alam

68 projects • 584 followers
Developer, Maker & Hardware Hacker. Currently working as a faculty at the University of Asia Pacific, Dhaka, Bangladesh.
Umme Nur Mafiha Majid

Umme Nur Mafiha Majid

2 projects • 7 followers
I love technology

Comments