Giter VIP home page Giter VIP logo

rokualexalambdaskill's Introduction

RokuAlexaLambdaSkill

Description

This project provides an Alexa skill to control a local Roku device with voice commands using Roku External Controls. See the the blog post below for original content/commands

Added commands: Lauch Plex, Pandora, Hulu, Amazon Video, Home

Provides

  • nodejs server for controlling the local device
  • AWS Lambda code
  • Alexa Skill code

Installation/Usage

For detailed instructions, check out the blog post on http://reflowster.com/blog/2015/07/21/rokuvoicecontrol.html

  • Modify RokuControlServer/server.js with the port your want to use
  • Modify RokuLambda/serverinfo.js with your external IP and the port you want to use
  • Modify RokuLambda/index.js with your application ID (From Alexa Skills Dashboard, step 4 below)
  1. Start the Roku control server by running "npm install" and "node server.js" in the RokuControlServer folder
  2. Make this server accessible to the outside world using port forwarding on your router being sure to include the proper port (default: 1234)
  3. Configure Alexa as an event source under the event source tab in the AWS Lambda Function panel. (AWS Lambda Dashboard) - Skip code upload for now
  4. Configure a Alexa Skill using the contents of the RokuSkill folder, the ARN of your above Lambda Function, and the Alexa Skills Dashboard.
  5. Zip the .js files in RokuLamba up and upload them as a new AWS Lambda Function using the AWS Lambda Dashboard

Contributors

  • jaknoll
  • kaptainkommie
  • djobes
  • chris1642
  • phlkchan
  • heydabop
  • mikehobi

Please feel encouraged to submit pull requests!

License

This project is released under the MIT License. See the bundled LICENSE file for details.

rokualexalambdaskill's People

Contributors

carlowahlstedt avatar heydabop avatar julianh2o avatar mikehobi avatar phlkchan avatar walkention avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rokualexalambdaskill's Issues

Issue connecting Echo to External IP

Hello julianh2o,

I was attempting to run your demo with an Amazon Echo that I have, running the server code on a Raspberry Pi, but ran into a bit of a snag in communication. I went through the process of setting up an external IP for my Raspberry Pi and set up port forwarding on my router. I was able to confirm that the external IP is reachable via Ping, Telnet, and even via the online tool http://www.canyouseeme.org/ that reported back that the connection was open and reachable. I was even able to confirm that the server can communicate directly with the Roku (to try and decipher where the break in communication occurred). I modified the server code so that I can test a simple button press to take the Roku back to its home screen. (Which worked fine.) However, when I try to invoke the keypresses from the lambda function on the Amazon side, I always get timeouts. I put debugging code in the index.js file to figure out where things get hung up. It seems that the http request never quite reaches the endpoint even with a timeout of 30 secs, which should be more than enough time for transmission.

With all that said, did you run into similar issues? I'm really trying to figure out the issue here, but can't seem to pinpoint it. I saw that there is a slight discrepancy between the ports used in your server.js and serverinfo_example.js files. One says port 1234, while the other says 12345. I assumed this was a overlook and was meant to be matching ports? I also made sure that the file is called serverinfo.js instead of the example file name so that the import could be consistent with the serverinfo require statement in your index.js file.

Not sure what I left out or did wrong. Any help would be greatly appreciated.

Regards,

Shalom

Undefined response

Hi

I have got it all set up and double checked all the IP and port settings, but when I test it I just get a response " there was a problem with the response from this this skill"

Using test in the alexa skill setup, the response is "Undefined"

Can you suggest what I may be doing wrong?

I am in the U.K. So have it set up English UK - I had to remove the search functionality, as this was throwing an error "literal not defined for your local" - not sure if that may be cUsing an issue - should it work in the U.K.?

Manually Roku Address Specification

When manually specifying the rokuAddress, one must take care to use the entire url:port combination and include a trailing slash or the Roku External Control strings will be built incorrectly. It might be helpful to add information to the README and/or comments to the code to alert users of this.

For example:
var rokuAddress = 'http://192.168.1.100:8060/';

Missing parenthesis in Lamda index.js file

I noticed there's a missing parenthesis in the index.js file of the Lamda Skill (line 3) which causes an error. I added in the closing parenthesis and it all works now.

Thanks for your work on this!!

Possible to add ability to ask Alexa what's playing?

This looks pretty cool - going to carve some time over the holiday to set it up and see if my wife will accept it or not. :)

Similar to how you can ask Alexa to identify songs it's currently playing, it'd be pretty awesome if you could ask it what's currently being played. Is that possible?

