2

我有这个端点,它的 powerState 和连接属性都可以检索:

    {
        "endpointId": "123",
        "manufacturerName": "abc",
        "friendlyName": "lamp",
        "description": "lamp",
        "displayCategories": [
            "LIGHT"
        ],
        "capabilities": [
            {
                "type": "AlexaInterface",
                "interface": "Alexa.PowerController",
                "version": "3",
                "properties": {
                    "supported": [{
                            "name": "powerState"
                        }],
                    "retrievable": true
                }
            },
            {
                "type": "AlexaInterface",
                "interface": "Alexa.EndpointHealth",
                "version": "3",
                "properties": {
                    "supported": [{
                            "name": "connectivity"
                        }],
                    "retrievable": true
                }
            }
        ],
        "cookie": {}
    }

我通过发送两个属性的状态来响应 ReportState 请求:


    {
        "context": {
            "properties": [
                {
                    "namespace": "Alexa.PowerController",
                    "name": "powerState",
                    "value": "ON",
                    "timeOfSample": "2019-01-10T10:17:19.99Z",
                    "uncertaintyInMilliseconds": 50
                },
                {
                    "namespace": "Alexa.EndpointHealth",
                    "name": "connectivity",
                    "value": {
                        "value": "OK"
                    },
                    "timeOfSample": "2019-01-10T10:17:19.90Z",
                    "uncertaintyInMilliseconds": 50
                }
            ]
        },
        "event": {
            "header": {
                "namespace": "Alexa",
                "name": "StateReport",
                "payloadVersion": "3",
                "messageId": "cde",
                "correlationToken": "efg123"
            },
            "endpoint": {
                "scope": {
                    "type": "BearerToken",
                    "token": "ab123"
                },
                "endpointId": "123",
                "cookie": {}
            },
            "payload": {}
        }
    }

我在 PowerController 响应中发送相同的上下文。在 Alexa 应用程序中,我可以看到我的设备、打开和关闭它并正确查看它的状态。我可以让 Alexa 开启和关闭我的设备,然后回复“OK”,但如果我尝试询问:**“我的设备是否已开启?” ** Alexa 回答说此设备不支持

技能语言是意大利语,PowerController 文档https://developer.amazon.com/it/docs/device-apis/alexa-powercontroller.html表示支持查询。

我错过了什么?

4

0 回答 0