Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Editing readme to reflect changes in code as well as AWS portals #110

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Note that Home Assistant includes a component (`emulated_hue`) to communicate wi

## Setup

1. In the `config/` directory, copy `config.json.sample` to `config.json` and update it. [Below](#config-values) is a listing of properties that `config.json` will accept.
1. Be sure to pull the files from https://github.com/mike-grant/haaska/tree/v3
2. In the `config/` directory, copy `config.json.sample` to `config.json` and update it. [Below](#config-values) is a listing of properties that `config.json` will accept.

1. Run `make` to build a deployable package of haaska. This will generate a `haaska.zip` file that you'll upload to AWS Lambda (if you're used to docker you can try running make with `docker build -t haaska . && docker run -v "$PWD":/usr/src/app haaska`
1. Register with an OAuth provider, such as Login with Amazon.
Expand All @@ -47,7 +48,8 @@ Note that Home Assistant includes a component (`emulated_hue`) to communicate wi
* Select "Choose an existing role", and underneath, select `lambda_basic_execution` if it exists
* If `lambda_basic_execution` doesn't exist, select "Create a custom role" instead, and enter `lambda_basic_execution` as the "Role Name"
* Leave the rest of the defaults alone, and click "Next"
* Check "Enable event source"
* Using AWS CLI run the following command: `aws lambda add-permissions --function-name [name of your function, for example haaska] --statement_id 1 --action lambda:InvokeFunction --principal alexa-appkit.amazon.com --event-source-token [your skill ID]`
* Add the Alexa Smart Home trigger and insert your skillID. Test your Lambda function now to make sure it works.
* Under the "Account Linking" section:
* Set Authorization URL to: https://www.amazon.com/ap/oa
* Set the Client ID to the previously noted value from Login with Amazon
Expand All @@ -57,7 +59,7 @@ Note that Home Assistant includes a component (`emulated_hue`) to communicate wi
* Note the one or more "Redirect URL(s)"
* There are two properly sized Home Assistant logos in the images/ folder which you can upload to Amazon for use with your skill. Upload both on the "Publishing Information" step of the process.
1. Go back to Login with Amazon, select "Web Settings" under "Manage" for your security profile, and add each "Redirect URL" from the Lambda function as an "Allowed Return URL".
1. Send a test event by running `make test`, which will validate that haaska can communicate with your Home Assistant instance. Note that you must have the AWS CLI and [jq](https://stedolan.github.io/jq/) installed.
1. Send a test event by running `make test`, which will validate that haaska can communicate with your Home Assistant instance. Note that you must have the AWS CLI and [jq](https://stedolan.github.io/jq/) installed. This should return a JSON listing the devices exposed through the HomeAssistant API.

### Config Values

Expand Down