![](/img/trans.png)
[英]How to make Google Smart Home App suggests Smart Home Actions
[英]Actions on Google - smart home - how to make Google Home response properly when smart home device is offline?
我的智能家居应用程序可以控制我的智能家居设备。 但是,当智能家居设备离线时,我无法让Google Home说“您的设备离线”。
Google Home总是说“确定,打开device_name。”。 根据Google提供的文档和Node.js示例,我尝试了两种错误响应:
{
"requestId": "xxxxxxx",
"payload": {
"commands": [{
"ids": ["456"],
"status": "ERROR",
"errorCode": "deviceoffline"
}]
}
}
{
"requestId": "xxxxxxx",
"payload": {
"commands": [{
"ids": ["456"],
"status": "OFFLINE",
"errorCode": "deviceoffline"
}]
}
}
但是两者都不起作用。 请赐教。 谢谢。
2017/08/02更新:离线状态正在“ QUERY”上工作,例如“ device_name是否打开?”。 在EXEC上不起作用,例如“打开device_name”。
您错过了JSON中的online
参数。 这是离线示例
{
"ids": ["456"],
"status": "ERROR",
"errorCode": "deviceTurnedOff",
"online": false
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.