Google LIGHT 问题的主页报告状态
Google Home Report State for LIGHT issue
当我发送 reportState 时出现此错误:
{"error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT"}}
对于以下请求:
{
"requestId":"b09aa527-e8ec-4374-8d0b-742ba61bbfe3",
"agentUserId":"5d8f3dd42ce05140dc1c6a20",
"payload":{
"devices":{
"states":{
"5e3679c9130c053f48888114":{
"brightness":67,
"colorModel":"rgb",
"spectrumRGB":31655,
"on":true
}
}
}
}
}
这是同步请求响应:
{
"requestId":"4439574979535065527",
"payload":{
"agentUserId":"5d8f3dd42ce05140dc1c6a20",
"devices":[
{
"id":"5e3679c9130c053f48888114",
"type":"action.devices.types.LIGHT",
"traits":[
"action.devices.traits.Brightness",
"action.devices.traits.ColorSetting",
"action.devices.traits.OnOff"
],
"name":{
"defaultNames":[
"lamp"
],
"name":"lamp",
"nicknames":[
"lamp"
]
},
"willReportState":true,
"roomHint":"Living Room",
"deviceInfo":{
"manufacturer":"Sinric Pro",
"model":"SR2",
"hwVersion":"1.0",
"swVersion":"1.0"
},
"attributes":{
"colorModel":"rgb",
"colorTemperatureRange":{
"temperatureMinK":2000,
"temperatureMaxK":9000
},
"commandOnlyColorSetting":false
}
}
]
}
}
如果我删除
"colorModel":"rgb", "spectrumRGB":31655,
看来成功了。
知道为什么以及如何解决这个问题吗?如果 Google API 可以 return 比这个
更好的响应就好了
找到原因了。响应缺少颜色。希望这对其他人有帮助:D
{
"requestId":"956cf9d4-6ac2-407d-b683-e04224303de6",
"agentUserId":"5d8f3dd42ce05140dc1c6a20",
"payload":{
"devices":{
"states":{
"5e3679c9130c053f48888114":{
"brightness":67,
"color":{
"spectrumRGB":4915330
},
"on":true
}
}
}
}
}
当我发送 reportState 时出现此错误:
{"error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT"}}
对于以下请求:
{
"requestId":"b09aa527-e8ec-4374-8d0b-742ba61bbfe3",
"agentUserId":"5d8f3dd42ce05140dc1c6a20",
"payload":{
"devices":{
"states":{
"5e3679c9130c053f48888114":{
"brightness":67,
"colorModel":"rgb",
"spectrumRGB":31655,
"on":true
}
}
}
}
}
这是同步请求响应:
{
"requestId":"4439574979535065527",
"payload":{
"agentUserId":"5d8f3dd42ce05140dc1c6a20",
"devices":[
{
"id":"5e3679c9130c053f48888114",
"type":"action.devices.types.LIGHT",
"traits":[
"action.devices.traits.Brightness",
"action.devices.traits.ColorSetting",
"action.devices.traits.OnOff"
],
"name":{
"defaultNames":[
"lamp"
],
"name":"lamp",
"nicknames":[
"lamp"
]
},
"willReportState":true,
"roomHint":"Living Room",
"deviceInfo":{
"manufacturer":"Sinric Pro",
"model":"SR2",
"hwVersion":"1.0",
"swVersion":"1.0"
},
"attributes":{
"colorModel":"rgb",
"colorTemperatureRange":{
"temperatureMinK":2000,
"temperatureMaxK":9000
},
"commandOnlyColorSetting":false
}
}
]
}
}
如果我删除
"colorModel":"rgb", "spectrumRGB":31655,
看来成功了。
知道为什么以及如何解决这个问题吗?如果 Google API 可以 return 比这个
更好的响应就好了找到原因了。响应缺少颜色。希望这对其他人有帮助:D
{
"requestId":"956cf9d4-6ac2-407d-b683-e04224303de6",
"agentUserId":"5d8f3dd42ce05140dc1c6a20",
"payload":{
"devices":{
"states":{
"5e3679c9130c053f48888114":{
"brightness":67,
"color":{
"spectrumRGB":4915330
},
"on":true
}
}
}
}
}