You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Home智能家居同步失败:JSON验证通过但无兼容设备

问题:Google Home智能家居Action同步失败,提示“在您的curiousfly账户中未找到兼容设备”

开发Google Home智能家居Action时,执行设备同步查询收到错误提示:“在您的curiousfly账户中未找到兼容设备”。已在Google Home Playground验证设备配置JSON格式有效,但同步仍失败。以下是设备配置JSON:

[
{
"id": "1234",
"type": "action.devices.types.FAN",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.FanSpeed"
],
"name": {
"name": "load four",
"defaultNames": [
"load four"
],
"nicknames": [
"load four"
]
},
"willReportState": true,
"roomHint": "Room one",
"attributes": {
"reversible": false,
"availableFanSpeeds": {
"ordered": true,
"speeds": [
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"1",
"one",
"One",
"minimum",
"Minimum",
"low",
"Low"
]
}
],
"speed_name": "1"
},
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"2",
"two",
"Two"
]
}
],
"speed_name": "2"
},
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"3",
"threeThreeMediummediumHalfhalf"
]
}
],
"speed_name": "3"
},
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"4",
"four",
"Four"
]
}
],
"speed_name": "4"
},
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"5",
"five",
"Five",
"maximum",
"Maximumhigh",
"High"
]
}
],
"speed_name": "5"
}
]
}
},
"states": {
"online": true,
"on": true,
"currentFanSpeedSetting": "1"
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
},
{
"id": "C0D7AA7565E8",
"type": "action.devices.types.AUDIO_VIDEO_RECEIVER",
"traits": [
"action.devices.traits.InputSelector",
"action.devices.traits.MediaState",
"action.devices.traits.OnOff",
"action.devices.traits.TransportControl",
"action.devices.traits.Volume"
],
"name": {
"name": "YTU_I"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "smart-home-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"volumeMaxLevel": 100,
"orderedInputs": false,
"availableInputs": [
{
"names": [
{
"lang": "en",
"name_synonym": [
"HDMI 1",
"DVD Player"
]
}
],
"key": "hdmi_1"
},
{
"names": [
{
"lang": "en",
"name_synonym": [
"HDMI 2",
"TV"
]
}
],
"key": "hdmi_2"
}
],
"volumeCanMuteAndUnmute": true,
"transportControlSupportedCommands": [
"NEXT",
"PREVIOUS",
"PAUSE",
"STOP",
"RESUME"
]
},
"states": {
"online": true,
"currentInput": "hdmi_1",
"on": true,
"currentVolume": 40,
"isMuted": false
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
},
{
"id": "00f1-4b3b-ab2b-48aa1a3f7274",
"type": "action.devices.types.LOCK",
"traits": [
"action.devices.traits.LockUnlock"
],
"name": {
"name": "door"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "smart-home-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {},
"states": {
"online": true,
"isLocked": false,
"isJammed": false
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
},
{
"id": "4y74-453c-b034-c9746693f942",
"type": "action.devices.types.LIGHT",
"traits": [
"action.devices.traits.ColorSetting",
"action.devices.traits.Brightness",
"action.devices.traits.OnOff"
],
"name": {
"name": "Hue color lamp 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "smart-home-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"colorTemperatureRange": {
"temperatureMaxK": 9000,
"temperatureMinK": 2000
},
"colorModel": "rgb"
},
"states": {
"online": true,
"color": {
"spectrumRgb": 16711935
},
"brightness": 100,
"on": true
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
},
{
"id": "4y56-453c-l434-c9746693f942",
"type": "action.devices.types.LIGHT",
"traits": [
"action.devices.traits.ColorSetting",
"action.devices.traits.Brightness",
"action.devices.traits.OnOff"
],
"name": {
"name": "Hue lightstrip plus 1"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "smart-home-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"colorTemperatureRange": {
"temperatureMaxK": 9000,
"temperatureMinK": 2000
},
"colorModel": "rgb"
},
"states": {
"online": true,
"color": {
"spectrumRgb": 16711935
},
"brightness": 100,
"on": true
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
},
{
"id": "4y56-454587-b034-c9746675f942",
"type": "action.devices.types.LIGHT",
"traits": [
"action.devices.traits.ColorSetting",
"action.devices.traits.Brightness",
"action.devices.traits.OnOff"
],
"name": {
"name": "Hue second"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "smart-home-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"colorTemperatureRange": {
"temperatureMaxK": 9000,
"temperatureMinK": 2000
},
"colorModel": "rgb"
},
"states": {
"online": true,
"color": {
"spectrumRgb": 16711935
},
"brightness": 100,
"on": true
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
},
{
"id": "4y37-453c-b052-4545jkgii1bhh2b",
"type": "action.devices.types.AC_UNIT",
"traits": [
"action.devices.traits.FanSpeed",
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting"
],
"name": {
"name": "Dining"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "smart-home-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"thermostatTemperatureUnit": "F",
"availableThermostatModes": [
"on",
"heat",
"cool",
"fan-only",
"dry",
"auto",
"off"
],
"availableFanSpeeds": {
"ordered": true,
"speeds": [
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"Low",
"Slow"
]
}
],
"speed_name": "Low"
},
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"Medium",
"Average"
]
}
],
"speed_name": "Med"
},
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"High",
"Speed"
]
}
],
"speed_name": "High"
},
{
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"Top Speed",
"Maximum"
]
}
],
"speed_name": "Top"
}
]
},
"_lastThermostatMode": "heat"
},
"states": {
"online": true,
"currentFanSpeedSetting": "Low",
"on": true,
"thermostatTemperatureSetpoint": 25,
"targetTempReachedEstimateUnixTimestampSec": 1696857817,
"thermostatTemperatureAmbient": 25,
"thermostatHumidityAmbient": 45,
"activeThermostatMode": "none",
"thermostatMode": "none"
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
},
{
"id": "4y37-453c-b034-79cb6693f945",
"type": "action.devices.types.TV",
"traits": [
"action.devices.traits.Channel",
"action.devices.traits.InputSelector",
"action.devices.traits.AppSelector",
"action.devices.traits.MediaState",
"action.devices.traits.OnOff",
"action.devices.traits.TransportControl",
"action.devices.traits.Volume"
],
"name": {
"name": "Simple TV"
},
"willReportState": true,
"deviceInfo": {
"manufacturer": "smart-home-inc",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableChannels": [],
"volumeMaxLevel": 10,
"levelStepSize": 1,
"supportPlaybackState": true,
"availableApplications": [
{
"names": [
{
"lang": "en",
"name_synonym": [
"Youtube",
"Youtube_en"
]
}
],
"key": "youtube"
}
],
"orderedInputs": false,
"availableInputs": [
{
"names": [
{
"lang": "en",
"name_synonym": [
"HDMI 1"
]
}
],
"key": "hdmi_1"
}
],
"commandOnlyVolume": false,
"volumeCanMuteAndUnmute": false,
"volumeDefaultPercentage": 0,
"supportActivityState": true,
"transportControlSupportedCommands": []
},
"states": {
"online": true,
"currentInput": "hdmi_1",
"currentApplication": "",
"activityState": "STANDBY",
"playbackState": "STOPPED",
"on": true,
"currentVolume": 0,
"isMuted": false
},
"suv": {
"enabled": false,
"challengeType": "pinNeeded",
"pincode": "1234",
"allowRetry": false,
"rejectErrorCode": "pinIncorrect"
}
}
]

