diff --git a/README.md b/README.md index b983a71..efeb9f1 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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