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

Skill doesn't show in My Skills #27

Closed mikerain99 closed 7 years ago

mikerain99 commented 7 years ago

I'm doing this for a friend to use with his DirecTV. I put his WAN IP into the index file and created the skill. I did port forwarding on his router of port 8080 to his DTV. But he doesn't see the skill in his Alexa app. What step am I missing to let him use the skill?

Perhaps related: On the Amazon dev site where I made the skill, there's a publishing page which I filled out and submitted the app to Amazon for their approval. Is publishing necessary in order for my friend to use it? Or is that only for people who are selling skills to the wide world (which I'm not doing)?

vmweaver commented 7 years ago

You should absolutely NOT publish. This custom skill is for controlling your friend's dtv. You don't want everyone to be able to control your friends TV.

Are you using your friends amazon account for all of this?

On Feb 2, 2017 12:01 AM, "mikerain99" notifications@github.com wrote:

I'm doing this for a friend to use with his DirecTV. I put his WAN IP into the index file and created the skill. I did port forwarding on his router of port 8080 to his DTV. But he doesn't see the skill in his Alexa app. What step am I missing to let him use the skill?

Perhaps related: On the Amazon dev site where I made the skill, there's a publishing page which I filled out and submitted the app to Amazon for their approval. Is publishing necessary in order for my friend to use it? Or is that only for people who are selling skills to the wide world (which I'm not doing)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bklavet/Echo-skill-to-control-Directv/issues/27, or mute the thread https://github.com/notifications/unsubscribe-auth/ACibPYMLFgP7Q9mvOd5fMFfL_-VvBB3wks5rYXD0gaJpZM4L0v3L .

mikerain99 commented 7 years ago

I submitted it for publishing, and I'm waiting to hear back from Amazon whether they approve it. Can I take back the submission? Or, if Amazon approves it for publishing, can I prevent the general public from finding and using it?

I'm using my own Amazon account for all of this. Should I have used my friend's account?

bklavet commented 7 years ago

It wont get approved. Don't worry about it.

bklavet commented 7 years ago

Mike, here is the deal. This skill is linked to the prime account it was created under. so for this to work for your friend, it needs to be built under his prime account. Then linked to the aws lambda function.
When you test the skill at the alexa developer portal site do you get a good response from lambda or a "endpoint could not be reached"?

mikerain99 commented 7 years ago

It says "The remote endpoint could not be called, or the response it returned was invalid."

I set up port forwarding on my friend's router: port 8080 is forwarded to the IP of his main DTV.

bklavet commented 7 years ago

Hey Mike, if you know the Wan IP you have forwarded, from your browser enter this:

and see if your get a json response that shows your friends receivers. if this errors out then something could be wrong with the port forwarding/the isp provider blocking ports, or the DTV receiver is not set correctly. if you want to clear the DTV settings from your friends home network you can use the dtv's ip address

that should get you something that looks like { "locations"; [{ "clientAddr": "0", "locationName": "Main" }], "status": { "code": 200, "commandResult": 0, "msg": "OK.", "query": "/info/getLocations" } }

bklavet commented 7 years ago

more information on testing your set up. https://github.com/bklavet/Echo-skill-to-control-Directv/issues/12

mikerain99 commented 7 years ago

My friend did this from a browser on a computer inside his network: http://[local_ip]:8080/remote/processKey?key=pause&hold=keyPress It worked perfectly. The DTV paused immediately.

I did this from a computer outside his network using his outward-facing WAN IP: http://[wan_ip]:8080/remote/processKey?key=pause&hold=keyPress The response: "This site can’t be reached. [wan_ip] took too long to respond."

I successfully pinged [wan_ip].

My conclusion:

  1. Port forwarding isn't working, or...
  2. The ISP is blocking port 8080. Is there a way to tell which is true? Or is my conclusion wrong?
bklavet commented 7 years ago

I agree with your conclusion. If the router has a DMZ option, throw the directv ip address into it and then try from your outside network.

otherwise see who the provider is and see if they can confirm they are blocking it.

mikerain99 commented 7 years ago

I put the DTV tuner's IP into the router's DMZ. It didn't help.

I called the ISP (Frontier) to see if they're blocking port 8080. Nobody knew what I was talking about. I'm going to try calling again to find a technically knowledgeable person.

