试图为action.devices.commands.mediaClosedCaptioningOn特性实现TransportControl命令。我在设备的同步意图上发送的transportControlSupportedCommands数组中包含了‘transportControlSupportedCommands’,但是当我实际上请求助手打开设备上的字幕时,它回答说“那个设备不能播放视频”,而我的代码实际上从未得到助手的执行意图。
我也成功地实现了mediaShuffle命令,但注意到当我发出它时,助手会在我的设备实际播放视频时用“音乐将在当前项目之后进行洗牌”来响应。
有人知道我怎么告诉助理我的设备播放视频吗?我似乎在TransportControl的文档中找不到它--它可能有不同的特性吗?
2020年10月13日编辑:
根据请求,我当前为该设备发送的完整同步响应:
{
"requestId": "11724082196092058876",
"payload": {
"agentUserId": "xxxxxx",
"devices": [
{
"id": "10.0.6.252",
"type": "action.devices.types.STREAMING_STICK",
"traits": [
"action.devices.traits.TransportControl",
"action.devices.traits.Volume",
"action.devices.traits.MediaState"
],
"name": {
"name": "Bedroom Stick"
},
"willReportState": true,
"roomHint": "bedroom",
"attributes": {
"transportControlSupportedCommands": [
"NEXT",
"PREVIOUS",
"PAUSE",
"STOP",
"RESUME",
"CAPTION_CONTROL",
"SEEK_TO_POSITION",
"SEEK_RELATIVE",
"SET_REPEAT",
"SHUFFLE"
],
"volumeMaxLevel": 100,
"volumeCanMuteAndUnmute": true,
"levelStepSize": 10,
"commandOnlyVolume": false,
"volumeDefaultPercentage": 100,
"supportActivityState": false,
"supportPlaybackState": true
}
}
]
}
}产生这一问题的确切助理查询包括"OK Google,打开卧室棒上的字幕“(回复:”该设备不能播放视频“)。还有“好的谷歌,洗牌在卧室的棍子上。”(回应:“好吧,音乐在这首歌之后将开始洗牌。”)
发布于 2022-02-07 18:18:31
您需要对已发布的同步响应进行某些更改,这些更改可能会使设备正常工作。
- action.devices.traits.AppSelector- action.devices.traits.MediaState- action.devices.traits.TransportControl- action.devices.traits.Volume同步响应缺少AppSelector特性。
有关如何使用流棒的更多信息可以在这里找到:
https://developers.google.com/assistant/smarthome/guides/streamingstick#response
https://stackoverflow.com/questions/64234454
复制相似问题