在Alexa发现过程中,我们需要发送设备详细信息及其功能。我正在发送灯光和风扇详细信息。 Alexa App中显示了灯光,但风扇中没有显示。您能否通过以下回复帮助我找到我做错了什么。
我使用此Alexa文档来创建响应。 https://developer.amazon.com/docs/smarthome/connect-a-tower-fan-to-alexa.html
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "somd-id"
},
"payload": {
"endpoints": [
{
"endpointId": "fan-i",
"friendlyName": "Fan",
"description": "Fan",
"manufacturerName": "Fan",
"displayCategories": [
"OTHER"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [
{
"name": "powerState"
}
],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.RangeController",
"version": "3",
"instance": "speed",
"capabilityResources": {
"friendlyNames": [
{
"@type": "asset",
"value": {
"assetId": "Alexa.Setting.FanSpeed"
}
}
]
},
"properties": {
"supported": [
{
"name": "rangeValue"
}
],
"proactivelyReported": true,
"retrievable": true
},
"configuration": {
"supportedRange": {
"minimumValue": 1,
"maximumValue": 5,
"precision": 1
},
"presets": [
{
"rangeValue": 1,
"presetResources": {
"friendlyNames": [
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Minimum"
}
},
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Low"
}
}
]
}
},
{
"rangeValue": 5,
"presetResources": {
"friendlyNames": [
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Maximum"
}
},
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.High"
}
}
]
}
},
{
"rangeValue": 3,
"presetResources": {
"friendlyNames": [
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Medium"
}
}
]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
},
]
}
}
}
注意:我在下面重复上述问题,因为StackOverflow不允许粘贴太多的代码且描述较少。
在Alexa发现过程中,我们需要发送设备详细信息及其功能。我正在发送灯光和风扇详细信息。 Alexa App中显示了灯光,但风扇中没有显示。您能否通过以下回复帮助我找到我在做错什么。
答案 0 :(得分:0)
我认为Alexa.RangeController当前仅限于美国地区。因此,如果您尝试发现在美国境外注册的设备,那么Alexa似乎只是忽略了RangeController接口的发现响应。解决此问题的方法是将用户帐户切换为美国,然后设备立即出现。试试看,如果您有更好的解决方案,请分享。