I didn't see anything in the ECP that jumps out as a yes, so I started looking into the other SDK docs. Roku's documentation is... well, a bit of a mess.

Converting the Alexa skill to "Smart Home Skill"

First off, just discovered this yesterday while trying to get my new Roku TV to work with Alexa. Works like a charm... Thanks!

I am trying to train my family to use the phrase "Alexa, Tell Roku...". But it is hard for them to remember that and they usually say things like: "Alexa, turn on the TV" which fails

I did some research and it looks like Amazon has a special API for controlling Entertainment devices:

https://developer.amazon.com/docs/smarthome/build-smart-home-skills-for-entertainment-devices.html

Before I invested time into forking and modifying this skill, I was curious if there was a reason this skill didn't use this route initially.

Is there a reason why this shouldn't work? Thanks!

Roku external control has been updated for better search

I am new to working with API's and any sort of programming (taken a couple javascript classes). I noticed that roku added some direct search calls to their API. This would be a better way to accomplish the search instead of having to count how many down clicks you hit to get to search. My initial testing has shown it is faster as well since you don't have to build any waiting time in to the command. I'm working to get this updated in the code and if I'm successful (again limited experience) I will post it on this site.

Here is the documentation for anyone interested... only supported in firmware version 7.5 on the roku. https://sdkdocs.roku.com/display/sdkdoc/External+Control+Guide#ExternalControlGuide-searchExamples

roku not responding

Hello-

great tutorial, trying to move this server from a windows system to my linux server. Got the node server running, it discovered my roku, however when i make an alexis requests, the roku does not repsond. the server shows the request going through (Unknown request URL: /roku/netflix).

any suggestions?

Unknown request URL

I'm getting "Unknown request URL: /roku/home" in terminal when asking my Amazon echo "Alexa tell Roku to go home" everything else seems to work just not roku go home. Any idea where to look?

Running a Node Service (Forever)

I haven't looked real deep into this but am wondering if I can use "forever" in my raspberry pi3 to automatically run my node server "node server.js". It would be nice if I lose power or reboot my pi to have node server.js to run automatically? rather then having to log into my raspberry pi and opening Terminal and typing in node server.js. If this can be done, is anyone got any idea where is should start first?

Get an error running server.js

Trying to run via terminal this on my mac mini:

Here's the error message. Any idea?

var ssdp = new Client();
^
TypeError: undefined is not a function
at Object. (/Users/mew0717/Echo/RokuSkill/server.js:11:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

Update the guide to reflect new AWS interface/options

I tried following the guide yesterday, but the changes and options in the AWS interface have changed so much that I couldn't make much progress.

I'm not familiar with Lambda or coding in general, but I can definitely follow a well documented guide. But I could not with the changes in AWS.

Can anyone help with updating this guide to reflect the updates in AWS? It would be greatly appreciated.

Thank you!

Duplicate generateRepeatedKeyResponse command does not work

Making a post to an endpoint that uses generateRepeatedKeyResponse like '/keypress/downtwo', then making another call to '/keypress/downtwo' will cause the second instruction to do nothing. This is because the sequence array is no longer defined for the function. This can be fixed by recreating the array when we call generateRepeatedKeyResponse again.

Default Port

In the README it states the default port is 12345. In server_example.js however, it is actually specified as 1234.

You should update either the readme or the code, so both are consistent with one another.

Running the nodejs server on a raspberry pi

I have this working perfectly with the node JS server runing on a windows box. However Ideally I would like it to run on a raspberry pi. should this be possible?

I tried running it and it threw an error cant find module ssdp - is there any reason that it cant run on the raspberry pi? suggestions welcome

Intent schema

I don't remember in instructions where it says to download files in the Alexa skill voice commands and intents folder....so I am stuck at this point.

Skill response was marked as failure

Julian,

Let me start by saying your step by step guide was wonderful. One issue I had at first was that my alexa app didn't see the new skill because the email address that Amazon.com (and therefore, alexa) had was different than the one I wanted to use for my Amazon Developer account. That's a big no-no. Lambda doesn't seem to care. It sees the call requests, they are just failing.

Of note is on the Lambda function, after uploading the zip file, it shows an error on line 186 with the yellow triangle and ! with the message "Too many errors. (62% scanned)."

I double checked local IP, WAN IP, ports, and passwords, and they are all consistent., just to make sure that wasn't an error as well.

Thoughts on where to start? Thanks in advance for your help!

Michael P. Deffendall

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.