GithubHelp home page GithubHelp logo

00mjk / aws_alexa_comcast_data_usage_lambda Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kfowlks/aws_alexa_comcast_data_usage_lambda

0.0 0.0 0.0 2.16 MB

Amazon Alexa skill for getting your comcast internet usage

Python 84.07% Shell 15.93%

aws_alexa_comcast_data_usage_lambda's Introduction

An Amazon Alexa skill for getting your comcast internet usage using Python for AWS Lambda

Installation

git clone [email protected]:kfowlks/aws_alexa_comcast_data_usage_lambda.git

cd aws_alexa_comcast_data_usage_lambda

pip install requests -t <path to this project>/aws_alexa_comcast_data_usage_lambda

git clone https://github.com/anjishnu/ask-alexa-pykit.git

cd ask-alexa-pykit

git checkout python_lambda_0.5_release 

cp -R ask <path to this project>/aws_alexa_comcast_data_usage_lambda

cd <path to this project>/aws_alexa_comcast_data_usage_lambda

You'll need to contruct a zip file that contains all code and external libraries.

zip -r ask-alexa_comcast_data_usage_lambda.zip *

In the AWS Lambda console you need to do the below

Create a blank AWS Lambda function, be sure to select Alexa as the trigger

upload zip file i.e. ask-alexa_comcast_data_usage_lambda.zip

You'll need to set the below Environment variables in your AWS Lambda console

COMCAST_USERNAME
COMCAST_PASSWORD

You'll need to configure the AWS Alexa skill console and follow the steps to create a skill. You will find the intent scheme and the utterance text under Test Data

###Testing

In the AWS Lambda console you'll need to select the new function and configure the below test request.

Actions->Configure test event

{
  "session": {
    "sessionId": "SessionId.9da74599-e9d0-4d7e-ad2f-fc3369e79614",
    "application": {
      "applicationId": "amzn1.ask.skill.[unique id]"
    },
    "attributes": {},
    "user": {
      "userId": "amzn1.ask.account.[unique id]"
    },
    "new": true
  },
  "request": {
    "type": "IntentRequest",
    "requestId": "EdwRequestId.[unique id]",
    "locale": "en-US",
    "timestamp": "2016-12-12T01:09:50Z",
    "intent": {
      "name": "GetInternetUsage",
      "slots": {
        "Date": {
          "name": "Date",
          "value": "2016-12-12"
        }
      }
    }
  },
  "version": "1.0"
}

If everything worked, you'll see a response like the below.

{
  "version": "1.0",
  "response": {
    "outputSpeech": {
      "text": "You have used 325.0GB out of 1024.0GB for the month of December!",
      "type": "PlainText"
    },
    "shouldEndSession": false
  },
  "sessionAttributes": {}
}

###Requires

  • Python 2.7+

Version

0.0.1

Travis build status

aws_alexa_comcast_data_usage_lambda's People

Contributors

kfowlks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.