排查与修复方案

1. 修正JSON中的格式错误

  • 风扇设备第3档speed_synonym里的连写字符串拆分:将"threeThreeMediummediumHalfhalf"改为"three", "Three", "Medium", "medium", "Half", "half"
  • 风扇设备第5档speed_synonym里的"Maximumhigh"拆分为"Maximum", "high"
  • AC设备状态中的activeThermostatMode和thermostatMode需设置为availableThermostatModes内的有效值,比如"heat",不能用"none"
  • TV设备的transportControlSupportedCommands为空数组,但设备包含TransportControl trait,要么添加至少一个支持的命令(如"PAUSE"),要么移除该trait

2. 确保设备 trait 与 type 匹配

  • TV设备添加了Channel trait,但availableChannels为空,这会触发兼容性校验失败,要么补充频道配置,要么移除Channel trait

3. 清理冗余配置

所有设备的suv字段已设为enabled: false,建议直接移除该节点,避免不必要的校验问题

4. 验证同步响应结构

确认同步接口返回的响应包含requestId和payload.devices数组,且每个设备的必填字段(id、type、traits、name.name)完整无缺,设备ID在账户内唯一

5. 检查账户关联与权限

  • 确认curiousfly账户与Google Home的OAuth2关联流程正确,同步请求携带的用户身份凭证有效
  • 检查Action的权限配置,确保已申请设备同步所需的权限范围

内容的提问来源于stack exchange,提问作者Vignesh A K

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 03:19:52