Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control group take to long to get request, leads to "I am not quite sure what went wrong" message #40

Open
nqd opened this issue Jan 30, 2018 · 2 comments

Comments

@nqd
Copy link

nqd commented Jan 30, 2018

Hello,

I'm developing a smarthome with v3 api, and got error when try to control a large group. Steps to observe error below.

Step 1: I make a program to control individual device, worked well. I make a group of ~10 devices, worked well.

Step 2: Then make a group of 49 devices, the error "I am not quite sure what went wrong" appear.

Logging show that I don't have enough request, about 29 turnOff request for group of 49 devices.

Step 3: I make a fast response for turnOff request, return success response immediately.

Logging show that the interval between the first and the last request is about 6 seconds. (see log bellow)

Question: What make interval between first request and last request in group control is so large (up to 6 seconds in step 3, and > 10 seconds in step 2). How could I eliminate the "I am not quite sure what went wrong" error.

Environment:

  • "Timeout": 5,
  • "Runtime": "nodejs6.10",
  • "MemorySize": 256,

Thanks a lot in advanced.

@p000
Copy link

p000 commented Feb 3, 2018

Hello @nqd

You have to use Async response for device status - I would suggest first reply to the request saying you received request to your device cloud and then continue with your command sequence. Don't wait until you get reply from all device. Alexa time-out is 8 sec max.

@nqd
Copy link
Author

nqd commented Feb 5, 2018

Hi @p000,

Thanks for your responding.

I actually make a very fast fake OK responding without any request to the actually devices. Logs in lambda show that the running take about ~ 1ms for each turnon/turnoff request.

With the fake respond, the receiving first and 50th request are still ~5 seconds and I get the "I am not quite sure what went wrong" message (please see log https://forums.developer.amazon.com/storage/attachments/5519-somethingwentwrong.txt.)

Any further suggestion?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants