0
  1. Created Google Smart Home Action.
  2. Implemented device with: a. deviceType = action.devices.types.SETTOP b. deviceTrait = action.devices.traits.Channel
  3. Device is successfully discovered and added to Google Home App's Homegraph.
  4. User sends command: "Ok Google, change to ESPN"
  5. Receives the following json in fulfillment URL:
    {
      "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"? The user's command was "Ok Google, change to "ESPN". This does not contain any information about the channel number.
  2. If a provider was set automatically, is there a setting in Google Home or Google Assistant to change this provider?
WuTang805
  • 17
  • 3
  • Hi @WuTang805, I am trying to get the intent to work at the first place, but my fulfilment function is not receiving the `action.devices.commands.selectChannel ` command, rest of the commands like `action.devices.commands.OnOff`, `action.devices.commands.relativeChannel`, `action.devices.commands.mute` are working as expected. Any clues ? – amitmula Feb 26 '21 at 21:25
  • @amitmula Are you sending the correct SYNC response for action.devices.traits.Channel? Refer to: https://developers.google.com/assistant/smarthome/traits/channel – WuTang805 Mar 05 '21 at 19:59
  • @WuTanng805 yes I am sending the correct SYNC response, here's what I am sending `availableChannels: [{"key":"sp1","names":["Star Plus","star plus HD"],"number":"117"}]` – amitmula Mar 07 '21 at 04:19

1 Answers1

1

The number of a channel for the Channel trait is provided in the SYNC request along with any relevant labels.

{
  "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.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • Thank you for the insight. I forgot I was passing "number" in my SYNC responses for my channels! – WuTang805 Feb 17 '21 at 19:48
  • @nick-felker Anything changed with the channel traits recently? I am able to receive all intents in my fulfilment function except the ones with `action.devices.commands.selectChannel` command. – amitmula Mar 07 '21 at 04:27
  • Nothing has changed to my knowledge, but if it did the related documentation should reflect that. – Nick Felker Mar 08 '21 at 17:55