【问题标题】:Actions on Google - smart home - how to make Google Home response properly when smart home device is offline?Actions on Google - 智能家居 - 智能家居设备离线时如何让 Google Home 正确响应?
【发布时间】:2017-07-20 08:02:59
【问题描述】:

我的智能家居应用已经可以控制我的智能家居设备。 但是,当智能家居设备离线时,我无法让 Google Home 像“您的设备离线”这样说。

Google Home 总是说“好的,打开 device_name。”。 根据谷歌提供的文档和Node.js示例,我尝试了2种错误响应:

{
  "requestId": "xxxxxxx",
  "payload": {  
    "commands": [{  
      "ids": ["456"],  
      "status": "ERROR",  
      "errorCode": "deviceoffline"  
    }]  
  }  
}

{
  "requestId": "xxxxxxx",
  "payload": {  
    "commands": [{  
      "ids": ["456"],  
      "status": "OFFLINE",  
      "errorCode": "deviceoffline"  
    }]  
  }  
}

但两者都不起作用。 请赐教。谢谢。

2017/08/02 更新: 离线状态正在处理 QUERY,例如“设备名称是否开启?”。 不适用于 EXEC,例如“打开 device_name”。

【问题讨论】:

    标签: actions-on-google google-home google-smart-home


    【解决方案1】:

    您错过了 JSON 中的 online 参数。以下是离线示例

       {
          "ids": ["456"],
          "status": "ERROR",
          "errorCode": "deviceTurnedOff",
          "online": false
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多