1

对于以下 Google Assistant Home 自动化同步请求,我对某些帐户的后端响应有效。但是有些帐户失败了,我一无所知。

{
    "requestId": "XXXXXXXXXXXX",
    "inputs": [{
        "intent": "action.devices.SYNC"
    }]
 }

如何调试 SYNC 请求失败的原因?是否有一个控制台或日志,我可以看到哪里出了问题。

一切看起来都很好。我的用户群的其他一些帐户的类似响应有效,而对于该用户的响应,它总是无效。

不工作响应:

在这种情况下,它对以下 SYNC 响应失败。

[{ "payload": { "devices": [{ "id": "7e-f2-ca-ab-40-34-34-95:1:1", "name": { "name": "Air Conditioner" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.OUTLET", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:2:1", "name": { "name": "Office Hooter" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:5:1", "name": { "name": "Office Motion" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:11:1", "name": { "name": "Buzzer" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:11:2", "name": { "name": "DOOR SENSOR" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:11:4", "name": { "name": "Presence Sensor" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:14:1", "name": { "name": "Blue Lamp" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:14:2", "name": { "name": "Green Lamp" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:14:3", "name": { "name": "Side Light" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:15:1", "name": { "name": "Front Light" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:15:2", "name": { "name": "Outdoor Lights" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:15:3", "name": { "name": "Front Dimmer" }, "traits": ["action.devices.traits.OnOff", "action.devices.traits.Brightness"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:17:1", "name": { "name": "Extra Lights" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:17:2", "name": { "name": "Central Light" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:17:3", "name": { "name": "Fan" }, "traits": ["action.devices.traits.OnOff", "action.devices.traits.Brightness"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:19:1", "name": { "name": "Key Ring" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:19:2", "name": { "name": "Office Door" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:19:4", "name": { "name": "Presence Sensor" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:6:1", "name": { "name": "Blue LED" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:6:2", "name": { "name": "Work Lights" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:6:3", "name": { "name": "Dimmer Back" }, "traits": ["action.devices.traits.OnOff", "action.devices.traits.Brightness"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:4:1", "name": { "name": "Buzzer" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:4:2", "name": { "name": "Door Sensor" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:4:4", "name": { "name": "Presence Sensor" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:3:1", "name": { "name": "Plug" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.OUTLET", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:7:1", "name": { "name": "Curtain Up" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:7:2", "name": { "name": "Curtain Down" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "7e-f2-ca-ab-40-34-34-95:7:3", "name": { "name": "Regulator" }, "traits": ["action.devices.traits.OnOff", "action.devices.traits.Brightness"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "27465191118001134545448968013", "name": { "name": "Darkness" }, "traits": ["action.devices.traits.Scene"], "type": "action.devices.types.SCENE", "willReportState": false }, { "id": "27465189752942073090942148334", "name": { "name": "Everything" }, "traits": ["action.devices.traits.Scene"], "type": "action.devices.types.SCENE", "willReportState": false }, { "id": "27507709627159036391184182205", "name": { "name": "Mood Lights" }, "traits": ["action.devices.traits.Scene"], "type": "action.devices.types.SCENE", "willReportState": false }, { "id": "27514704337364024105847592198", "name": { "name": "White Lights" }, "traits": ["action.devices.traits.Scene"], "type": "action.devices.types.SCENE", "willReportState": false }, { "id": "27576295525515559712639822299", "name": { "name": "Office Lights" }, "traits": ["action.devices.traits.Scene"], "type": "action.devices.types.SCENE", "willReportState": false }] }, "requestId": "4881304563722779302" }]


而对于以下 SYNC 响应,它可以工作。

[{ "payload": { "devices": [{ "id": "21-0b-c9-87-db-70-b6-83:1:1", "name": { "name": "Serial Lights" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.OUTLET", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:2:1", "name": { "name": "Water Heater" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.OUTLET", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:10:1", "name": { "name": "Panic Alarm" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:11:1", "name": { "name": "Hall Motion Sensor" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:16:1", "name": { "name": "Buzzer" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:16:2", "name": { "name": "Primary Door" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:16:4", "name": {}, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:6:1", "name": { "name": "Car Keys" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:6:2", "name": { "name": "Door Sensor" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:6:4", "name": { "name": "Presence Sensor" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:3:1", "name": { "name": "Dummy" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:3:2", "name": { "name": "All Out" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:3:3", "name": { "name": "Bed Room Fan" }, "traits": ["action.devices.traits.OnOff", "action.devices.traits.Brightness"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:5:1", "name": { "name": "Hall Light" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:5:2", "name": { "name": "Night Light" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:5:3", "name": { "name": "Fan" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:8:1", "name": { "name": "Exhaust" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:8:2", "name": { "name": "kitchen Light" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "id": "21-0b-c9-87-db-70-b6-83:8:3", "name": { "name": "Balcony Light" }, "traits": ["action.devices.traits.OnOff"], "type": "action.devices.types.SWITCH", "willReportState": false }, { "name": { "name": "Good Night" }, "traits": ["action.devices.traits.Scene"], "type": "action.devices.types.SCENE", "willReportState": false }] }, "requestId": "13733611394224717847" }]

4

1 回答 1

0

谷歌发布了智能家居同步响应验证器工具。使用此工具验证发送到 Google 助理的同步响应。

于 2017-07-05T05:49:09.333 回答