Alexa Discovery 技能 - Return 连接设备

Alexa Discovery Skill - Return Connected Devices

我正在研究智能家居 Alexa Skill 和相应的 Lambda 函数。有很多演示,它们似乎都是 return 固定文本。有没有办法通过 Lambda/JS 获取用户帐户的已连接设备列表?

这样的示例:

const USER_DEVICES = [
{
    // This id needs to be unique across all devices discovered for a given manufacturer
    applianceId: 'unique-id-for-non-dimmable-bulb-specific-to-user1',
 },{},{},...]

我很想实现更像这样的代码:

const USER_DEVICES = Some.Alexa.Function.GetConnectedDevices()

谢谢!

智能家居技能API你查过了吗?它会让您与连接的设备交互并获取有关它们的数据:https://developer.amazon.com/docs/smarthome/understand-the-smart-home-skill-api.html