Jason Palmeri
Jason Palmeri

Reputation: 11

Amazon Alexa Music Routine

I just picked up an Amazon Echo Dot for christmas, and I wanted to be able to start a routine on christmas morning, where it would play christmas music and turn on the lights, currently you can only make routines in the app like turn on smart home devices, say the weather and stuff like that, but it wont let you play music, or a playlist. Im not much of a coder, but i looked into the amazon developer site that lets you create skills for the echo dot, and i just cant figure out how to make this work. heres the code I have so far

    {
  "intents": [
    {
      "intent": "AMAZON.HelpIntent"
    },
    {
      "intent": "AMAZON.StopIntent"
    },
    {
      "intent": "AMAZON.PauseIntent"
    },
    {
      "intent": "AMAZON.ResumeIntent"
    },
    {
      "intent": "Start",
      "slots": [
        {
          "name": "Play",
          "type": "AudioPlayer.Play",
          "audioItem":{
            "stream": {
              "url": "https://music.amazon.com/albums/B002R4OU2Q?do=play&ref=dm_ws_dp_ald_bb_phfa_xx_xx",
              "token": "string",
              "expectedPreviousToken": "string",
              "offsetInMilliseconds": 0
            }
          }
        }
      ]
    },
    {
      "intent": "Christmas"
    },
    {
      "intent": "Begin"
    }
  ]
}

basically, I say Start Christmas Morning, the playlist plays, and the lights turn on. whenever I try to save this I get this Error: There was a problem with your request: Unknown slot type 'AudioPlayer.Play' for slot 'Play' but audioplayer.play does exist right here https://developer.amazon.com/docs/custom-skills/audioplayer-interface-reference.html#config

anyone know how to get this to work? or if there is an easier way for what im trying to do?

Upvotes: 1

Views: 1876

Answers (1)

Ron S
Ron S

Reputation: 11

I'm not a programmer at all, but it appears you're missing one line. Go back to example you used and look for

"shouldEndSession": true

Without using this it appears that the echo will just wait for user response without playing anything.

Upvotes: 1

Related Questions