An Alexa Smart Home Skill SDK made for controlling any network controlled devices using payload V3 (Entertainment Devices)
- A AWS account
- A Amazon Developer account
- An Alexa-enabled device such as Amazon Echo or Amazon Echo Dot
- A Bridge running Python 2.7 and Pip (I used a Raspberry Pi, but another computer running linux will work too)
- I recomend using screen to run python headless
- AWS IAM Setup
Create an AWS Role in IAM called mqtt_handler with access to Lambda.
-
AWS IOT Device Setup
-
Lambda Virtual
device
Create an AWS IOT Thing
- Client Device
Create an AWS IOT Thing
- 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.
- Bridge Set Up
git clone https://github.com/thehappydinoa/AshsSDK
cd AshsSDK/
pip install -r client/requirements.txt
cd ..
python fileGenerator.py
- Upload
mqtt-handler.zip
to lambda
- 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
Should look like arn:aws:lambda:us-east-1:xxxxxxxxxxx:function:Alexa-MQTT-Skill
- Create Alexa Skill
Create or login to an Amazon Developer account.
In the Alexa Developer Console Select Alexa Skills Kit
- Set Skill Type to
Smart Home Skill API
- Set Name to
Alexa-MQTT-Skill
- Set Payload Version to
v3 (audio-visual devices)
Should look like amzn1.ask.skill.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Try saying Alexa, Turn on Device1