如何解决谷歌智能家居操作在命令执行时总是失败
我正在为 Google Actions 开发 fanSpeed 和 colorSetting 特性,但是每当我执行设置风扇速度或设置灯光颜色的命令时,它都会失败。这是我用于同步、查询和执行步骤的 JSON:
同步
{
"requestId":"d25ty67q-98jui-581aa-j891-b1f6dhuas"
"payload":{
"devices": [
{
"id": "AA96A0#16","type": "action.devices.types.FAN","traits": [
"action.devices.traits.OnOff","action.devices.traits.FanSpeed"
],"roomHint": "ROOM","deviceInfo": {
"manufacturer": "smart Homes"
},"name": {
"defaultNames": [
"fan"
],"name": "fan"
},"willReportState": true,"customData": {
},"attributes": {
"commandOnlyOnOff": false,"commandOnlyFanSpeed": false,"reversible": false,"availableFanSpeeds": {
"speeds": [
{"speed_name": "speed_low","speed_values": [{"speed_synonym": ["low","low speed","slow"],"lang": "en"}]},{"speed_name": "speed_medium","speed_values": [{"speed_synonym": ["medium","medium speed","med"],{"speed_name": "speed_high","speed_values": [{"speed_synonym": [ "high speed","high"],{"speed_name": "speed_highest","speed_values": [{"speed_synonym": [ "highest speed","highest"],"lang": "en"}]}
],"ordered": true
}
}
},{
"id": "240A50#0","type": "action.devices.types.LIGHT","action.devices.traits.ColorSetting"
],"name": {
"defaultNames": [
"light"
],"name": "light"
},"willReportState": false,"customData": {
},"attributes": {
"commandOnlyColorSetting": true,"colorModel": "hsv"
}
}
],"agentUserId": "Home555"
}
}
执行风扇:
{
"commands": [
{
"ids": [
"AA96A0#16"
],"status": "SUCCESS","states": {
"online": true,"on": true,"currentFanSpeedSetting": "speed_highest"
}
}
]
}
查询粉丝:
{
"requestId":"167278043664013971","payload":{
"devices": {
"AA96A0#16": {
"status": "SUCCESS","online": true,"currentFanSpeedSetting": "speed_highest"
}
}
}
}
执行彩色光:
{
"commands": [
{
"ids": [
"240A50#0"
],"color": {
"spectrumHSV": {
"hue": 120,"saturation": 1,"value": 1
}
}
}
}
]
}
查询色光:
{
"requestId":"167278043664013971","payload":{
"devices": {
"240A50#0": {
"status": "SUCCESS","color": {
"spectrumHSV": {
"hue": 0,"saturation": 0,"value": 1
}
}
}
}
}
}
发言人回复:抱歉,目前似乎无法使用智能家居。
但是我的请求总是在执行,我可以在我的设备上看到状态变化。谁能指出为什么它失败了?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。