0

我创建了一项智能家居技能,用于测试我的亚马逊回声秀与我的智能相机的集成。我创建了一个 lambda 函数。当我在 AWS Lambda 控制台上对其进行测试时,它运行良好。下面是我用来测试的请求正文

{
  "header": {
    "namespace": "Alexa.ConnectedHome.Query",
    "name": "RetrieveCameraStreamUriRequest",
    "payloadVersion": "2",
    "messageId": "ABC-123-DEF-456"
  },
  "payload": {
    "accessToken": "[OAuth Token here]",
    "directedId": "[directed customer id]",
    "appliance": {
      "applianceId": "[Device ID for the camera]",
      "additionalApplianceDetails": {
        "extraDetail1": "optionalDetailForSkillAdapterToReferenceThisDevice",
        "extraDetail2": "There can be multiple entries",
        "extraDetail3": "but they should only be used for reference purposes.",
        "extraDetail4": "Not a suitable place to maintain current device state"
      }
    }
  }
}

我得到的回应是

{
  "header": {
    "messageId": "38A28869-DD5E-48CE-BBE5-A4DB78CECB28",
    "name": "RetrieveCameraStreamUriResponse",
    "namespace": "Alexa.ConnectedHome.Query",
    "payloadVersion": "2"
  },
  "payload": {
    "uri": {
      "value": "rtsp://xyz.com/playback/9a78b68f68ae4538a1cf"
    },
    "imageUri": {
      "value": "https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"
    }
  }
}

但是当我用我的 alexa echo show 测试它时,它说“相机没有响应”

任何人都可以在这里提出任何建议吗?

4

1 回答 1

0

我需要在 URL 中指定 443 端口...问题出在

"value":"rtsp://xyz.com/playback/9a78b68f68ae4538a1cf".  

该文档说它仅适用于端口 443 上的交错 TCP(适用于 RTP 和 RTSP)。

这现在有效

{
  "header": {
    "messageId": "38A28869-DD5E-48CE-BBE5-A4DB78CECB28",
    "name": "RetrieveCameraStreamUriResponse",
    "namespace": "Alexa.ConnectedHome.Query",
    "payloadVersion": "2"
  },
  "payload": {
    "uri": {
      "value": "rtsp://xyz.com:443/playback/9a78b68f68ae4538a1cf"
    },
    "imageUri": {
      "value": "https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"
    }
}
于 2017-08-29T09:08:16.293 回答