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

Process Exited Before Completing Request #70

Open bthonk opened 6 years ago

bthonk commented 6 years ago

Your help would be much appreciated!!!!! After two days of screwing around I'm hanging it up and either quitting or waiting for help. I've made it so far but just can't get over the last hurdle.

Problem: Lambda Site: {"errorMessage": "RequestId: 518a1006-f9a2-11e7-a9a2-edcb7db05812 Process exited before completing request"} AWS Site: When I "Test" the 'service request' works but the 'service response': "The remote endpoint could not be called, or the response it returned was invalid."

More clues: START RequestId: 518a1006-f9a2-11e7-a9a2-edcb7db05812 Version: $LATEST 2018-01-15T03:15:20.663Z 518a1006-f9a2-11e7-a9a2-edcb7db05812 session applicationId: amzn1.ask.skill.984832fd-ea28-403a-9f59-51fd81474dd2 2018-01-15T03:15:20.669Z 518a1006-f9a2-11e7-a9a2-edcb7db05812 dispatch intent = DirectvIntent 2018-01-15T03:15:20.780Z 518a1006-f9a2-11e7-a9a2-edcb7db05812 Error: connect ECONNREFUSED 208.81.159.2:8080 at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14) END RequestId: 518a1006-f9a2-11e7-a9a2-edcb7db05812 REPORT RequestId: 518a1006-f9a2-11e7-a9a2-edcb7db05812 Duration: 223.70 ms Billed Duration: 300 ms Memory Size: 128 MB Max Memory Used: 20 MB
RequestId: 518a1006-f9a2-11e7-a9a2-edcb7db05812 Process exited before completing request

Based on everything I've read it would appear that I've not properly forwarded my port. I've watched numerous videos, read more about port forwarding than I care to mention but can't figure out my problem.

Port Forwarding info: Directv HR44: This is the info found in the settings Server IP: Subnet Mask:
Default Gateway:
DNS:
Mac Address: Link-Local:

Router: I'm using Netgear Genie Server Name: Protocol: External Port Range: Internal IP Address:

I would be so grateful if you could tell me what the heck I'm doing wrong!!!!!!!!!!!!!!!

bthonk commented 6 years ago

Absolutely. Here's what they sent me:

Thank you so much for your response and for letting me know.

You are correct. You need to add another WatchTV activity and put the command on the start up sequence. I've added an example activity on your account for Guide and Menu. I would like you to check those activities and their start up sequence. That is the same settings that you should do for the other commands that you want to execute that are not yet support.

What will happen is, after you turn the TV on by saying Alexa, turn on the TV. For you to turn on the guide, you have to say, Alexa, turn on guide and the harmony will execute the Guide activity on your harmony account. The same WatchTV activity but the Guide command is added on the last step of the start up sequence.

Hope this helps!

Best regards,

Anthony Logitech Customer Care support.logitech.com

bthonk commented 6 years ago

Hi Maw, did the info from the Harmony tech help?

vmweaver commented 6 years ago

Yeah..it was helpful and I am looking into it. not sure there is very "nice" way to accomplish some of this. Need to play some more (when my wife doesn't want to watch TV)... Work's been kind of nutty, so normally I have weekend mornings to work on it...

On Sat, Feb 3, 2018 at 8:04 PM, bthonk notifications@github.com wrote:

Hi Maw, did the info from the Harmony tech help?

— 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/70#issuecomment-362873897, or mute the thread https://github.com/notifications/unsubscribe-auth/ACibPa6_gWu5rm9csZTGouFCcBMyHVHyks5tRRBCgaJpZM4Rd4i5 .

vmweaver commented 6 years ago

Ok.. so I don't know of an easy way to get the full capabilities of DTV remote through Harmony, per se. I HAVE been looking at one would take a much more "IoT" approach to this skill. I think it would be a bit more complex, but probably much more secure.

I need to look into it more because it could be convoluted and would require a service running in the house (on local net) like my RPi config I have setup (see https://github.com/bklavet/Echo-skill-to-control-Directv/issues/63)

I think we could get by with the existing Alexa skill and MOST of the existing Lambda code, but instead of sending a GET request to a NATed address, it would take a bit of a left turn.

Amazon has this "AWS IoT" service which acts as an MQTT-based service. If you aren't familiar with it, MQTT is basically "message queuing" service. This enables you to push messages to the queue from one system and then "subscribe" to the queue from a different place and receive those messages.

Where this is beneficial, is that you could have a device (RPi) inside your network that subscribes and "gets" those messages. This means that you don't need any inbound connections to your home network, only outbound.

The way I see this (totally theoretical at this pont):

  1. Alexa, tell TV show guide
  2. Alexa Service sends to Lambda
  3. Lambda says "I know about this" and posts the request to the AWS IoT queue
  4. AWS IoT publishes to the queue
  5. RPi in my network receives message based on subscription
  6. RPi takes local action (pushing the Guide button through APi)
  7. RPi publishes a message to the AWS IoT queue with "success"
  8. Lamda function "gets" this success message and tells Alexa to say "ok"

As I said.. convoluted, but I think it is typically how many IoT -based services work.

I may hold off on working through some of this, but have found several guides on connecting Alexa/Lambda with AWS IoT and then a separate guide on hooking up RPi to AWS IoT.

bklavet commented 6 years ago

would this need a second aws function being triggered by the AWS IoT for the comfirmation?

vmweaver commented 6 years ago

Unknown. Some message queuing services (AMQP/RabbitMQ) support sending messages to the queue and wait for a response. MUCH more digging would be needed...