Search code examples
iotalexa-skills-kitalexa-smart-home-skill

Alexa Smart Home Skills IoT Alexa.PlaybackController


I have an IoT device that needs to support various operations, one of which is next from the Alexa.PlaybackController. My device is a multimedia device and requires many of the other Controllers as well. I'm including the Alexa.PlaybackController in the discovery response for my devices like so:

{
    "type": "AlexaInterface",
    "interface": "Alexa.PlaybackController",
    "version": "3",
    "supportedOperations": ["Next"],
}

I've also tried:

{
    "type": "AlexaInterface",
    "interface": "Alexa.PlaybackController",
    "version": "3",
    "properties": {
        "supported": [
            {"name": "next"}
        ]
    },
}

but neither work. I get a schema error on CloudWatch:

is not valid under any of the given schemas

Looking below at the schema, I see that PlaybackController indeed is not included inside the schema. However, all of the documentation makes it seem like this should be trivial. I'm wondering if I need to include something else to indicate that playback is something that I need.

Is PlaybackController special in some way and unable to be included in combination with other Controllers? I've tried googling about this schema error but it's too vague and nothing's coming up.

Any help would be much appreciated!

__

EDIT:

I see now that video devices seem to get a different set of available Controllers, but there is still reference to using PlaybackController in a lot of places around the regular Smart Home Skill for entertainment devices. Really hope that it's possible!


Solution

  • So should have probably figure this out sooner. I'm using the python validation class provided by Amazon. Turns out that the schema from the same repo simply doesn't include any reference to Alexa.PlaybackController. Therefore, the validation fails every time with the error about mismatching schemas. Maybe they've added some controllers recently and forgot to update the schema.

    I submitted an issue to the Smart Home repo here: https://github.com/alexa/alexa-smarthome/issues/62