Skip to content

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

License

Notifications You must be signed in to change notification settings

MarkdownBot/AshsSDK

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  2. AWS IOT Device Setup

  3. 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

  • Client Device

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
  • Go to Settings
  • Note down the Endpoint
  • It should look like: xxxxxxxxxxxxxx.iot.us-east-1.amazonaws.com

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

  • Name the function Alexa-MQTT-Skill
  • the runtime to Python 2.7
  • Set Code entry type to Upload a .ZIP file
  • Set Handler to mqtt-handler.lambda_handler
  • Set Role to Existing Role mqtt_handler

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

  • Set Skill Type to Smart Home Skill API
  • Set Name to Alexa-MQTT-Skill
  • Set Payload Version to v3 (audio-visual devices)

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Other 1.2%