Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Setting up haaska
Here's the long part. Please follow these steps very carefully.
All these steps were accurate as of February 18th 2019. If anything has changed, please let us know through our "Need help?" section.
Set Up Login With Amazon
- Sign in to the Amazon Developer Console.
- Click the link for "Login With Amazon" in the top navigation bar.
- Click the gold button that reads "Create a New Security Profile".
- Enter any security profile name you'd like, e.g. "haaska"
- Write a short description, e.g. "haaska for my Home Assistant"
- Add any url you'd like for the privacy notice, e.g. "https://myhass.example.com"
- Click "Save" to continue.
- On your new Security Profile, click the gear button, and choose "Web Settings".
- Make note of the Client ID, and Client Secret. Keep this window open for reference.
Set up Alexa Skills Kit
- Open a new browser window, keeping the previous one open for later.
- Click the "Developer Console" link at the top right of the page.
- Look for "Alexa" in the navigation bar, and choose "Alexa Skills Kit".
- Click on the "Create Skill" button.
- On this new page, enter the following:
- Skill Name - This can be anything you want, e.g. "haaska"
- Language - Choose the correct language you would like to use, e.g. "English (CA)"
- Click on the "Smart Home" tile
- Click the blue "Create Skill" button at the top right.
- Make note of the Skill ID listed (e.g.
Preparing AWS Lambda Access
- Open a new browser window. Please keep the previous windows open for later.
- Sign in to the AWS Console.
- Click on the "Services" button at the top left, and in the list, locate the "Security, Identity & Compliance" section.
- Click on "IAM" in this section.
- On the left hand side bar, click on "Roles". Then, click on the blue "Create Role" button.
- On this page, make sure the tile "AWS service" is selected. Click on "Lambda", then click the "Next: Permissions" button at the bottom right.
- On this new page, enter "basic" in to the search box. When it appears, check the box beside "AWSLambdaBasicExecutionRole".
- Click the "Next: Tags" button on the bottom right. Do not enter any tags. Click "Next: Review" to continue.
- In the box for "Role name", please put in "lambda_basic_execution". Click "Create Role" at the bottom right.
- Click on the AWS button at the top left, to return to the main console.
This step is VERY IMPORTANT.
At the top right of the screen, there is a button next to your username, but before the "Support" button. It may have the name of a region. You must click it and select the correct Lambda Function Region according to your Alexa language.
Amazon provides a list of regions and languages. Here is a copy:
|Skill language||Endpoint Region||Lambda Function Region|
|English (US), English (CA)||North America||US East (N. Virginia)|
|English (UK), French (FR), German, Italian, Spanish (ES)||Europe, India||EU (Ireland)|
|English (IN)||Europe, India||EU (Ireland)|
|Japanese, English (AU)||Far East||US West (Oregon)|
For example, I am located in Canada, and my Amazon Echo devices are set to "English (CA)". For this step, I would choose "US East (N. Virginia)".
Setting up AWS Lambda - Part 1
- Click on the Services button at the top left. In the list, look for the "Compute" section, and click on "Lambda".
- Click on the orange "Create Function" button.
- Make sure the "Author from scratch" tile is selected.
- Set the following options:
- Name - "haaska"
- Runtime -
- Role - "Choose an existing role"
- Existing Role - "lambda_basic_execution"
- Click the "Create Function" button.
Setting up AWS Lambda - Part 2
- In the "Designer" section of your new function, click on "Alexa Smart Home". If you do not see this, then you have not set the correct region.
- A section titled "Configure Triggers" will appear. In the "Application ID" box, copy and paste the "Skill ID" from the Alexa Developer Console window (e.g.
- Make sure "Enable Trigger" is checked. Click "Add" at the bottom right.
- In the "Designer" section, click on the name of your function (e.g. "haaska").
- In the "Function code" section, look for "Code entry type". Click on this menu, and select "Upload a .zip file".
- Click the "Upload" button, and select the zip file we downloaded earlier (e.g.
- In the "Handler" box, replace what is already there with "haaska.event_handler".
- Click "Save" at the top right of the page, and wait for it to load.
Configure your haaska Function
- In the "Function code" section, you will see a list of files. Double click on "config.json".
- In the URL section, add your remote Home Assistant URL (e.g.
- In the Bearer Token section, add your Long Lived Token that you saved earlier (e.g "amcb3i2248yfm...")
- Click "Save" at the top right.
Linking AWS Lambda to Alexa Skills Kit
- At the top right of the Lambda window, there is an ARN (e.g. "arn:aws:lambda:us-east-1:111234567890:function:haaska"). Copy this text and save it.
- Go back to your Alexa Developer Console window. Paste the ARN in to the box labelled "Default endpoint".
- VERY IMPORTANT. From the checkboxes available, click the "Endpoint region" that matches your Skill Language/Lambda Function Region from earlier.
- Paste the ARN in to the region box.
- Click the "Save" button at the top right.
Linking Alexa Skills Kit to Login With Amazon
- Click the "Setup Account Linking" button at the bottom of the page.
- Enter the following:
|Access Token URI||
|Client ID||The Client ID from your Login With Amazon window|
|Client Secret||The Client Secret from your Login With Amazon window|
|Client Authentication Scheme||HTTP Basic (Recommended)|
|Domain List||Not used|
|Default Access Token Expiration Time||Not used|
You will see a list of Redirect URIs. Please copy these down.
Click Save at the top right.
Go back to the Amazon Developer Console/Login with Amazon window. Click Edit at the bottom right.
In "Allowed Return URLs" section, click "Add another" until you have three lines.
On each line, add one of the Redirect URIs from the "Alexa Developer Console" window. Click Save.
You made it!
At this point, haaska is essentially set up. There's just a few last steps to go. Check out Testing haaska.