简体   繁体   English

Google Smart Home 如何确定 action.devices.commands.selectChannel 的 channelNumber?

[英]How does Google Smart Home determine channelNumber for action.devices.commands.selectChannel?

  1. Created Google Smart Home Action.创建了谷歌智能家居行动。
  2. Implemented device with: a.实施的设备: deviceType = action.devices.types.SETTOP b. deviceType = action.devices.types.SETTOP b。 deviceTrait = action.devices.traits.Channel deviceTrait = action.devices.traits.Channel
  3. Device is successfully discovered and added to Google Home App's Homegraph.设备已成功发现并添加到 Google Home 应用的 Homegraph。
  4. User sends command: "Ok Google, change to ESPN"用户发送命令:“Ok Google,更改为 ESPN”
  5. Receives the following json in fulfillment URL:在履行 URL 中收到以下 json:
     { "requestId": "[RequestId GUID]", "inputs": [{ "intent": "action.devices.EXECUTE", "payload": { "commands": [{ "devices": [{ "id": "[SettopBox device Id]" }], "execution": [{ "command": "action.devices.commands.selectChannel", "params": { "channelCode": "espn", "channelName": "ESPN", "channelNumber": "206" } }] }] } }] }

Questions:问题:

  1. How does Google Smart Home determine the "channelNumber" value for "ESPN"? Google Smart Home 如何确定“ESPN”的“channelNumber”值? The user's command was "Ok Google, change to "ESPN". This does not contain any information about the channel number.用户的命令是“Ok Google,更改为“ESPN”。这不包含有关频道号的任何信息。
  2. If a provider was set automatically, is there a setting in Google Home or Google Assistant to change this provider?如果提供者是自动设置的,Google Home 或 Google 助理中是否有设置来更改此提供者?

The number of a channel for the Channel trait is provided in the SYNC request along with any relevant labels. SYNC 请求中提供了Channel trait的通道编号以及任何相关标签。

{
  "availableChannels": [
    {
      "key": "ktvu2",
      "names": [
        "Fox",
        "KTVU"
      ],
      "number": "2"
    },
    {
      "key": "abc1",
      "names": [
        "ABC",
        "ABC East"
      ],
      "number": "4-11"
    }
  ]
}

As shown in the snippet, the channel number comes from the service.如代码片段所示,频道号来自服务。 This may be up to the developer of the integration how these numbers may be determined, whether from a cable provider or over-the-air.这可能取决于集成开发人员如何确定这些数字,无论是来自有线电视提供商还是无线。 The field is optional, so a service without channel numbers may still work by saying its name.该字段是可选的,因此没有频道号的服务仍然可以通过说出其名称来工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 谷歌智能家居操作中的 action.devices.commands.OpenClose 特性无法正常工作 - action.devices.commands.OpenClose trait in Google Smart Home actions does not work properly 谷歌智能家居:异步填充 action.devices.commands.GetCameraStream - Google Smart Home: Fullfill action.devices.commands.GetCameraStream asynchronously Google Smart Home API上的Action如何异步工作? - How does Action on Google Smart Home API works Asynchronously? 如何从 Google Smart Home Action 获取访问令牌? - How to get Access token from Google Smart Home Action? 关于谷歌智能家居令牌交换问题的行动 - Action on google Smart home token exchange problem 是否有用于 Google Smart Home Action 的 .NET 客户端库? - Is there a .NET client library for Google Smart Home Action? 谷歌智能家居行动 OAuth 2.0 服务器 - Google Smart Home Action OAuth 2.0 Server Google Assistant Smart Home:Google 智能家居是否支持热水器设备的自定义命令? - Google Assistant Smart Home : Is Google smart home support custom command for water Heater devices? 如何让 Google Smart Home App 建议 Smart Home Actions - How to make Google Smart Home App suggests Smart Home Actions 如何为 Google 智能家居操作设置和部署本地执行应用程序? - How do I setup and deploy a local execution app for Google smart home action?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM