亚马逊回声显示没有响应新的智能家居技能

时间:2017-08-28 07:23:21

标签: alexa alexa-skills-kit alexa-skill alexa-voice-service amazon-echo

我已经创建了一个智能家居技能,用于测试我的亚马逊回声秀与我的智能相机的整合。我创建了一个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测试时,它表示"相机没有响应"

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

1 个答案:

答案 0 :(得分:0)

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

{
  "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"
    }
}

该文档称其仅适用于端口443上的Interleaved TCP(适用于RTP和RTSP)。

现在可以使用

$transport = (new Swift_SmtpTransport('mail.ramosefilho.com', 25))
  ->setUsername('marcacao@user.com')
  ->setPassword('user@++++')
;

$mailer = new Swift_Mailer($transport);

$message = (new Swift_Message('Contacto'))    
 ->setFrom(array('marcacao@user.com' => 'webmaster'))
 ->setTo(array('marcacao@user.com'))    
 ->setBody('$body = "nome: ".$nome."\n";    

$body .= "morada: ".$morada."\n";    
$body .= "email: ".$email."\n";    
$body .= "telefone: ".$telefone."\n";    
$body .= "marca: ".marca."\n";    
$body .= "modelo: ".$modelo."\n";
$body .= "ano: ".$ano."\n";    
$body .= "informacao: ".$informacao."\n";')    
 ;

$result = $mailer->send($message);