From 1dcf7f101e813c2d6ef4dca6f9ba8e437682e263 Mon Sep 17 00:00:00 2001 From: Jeroen ter Heerdt Date: Wed, 31 Jan 2018 14:37:03 +0100 Subject: [PATCH 1/3] Edit to reflect changes in code as well as AWS portals --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b983a71..547d13a 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 PR#109! +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,7 @@ 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]` * 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 +58,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 From 46291e8fdb8e32fd4d3725d08ae0b2ae7e3822ec Mon Sep 17 00:00:00 2001 From: Jeroen ter Heerdt Date: Thu, 1 Feb 2018 14:09:23 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 547d13a..bd44d81 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Note that Home Assistant includes a component (`emulated_hue`) to communicate wi * 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" * 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 From 74f6d885bc4b1daf339e9318588171bef42fc1e0 Mon Sep 17 00:00:00 2001 From: Jeroen ter Heerdt Date: Fri, 2 Feb 2018 09:08:44 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd44d81..efeb9f1 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Note that Home Assistant includes a component (`emulated_hue`) to communicate wi ## Setup -1. Be sure to pull the files from PR#109! +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`