bklavet / Echo-skill-to-control-Directv

amazon echo skill that will control a networked Directv Receiver so that users can control Directv with their voice
18 stars 67 forks source link

New Lambda #56

Closed aaluck1 closed 6 years ago

aaluck1 commented 6 years ago

screen shot 2017-12-28 at 10 32 49 am

This is the new lambda screen. From here I cannot find anyway to complete the skill.

aaluck1 commented 6 years ago

My other (dumb) question is once I complete this skill...how does my Alexa recognize it? In other words how does it get to MY Alexa? Does it up load it automatically. Can I do this from my work computer and it will work at my house? This is all BRAND new to me and I'm sorry for being a DA.

bklavet commented 6 years ago

Hey aaluck1! from the picture above you: 1:choose author from scratch 2:enter a name for the function you could use whatever you want. 3:choose existing roll option. 4:for the existing roll enter lambda_basic_execution 5:Double check the top right hand side of your screen and make sure you are in the US EAST (N.Virginia) 6:in the designer box on the left you will click on your trigger which will be Alexa Skills Kit 7:now click on the icon in the Designer box that has the orange lambda logo and your function name. 8:this shows a box below that is titled Function Code. 9:Code entry type should be Upload a Zip.file 10:click upload and select your compressed Index and alexa file you downloaded/modified from this github

  1. got to the top and click save
  2. above the save button is your ARN for your funtion, copy this and place in the alexa developer portal.

What happens is when you go to the service simulator, and enter "go to cnn" alexa recognizes "cnn" and sends it off to the lambda function with your ARN. the lambda function recognizes CNN and then inturn fires off the url to change your receiver to CNN, and then tells alexa "OK". So if you have multiple echos devices at multiple locations that are signed into your prime account, you can control your dtv from any of them.

aaluck1 commented 6 years ago

Thank you. here is what I get..... screen shot 2017-12-28 at 12 40 39 pm I don't see how to save it to move on. The save button is grayed out and says configuration is needed.

How do I get past this step. SORRY>>>.......

aaluck1 commented 6 years ago

And when I click upload it pulls open the menu to add the file again, it doesn't actually upload

aaluck1 commented 6 years ago

I just closed the alexa box saying it needed configuration and it allowed me to save. Is it good now.

aaluck1 commented 6 years ago

this is what it shows now

screen shot 2017-12-28 at 1 38 41 pm

bklavet commented 6 years ago

ok! so now you should be able to test in the alexa developer portal. go to the test tab and enter something in the service simulator like, guide, cnn, etc and see if your dtv does it. if it does, you should be able to test it with your alexa device.

I removed your last screen shot, cause it had your functions arn. you may want to delete it and start over with a new function,

aaluck1 commented 6 years ago

Ok I will start over from scratch when I get home. Ill let you know. Do you have a contributions page on paypal or something.

bklavet commented 6 years ago

no don't worry about. when you test in the service simulator does the return say "ok"? if it does your golden. let me know if we need to work on this more.

later

aaluck1 commented 6 years ago

So.. here is where Im at and I have gone through this line by line and it has copied it exactly as you wrote it. Not sure whats going on screen shot 2017-12-28 at 5 36 28 pm screen shot 2017-12-28 at 5 36 44 pm

aaluck1 commented 6 years ago

Okay started over and It says its working but I think I do not have the port right. Here is the simulator screen screen shot 2017-12-28 at 7 02 02 pm

aaluck1 commented 6 years ago

I know your sick of me. But I believe I have it done correctly from your end. The port forward is where Im lost. This is my airport setup but still get error saying cannot reach dtv screen shot 2017-12-28 at 8 03 18 pm

bklavet commented 6 years ago

Hey! So it looks like you will want to confirm your port is forwarded. You can review this first and see if any of it applies

12

going by the above screen shot, I am guessing your directv receiver has ip 10.0.1.35 by entering this in a browser on your home network you should be able to pause the receiver http://10.0.1.35:8080/remote/processKey?key=pause&hold=keyPress if that works, then your receiver is setup correctly to be controlled then figure out your wan ip and enter this from a different network other than the network your DTV is on... example you cellular network and enter this with your wan ip inserted. http://[wan_ip]:8080/remote/processKey?key=pause&hold=keyPress

if that pauses your receiver, then yur port forwarding is set up correctly and we will need to figure out what is wrong elsewhere. cause your should not be getting the "end point could not be reached".

aaluck1 commented 6 years ago

B money........IT DID IT!!!! IT WORKED!!!!!! through the browser!!!! Unreal I've never programmed anything.

TWO more questions, sorry....

1 How do I open that port? Do you know? Do you see anything in my screen shot wrong with the port settings that would explain why its not working? Is there a work around? The DMZ you mentioned?

2 Again, I don't understand this, I'm still very confused as to how this will work with my Alexa. Does my Alexa know this skill because its in my "developer" (me a developer?) page. Does it only work when I'm the user on the Alexa or will it work with my wife account as well? How do I get Alexa to recognize the skill/code you provided?

Thanks again B money

bklavet commented 6 years ago

aaluck1 ok so if you can make it do stuff locally, the next is to get port 8080 open so you can do stuff externally, now your screen shot above looks pretty awesome cause with the port mapping you could put your skill to a different port like 80 for the public and 8080 for the private. or anything else if your isp is blocking ports, that could be a work around for you. the DMZ should throw the DTV that is working 10.0.1.35 out side your firewall.

till you can control your browser from outside your local network, this skill will not work the flow is this: Echo-->internet-->Amazon Alexa-->AWS Lambda-->back to your DTV through the internet-->DTV

