question

suwoong avatar image
suwoong asked

How to make Alexa knows my TV's channel data?

Hi.

I have a question about ChannelController interface.

In the Alexa.ChannelController developer guide, example request has this payload.

"payload": {
      "channel": {
          "number": "1234",
          "callSign": "KSTATION1",
          "affiliateCallSign": "KSTATION2",
          "uri": "someUrl"
      },
      "channelMetadata": {
          "name": "Alternate Channel Name",
          "image": "urlToImage"
      }
    }

But, I do not know how could Alexa deliver these number, callSign, affiliateCallSign, uri, name, image data?

I think there should be a table which contains those mapping informations.

And I believe this kind of table should informed to Alexa while discover my TV.

But the sample git only provides short examples like,

                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.ChannelController",
                            "version": "3",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "channel"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            }
                        },


How should I deliver the number, callSign, affiliateCallSign, uri, name, image table to Alexa while discovery?

If you know how, please share me the example Discovery response.

Thank you.

how-tosmart homedevice discovery
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sungyoo avatar image
sungyoo answered

Hey @suwoong, have you taken a look at sample response from GitHub repo for ChannelController?

2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Oliver@Amazon I looked at the response you linked, and it appears to be a response to change channel request and not a discovery response. Do we need to supply channel information as part of the channel controller interface

0 Likes 0 ·

I've implemented this interface in my TV controller dev skill without any special discovery response and it works ok. I can specify any channel name is my request to Alexa and she takes a stab at returning the channel name as best she can in the text response. You will need a regex to parse the response though - sometimes you might get back something different to what you expect. For example, if I ask for BBC1 through BBC4, the returned text can be BBC1, BBC TWO, B.B.C-three, b-b-c four if you get what I mean. Maybe if discovery did include a channel list then this could be avoided. Anyway, with some text parsing you can still make it serviceable.

0 Likes 0 ·
Sergey Korol avatar image
Sergey Korol answered

@suwoong's question was about custom channels' data binding as a contract between your Lambda handler and Alexa NLU module. I believe Alexa has a preceded set of channels from supported regions/providers. And if you try giving an unsupported name, an unexpected directive might be triggered. E.g. I have a channel called "Football 1" in my region. When I ask Alexa to select it, I see only a number "1" in the request. Moreover, if I ask switching to "Football" channel, "SkipChannels" directive is triggered. That's why it might be really helpful to let users' setting custom channels' mappings while discovery.

Note that in case of a custom skill (not a Smart Home), it's much easier to implement such mapping on Lambda side. However, in this case, we have to trigger a skill name first, e.g. "Alexa, ask living room to turn on TV", which is quite a long command in comparison with a simple "Alexa, turn on tv".

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sungyoo avatar image
sungyoo answered

My apologies, there is a giant discovery response that has an endpoint with ChannelController

https://github.com/alexa/alexa-smarthome/blob/master/sample_messages/Discovery/Discovery.response.json#L596

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.