Home

Awesome

AshsSDK Python 2.7 Join the chat at https://gitter.im/alexa-smart-home-skill/alexa-smart-home-skill

An Alexa Smart Home Skill SDK made for controlling any network controlled devices using payload V3 (Entertainment Devices)

Requirements

How to

  1. AWS IAM Setup

Create an AWS Role in IAM called mqtt_handler with access to Lambda.

Create Role Select Role Type Attach Policy Set Role NAme

  1. AWS IOT Device Setup

  2. Lambda Virtual device

Create an AWS IOT Thing

Create Thing Create Thing Lambda Create Thing Lambda Create Certificates Lambda Certificates Created

Download these as lambda.cert.pem, lambda.public.key, lambda.private.key

Create an AWS IOT Thing

Create Thing Create Thing Client Create Thing Client Create Certificates Certificates Created

Download these as client.cert.pem, client.public.key, client.private.key

  1. Get MQTT Server Hostname

Note: Make sure to download your public and private keys to some place secure. You will not be able to re-download these.

  1. Bridge Set Up

Clone this repo and install dependencies

git clone https://github.com/thehappydinoa/AshsSDK
cd AshsSDK/
pip install -r client/requirements.txt

Copy lambda.cert.pem and lambda.private.key in to the folder named lambda

Copy client.cert.pem and client.private.key in to the folder named client

cd ..
python fileGenerator.py
  1. Upload mqtt-handler.zip to lambda

Create function

Click Create New Function

Create New Function

Create from Scratch

Create from scratch

Skip adding a trigger until after the you create an Alexa Skill

Configure Function

Function Confirguration

Copy ARN

Should look like arn:aws:lambda:us-east-1:xxxxxxxxxxx:function:Alexa-MQTT-Skill

Get ARN

  1. Create Alexa Skill

Create or login to an Amazon Developer account.

In the Alexa Developer Console Select Alexa Skills Kit

Create an Alexa Skill

Skill Config

Copy the ID:

Should look like amzn1.ask.skill.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Copy ID

Go Back to the Lambda Dashboard

Add Alexa Smart Home as the Lambda Function Trigger

Paste in the ID Alexa Smart Home as Lambda Trigger

You Now should be able to interact with your Skill

Try saying Alexa, Turn on Device1

Resources