/alexa-lambda-kegbot

Amazon Alexa Skill to get info from KegBot written as a Lambda

Primary LanguageJavaScript

Alexa-Lambda-Kegbot

Alexa-Lambda-Kegbot is an Alexa Skill for communication with your Kegbot. Currently is supports the following:

  • What's on tap?
  • How much is left?

For a more home friendly setup, maybe the alexa-app version is better: alexa-app-kegbot

Requirements

Setup

  1. Setup a new custom Alexa Skill on https://developer.amazon.com/
    1. Login
    2. In the ALEXA tab, choose Alexa Skills Kit
    3. Add a New Skill
      1. Skill Information
      2. Skill Type as Custom Interaction Model
      3. Name - Give it a name
      4. Invocation Name - Give it an Invocation Name. For "Alexa, Ask Kegbot..." use Kegbot.
      5. Next
    4. Note ID at the top of the page
    5. We'll come back to this later
  2. Download Code
    1. Clone Repo: git clone https://github.org/patfreeman/alexa-lambda-kegbot.git
    2. cd alexa-lambda-kegbot
    3. npm install
    4. cp config_example.js config.js
    5. vi config.js
      1. Set your Kegbot configuration. Protocol, host, port, API key (if required)
    6. zip -r ../alk.zip ./
  3. Create Lambda
    1. In the AWS Lambda console https://console.aws.amazon.com/lambda/home?region=us-east-1#/
    2. Create a Lambda Function
      1. Choose a blank function
      2. Click the box and choose Alexa Skills Kit, then Next
      3. Name - Give it a name
      4. Description - if you care
      5. Runtime - Choose NodeJS 4.3
      6. Upload a .ZIP file
      7. Function Package - Choose the ZIP you created above
      8. Handler needs to stay as index.handler
      9. Role - lambda_basic_vpc_execution should be enough.
      10. Memory - 128MB is more than enough
      11. Timeout - Set this to greater than the value you defined in config.js
      12. Choose your VPC, Subnet, and Security Groups that have access to your Kegbot server
      13. Click Next, then Create Function
    3. Note ARN in upper right corner
  4. Go back to Alexa Skill setup on https://developer.amazon.com/
    1. Interation Model
      1. Paste intent_schema.txt into Intent Schema
      2. Paste sample_utterances.txt into Sample Utterances
      3. Next
    2. Configuration
      1. Choose AWS Lambda ARN
      2. Paste the ARN for your Lambda created above
    3. Test
      1. Try it with a sample utterance
  5. Try talking to Alexa