最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Alexa Smart Home Skill - Discovery Directive not working - Stack Overflow

programmeradmin1浏览0评论

I wrote a AWS lambda function in Java that returns the following JSON:

{
    "event": {
        "header": {
            "namespace": "Alexa.Discovery",
            "name": "Discover.Response",
            "messageId": "0559819e-49a3-4a8f-b614-6e8b3c186b71",
            "payloadVersion": "3"
        },
        "payload": {
            "endpoints": [
                {
                    "endpointId": "shelly_pm_0",
                    "manufacturerName": "Shelly",
                    "description": "Shelly Schalter für Licht der Küchenzeile",
                    "friendlyName": "Licht der Küchenzeile",
                    "additionalAttributes": {
                        "manufacturer": "Shelly",
                        "model": "Shelly 1PM Mini Gen3",
                        "serialNumber": "34B7DA91DAEC",
                        "firmwareVersion": "1.0.0",
                        "softwareVersion": "1.0.0",
                        "customIdentifier": "shelly_pm_0"
                    },
                    "displayCategories": [
                        "LIGHT"
                    ],
                    "cookie": {},
                    "capabilities": [
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.PowerController",
                            "version": "3",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "powerState"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            }
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.EndpointHealth",
                            "version": "3",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "connectivity"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            }
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa",
                            "version": "3"
                        }
                    ]
                }
            ]
        }
    }
}

I validated the json from alexa-smarthome repo and the JSON is valid. The cloudWatch logs show no errors and the last thing that is logged is the JSON string before it is returned, so I guess the function works.

Despite all that, when I link the account with the skill in the Alexa (which works as intended), the skill does not find any device.

Can anyone give me a hint on how to debug this or has had similar issues? Thanks for your help!

发布评论

评论列表(0)

  1. 暂无评论