Meanwhile... is there a way to test this for myself? A test to see whether the port is blocked by the ISP, or whether port forwarding is somehow failing in the router?

vmweaver commented 7 years ago

What brand/model is the router? There may be additional settings needed to allow this traffic.

On Fri, Feb 3, 2017 at 7:25 PM, mikerain99 notifications@github.com wrote:

I put the DTV tuner's IP into the router's DMZ. It didn't help.

I called the ISP (Frontier) to see if they're blocking port 8080. Nobody knew what I was talking about. I'm going to try calling again to find a technically knowledgeable person.

Meanwhile... is there a way to test this for myself? A test to see whether the port is blocked by the ISP, or whether port forwarding is somehow failing in the router?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bklavet/Echo-skill-to-control-Directv/issues/27#issuecomment-277406422, or mute the thread https://github.com/notifications/unsubscribe-auth/ACibPahTWMSXsiwqQaKSljexvCYs7FCFks5rY9NugaJpZM4L0v3L .

mikerain99 commented 7 years ago

The router is a CISCO/Linksys E4200. It is connected via ethernet cable to a switch. The switch is connected via ethernet cable to the DirecTV boxes.

vmweaver commented 7 years ago

I just found this on Frontier: https://frontier.com/helpcenter/categories/internet/browsing-the-web/get-rid-of-problems/get-started/what-frontier-is-doing-about-it#/collapse8

So, it looks like they should allow 8080. When you setup port forwarding, did you select TCP or BOTH for the protocol?

Is the router setup to be managed remotely? If so, then you should be able to hit the external address in a web browser on 443 (standard HTTPs).

On Sat, Feb 4, 2017 at 11:36 AM, mikerain99 notifications@github.com wrote:

The router is a CISCO/Linksys E4200. It is connected via ethernet cable to a switch. The switch is connected via ethernet cable to the DirecTV boxes.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bklavet/Echo-skill-to-control-Directv/issues/27#issuecomment-277461704, or mute the thread https://github.com/notifications/unsubscribe-auth/ACibPVNzWtml2sVxnPRwDAPNJfb5mMj6ks5rZLcogaJpZM4L0v3L .

mikerain99 commented 7 years ago

We set up port forwarding for BOTH.

This morning we discovered new information. It turns out the ISP's cable modem is both a cable modem AND router in one box. Thus, the topology is: Internet -> Modem/Router -> Cisco/Linksys E4200 router -> switch -> DirecTV boxes.

Once we learned that, we did port forwarding of 8080 on the Modem/router. Then I gave the command from an external computer: http://[external IP]:8080/remote/processKey?key=pause&hold=keyPress

The modem/router's security log showed this traffic being port forwarded. Which means the ISP isn't blocking 8080, confirming the link you found.

However, the command still failed. My browser said "This site can't be reached". And the DirecTV did not pause. Which I guess means the Cisco/Linksys E4200 router still isn't port forwarding properly. It doesn't have a nice security log like the modem/router does, so it's hard to tell what's going on. Perhaps there's another setting we need to configure in order to let the traffic through.

bklavet commented 7 years ago

If you plug your device right off the Frontier modem (removing the router) does it work? Just curious.

mikerain99 commented 7 years ago

You read my mind. That's exactly what we're going to try next. My buddy is out of town for a few days, but when he returns, I'll have him do just that. If it works, then we know there's something wrong with the router's port forwarding.

bklavet commented 7 years ago

Kexperience me posted!

vmweaver commented 7 years ago

I thought the e4200 has some rudimentary logging mechanism.

http://www.linksys.com/fi/support-article?articleNum=135448

I am not sure how real-time they are or how accurate, though.

mikerain99 commented 7 years ago

Mawrew19, thanks! I'll turn on logging on the E4200 and see if that gives any good info.

mikerain99 commented 7 years ago

We tried all this in someone else's house, with a simpler network setup. We did port forwarding, and the http command worked from an external computer. Yes! I made a skill using the homeowner's Amazon account, and that worked too! She talks to Alexa and controls her DirecTV! We jumped up and down like little kids when we got that working. I'm sure we'll figure out the port forwarding in the first house when my friend gets home.

This is all amazing. Thanks a million bklavet and mawrew19 for your great help.

I now have a new question to take this to the next step, but I'll put that in a new thread.

bklavet commented 7 years ago

woot woot!