alexa-smarthome icon indicating copy to clipboard operation
alexa-smarthome copied to clipboard

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

Open nqd opened this issue 7 years ago • 2 comments

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.

nqd avatar Jan 30 '18 07:01 nqd

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.

p000 avatar Feb 03 '18 15:02 p000

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.

nqd avatar Feb 05 '18 10:02 nqd