我的Alexa Smart Home Skill for Entertainment Devices实现了API版本3的一些功能,包括Alexa.Speaker Interface。实现Alexa.Speaker接口无法响应音量变化请求的智能家居设备
据我从文档理解,应该响应语音如命令“的Alexa,装置的体积设定为5”,然而的Alexa总是与响应“对不起,我无法控制您的设备上的音量“。
设备的发现响应看起来像这样
{
endpointId: 'music1',
friendlyName: 'pillow',
description: 'Music on Kodi',
manufacturerName: 'Cubox-i',
displayCategories: [],
capabilities: [
{
type: 'AlexaInterface',
interface: 'Alexa.PowerController',
version: '1.0',
properties: {
supported: [
{
name: 'powerState',
},
],
},
},
{
type: 'AlexaInterface',
interface: 'Alexa.PlaybackController',
version: '1.0',
properties: {},
},
{
type: 'AlexaInterface',
interface: 'Alexa.Speaker',
version: '1.0',
properties: {
supported: [
{
name: 'volume',
},
{
name: 'muted',
},
],
},
},
],
}
发现似乎很好地工作,因为PowerController
接口被响应细(例如“Alexa的,打开枕”)。
我可以在AWS Lambda日志中看到发现,PowerController
和PlaybackController
请求和响应。
任何声音命令来Speaker
(是否试图音量设置为20,增加它,或询问是否静音或取消静音枕头)不产生我的Lambda和结果的任何请求在上面提到的响应中 - 或在屏蔽的情况下“枕头不支持”。
感谢您的回答。这似乎已经完成了“静音/取消静音”命令。然而,当试图设置音量(“将枕头的体积设置为5”)时,响应仍然是“抱歉,我无法控制设备上的音量” - 或者有时“抱歉,枕头不支持该音量” 这里有趣的是,即使我使用相同的输入命令,错误消息有时是一个,有时是另一个。结合你的提示,这告诉我这个API不稳定,错误可能不是在我的,但在亚马逊的一面。 – WrongAboutMostThings