我的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