我正在实施一个 google Home 应用程序,并已成功实施所有 API 调用,并已实施 SWITCH 和 OUTLET 并控制我的 IOT 设备。我已经根据Google Assistant中的文档为 VALVE 添加了一个条目。同步呼叫后,该设备会出现在 Google Home 中,但该图标的右上角有一个齿轮,并且该设备不可配置。发出 QUERY 呼叫时,我正在发送设备更新。然而仍然没有更新。报告状态仪表板显示没有填充数据的设备条目。当我响应其他设备的查询时,主页图会更新。
这是我的第一篇文章,如果您需要什么,请告诉我。大多数情况下,我想知道 VALVE 是否有问题,是否有人有一个实现可以分享。
先感谢您。
同步响应
{
"requestId":"5652153305156254765",
"payload":{
"agentUserId":"123",
"devices":[
{
"id":"AUDIO_AMP_1",
"type":"action.devices.types.SWITCH",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Sony Receiver",
"nicknames":[
"Sony Receiver"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"BOX_OUTLET_1",
"type":"action.devices.types.OUTLET",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Waterfall Outlet",
"nicknames":[
"Waterfall Outlet"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"BOX_OUTLET_0",
"type":"action.devices.types.OUTLET",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Box Outlets",
"nicknames":[
"Box Outlets"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"BOX_LIGHTS_1",
"type":"action.devices.types.LIGHT",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Box Lights (back)",
"nicknames":[
"Box Lights (back)"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"BOX_LIGHTS_0",
"type":"action.devices.types.LIGHT",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Box Lights (front)",
"nicknames":[
"Box Lights (front)"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"CABANA_DECK_LIGHTS_0",
"type":"action.devices.types.LIGHT",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Cabana Deck Lights",
"nicknames":[
"Cabana Deck Lights"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"GRAPE_VINE_LIGHTS_0",
"type":"action.devices.types.LIGHT",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Grape Vine Lights",
"nicknames":[
"Grape Vine Lights"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"PUMP_HOUSE_LIGHTS_0",
"type":"action.devices.types.LIGHT",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"name":"Pump House Lights",
"nicknames":[
"Pump House Lights"
]
},
"willReportState":true,
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
},
{
"id":"WATER_FEED_0",
"type":"action.devices.types.VALVE",
"traits":[
"action.devices.traits.OpenClose"
],
"name":{
"name":"Pool Water Feed",
"nicknames":[
"Pool Water Feed"
]
},
"willReportState":true,
"attributes":{
"discreteOnlyOpenClose":true
},
"deviceInfo":{
"manufacturer":"CJ-Systems",
"model":"1.0",
"hwVersion":"1.0",
"swVersion":"1.0"
}
}
]
}
}
查询响应
{
"requestId":"14963487851537970880",
"payload":{
"devices":{
"BOX_LIGHTS_1":{
"online":true,
"on":false
},
"BOX_LIGHTS_0":{
"online":true,
"on":false
},
"BOX_OUTLET_0":{
"online":true,
"on":false
},
"CABANA_DECK_LIGHTS_0":{
"online":true,
"on":false
},
"GRAPE_VINE_LIGHTS_0":{
"online":true,
"on":false
},
"WATER_FEED_0":{
"online":true,
"openPercent":100
},
"PUMP_HOUSE_LIGHTS_0":{
"online":true,
"on":false
},
"AUDIO_AMP_1":{
"online":true,
"on":false
},
"BOX_OUTLET_1":{
"online":true,
"on":false
}
}
}