我有一个智能家居操作,支持多种设备类别,包括百叶窗,门和窗户。只有当我说“关闭所有窗口”时,才会出现此错误消息。窗口是可单独寻址的。如果我说“关闭所有百叶窗”,则Google Home的反应很好。在后端,它们本质上是相同的,唯一不同的是设备类别。此特定设备类别有问题吗?这都是英文的。
答案 0 :(得分:0)
这是同步响应:
{
"requestId": "5149816291025266974",
"payload": {
"agentUserId": "XXXXHOME45",
"devices": [
{
"id": "HOME-34002c000a47363339343638-11",
"name": {
"name": "Bedroom 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-34002c000a47363339343638-12",
"name": {
"name": "Bedroom 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-34002c000a47363339343638-13",
"name": {
"name": "Bathroom"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-34002c000a47363339343638-14",
"name": {
"name": "Balcony"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-3e0030000b47363339343638-19",
"name": {
"name": "Window 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.WINDOW",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-3e0030000b47363339343638-20",
"name": {
"name": "Window 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.WINDOW",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-3e0030000b47363339343638-21",
"name": {
"name": "Window 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.WINDOW",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Master Bedroom"
},
{
"id": "HOME-3e0030000b47363339343638-22",
"name": {
"name": "Window 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.WINDOW",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Master Bedroom"
},
{
"id": "HOME-330035000a47363339343638-17",
"name": {
"name": "Blind 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Master Bedroom"
},
{
"id": "HOME-3c002b000747363339343638-23",
"name": {
"name": "Window 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.WINDOW",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-3c002b000747363339343638-24",
"name": {
"name": "Window 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.WINDOW",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-330035000a47363339343638-28",
"name": {
"name": "Blind 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-330035000a47363339343638-18",
"name": {
"name": "Blind 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-34002c000a47363339343638-15",
"name": {
"name": "Blind 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-34002c000a47363339343638-16",
"name": {
"name": "Blind 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-34002c000a47363339343638-10",
"name": {
"name": "Front Door"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-340031000d47363330353437-133",
"name": {
"name": "Stove"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.OUTLET",
"traits": [
"action.devices.traits.OnOff"
]
}
]
}
这是我说命令的屏幕截图。如您所见,window命令会收到“没有得到响应”消息,但实际上所有窗口确实关闭了。我也可以单独控制窗户。
编辑: 好的,我将发现从WINDOW更改为AWNING,这使它可行。这样看来,窗口设备类型有什么问题吗?再次,我将附加发现响应。
{
"requestId": "5149816291025266974",
"payload": {
"agentUserId": "XXXXHOME45",
"devices": [
{
"id": "HOME-34002c000a47363339343638-11",
"name": {
"name": "Bedroom 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-34002c000a47363339343638-12",
"name": {
"name": "Bedroom 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-34002c000a47363339343638-13",
"name": {
"name": "Bathroom"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-34002c000a47363339343638-14",
"name": {
"name": "Balcony"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-3e0030000b47363339343638-19",
"name": {
"name": "Window 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.AWNING",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-3e0030000b47363339343638-20",
"name": {
"name": "Window 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.AWNING",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-3e0030000b47363339343638-21",
"name": {
"name": "Window 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.AWNING",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Master Bedroom"
},
{
"id": "HOME-3e0030000b47363339343638-22",
"name": {
"name": "Window 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.AWNING",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Master Bedroom"
},
{
"id": "HOME-330035000a47363339343638-17",
"name": {
"name": "Blind 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Master Bedroom"
},
{
"id": "HOME-3c002b000747363339343638-23",
"name": {
"name": "Window 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.AWNING",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-3c002b000747363339343638-24",
"name": {
"name": "Window 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.AWNING",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-330035000a47363339343638-28",
"name": {
"name": "Blind 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-330035000a47363339343638-18",
"name": {
"name": "Blind 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Second Bedroom"
},
{
"id": "HOME-34002c000a47363339343638-15",
"name": {
"name": "Blind 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-34002c000a47363339343638-16",
"name": {
"name": "Blind 2"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.BLINDS",
"traits": [
"action.devices.traits.OpenClose"
],
"roomHint": "Living Room"
},
{
"id": "HOME-34002c000a47363339343638-10",
"name": {
"name": "Front Door"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.DOOR",
"traits": [
"action.devices.traits.OpenClose"
]
},
{
"id": "HOME-340031000d47363330353437-133",
"name": {
"name": "Stove"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "XXXX"
},
"customData": {
"device_class": "XXXX",
"device_id": "XX",
"property_id": XX
},
"type": "action.devices.types.OUTLET",
"traits": [
"action.devices.traits.OnOff"
]
}
]
}
因此,除了我更改了设备类型并开始工作之外,其他一切都完全相同。
答案 1 :(得分:0)
您是否在项目的StackDriver日志中看到与这些请求ID相对应的任何错误? developers.google.com/actions/smarthome/develop/error-logging 确保在资源过滤器中选择“ Google Assistant操作”(对我来说,默认情况下是“ Cloud Function”),以查看命令执行后Google Assistant抱怨什么。