我的自定义Alexa技能能否打开和关闭其他供应商的灯?

时间:2019-03-05 16:58:49

标签: alexa-skills-kit smarthomeskill

我希望我的自定义技能能够打开和关闭Wemo或TP-Link开关/插座。 Alexa Skills Kit中是否有一些API可以让我打开和关闭家用设备,就像Alexa Routine可以打开和关闭设备的方式一样?

1 个答案:

答案 0 :(得分:1)

1.- When creating the skill, choose the "Smart Home" pre-build model

2.- Set up the endpoint

3.- Set up the Account linking so the user can link their TPLink or Wemo account

4.-以Alexa智能家居技能适配器示例为模板 https://github.com/awslabs/serverless-application-model/blob/master/examples/apps/alexa-smart-home-skill-adapter/index.js

5.- Choose Alexa Smart Home as the trigger to your Lambda funcion - assuming you will use AWS as backend

6.-确保实现以下两个功能:

function handleDiscovery(request, callback)
function handleControl(request, callback)

7.-智能家居请求将通过对通过帐户链接信息访问的TPLink和Wemo云服务的API调用来实现(步骤3)

祝你好运!