if your wife's account is active in the echo, this skill wont work if it is built to your account (your account , developer, lambda,prime, is all tied together to you). She would need a skill doing the same thing tied to her account aswell.

aaluck1 commented 6 years ago

img_4410 At this point I'm way outside my skill set. It appears the Router sees the DTV but it still only works from the browser. I have scoured the internet for videos and cannot seem to find a step by step way to open this port correctly. How do I do the DMZ. Is there a setting or button? Will this make my internet public?

bklavet commented 6 years ago

found this googling dmz Apple uses the term 'Default Host' for a DMZ. To set up a DMZ for your Sprint or any other network client, you would use the AirPort Utility as follows: AirPort Utility > Select the AirPort > Edit > Network tab > Network Options... > Enable default host at:

Select the checkbox for the "Enable default host at:" option and enter the desired local IP address that your Sprint device will be using.

In most situations, you will want the DMZ device to have a static local IP address.

aaluck1 commented 6 years ago

I tried that and it had a bunch or error codes and shut it down. At this point I'm going to try to find someone that can come here and help me get this port configured correctly. I feel that is the only hold up. So if I can I need to tell them I need port 8080 open, right?

One final question. Can I change/rename the invocation name "TV" to "Directv" or do I have to redo the whole thing. The reason I ask is in trying to test on Alexa it seems to think I'm saying FireTV.

Thank you so much for your help.

aaluck1 commented 6 years ago

One final thing. I tried to do the command from my phone (different internet connection) and it did not work. I guess that means the problem is the port

bklavet commented 6 years ago

you are correct the problem is pointing to your forwarding. Port 8080 is the port. Make sure when you are trying from the phone that you are not using the 10.0.1.35 ip but your wan ip address.

You can change your invocation name without having to redo the aws lambda part. I would advise against directv instead try "Direct tv" alexa parses what it hears to "real" words.

bklavet commented 6 years ago

https://youtu.be/nUdS6siT0zY Updated tutorial with was lambda changes

aaluck1 commented 6 years ago

Okay. So I had a guy here and he says the port should be open. Still only works from the computer (pause). Do you think it would be worth a try to redo the whole thing from the new video you posted or is that pointless since it does work from the computer.

At this point I'm trying everything I can because I feel I'm right there on getting it to work.

Thanks

bklavet commented 6 years ago

My guess is, your ISP is blocking port 8080. You may want to get in touch with them and find out. The new video would be helpful if you were having problems getting the function to work, but this is now sounding like an ISP issue.

aaluck1 commented 6 years ago

This is the information from my direct receiver. The "link-local" is not my ip address> Do you think that could be the issue. My IP is 216.etc. I called WOW and they said the modem (mine) would not block it. In fact I went into the modem and I cannot change anything, just look around.

img_4415

bklavet commented 6 years ago

the local link is normal. WOW.... Are you in South Dakota?

aaluck1 commented 6 years ago

No Alabama. They merged with Knology about a year ago. Does it matter if its hooked up ethernet or WIFI? I have the ethernet plugged into the back.

bklavet commented 6 years ago

ethernet is the way mine is. Alabama! wow is up here in SD. The big thing is you cantrol it locally so the connection you have to the dtv receiver is correct. I am afraid I wont be much help until you are able to control the dtv from outside your network, and if where you live is anything like where I live, the hardest part is getting someone who works for the broadband company to understand what it is you want.

aaluck1 commented 6 years ago

I pheasant hunt a good bit in SD, Presho area to be exact. Didn't go this year, the count was WAY down.

Would it work to bypass the router? What if I just run the ethernet cable from the back of the modem to the DTV receiver to test? Would that give me an accurate answer to whether it is the router, ISP or another issue?

aaluck1 commented 6 years ago

On final thing that is making this even more perplexing is I took my iPad to work and was able to access my receiver, playlist and even watch shows from my receiver in the living room (programmed to the 10.0.1.35. I was connected through a work WIFI.

How the heck can the iPad get through to the receiver and not the skill? That leads me to believe that the port is open. This is getting on my last nerve. I really want to finish this just to say I did it.

StarfighterJ commented 6 years ago

I am having same Issue as aaluck at service Response: Attached is the Lambda test results: Got to do all the try this Stuff: But maybe bklavet can review this first. 2018-01-05

bklavet commented 6 years ago

12

StarfighterJ confirm you can control your dtv from outside your home network first. The link above will give information on how to do that.

If you can, I will help try and figure out what's up

vmweaver commented 6 years ago

Removing Screen shot comment due to information disclosure.

StarfighterJ commented 6 years ago

bklavet Hi I had to dusted off my ASUS Routers manual to learned how to Port Forward but I did it. I now got the Simulators test to pass. And Alexa to Do it thing. I do have 1 Question right now I take this is in a BETA phase Right?

bklavet commented 6 years ago

this is just a hobby project. I found Mr.eggsalad's github to control his Roku box, I came across the SHEF documentation by whitlockjc. I was able to modify eggsalad's roku skill with whitlockjc's shef work, to get something that i thought could work, but..... It didn't! I made this github with what I had in hopes someone smarter than myself could figure out what i was doing wrong.

That's where mawrew19 comes into the story, He solved it, and the skill was able to work.
Later, Mr. Weil took the skill, and made it look incredible! he added the voice guide features, and took it to a whole other level.

So the credit for all of it so far goes to Whitlock egg salad mawrew19 Weil J.

bklavet commented 6 years ago

after getting the port forwared, the Issue was with MAC and compressing the index and alexa file.

user has confirmed skill is working. Closing this issue.