Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send capabilities to Alexa Skill using SMAPI Connector #312

Closed
StoutyAlex opened this issue Jun 13, 2019 · 6 comments
Closed

Send capabilities to Alexa Skill using SMAPI Connector #312

StoutyAlex opened this issue Jun 13, 2019 · 6 comments
Assignees

Comments

@StoutyAlex
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
We are trying to inspect the audioPlayer from our Alexa skill using invocation through the SMAPI. When we send an intent that returns an audioPlayer response we expect it to return the response with the audio asset url. However we get this response:

 "outputSpeech": {
      "type": "SSML",
      "ssml": "<speak>Hm, I'm sorry but I can't do that on this device.</speak>"
    }

We believe this is because the basic capabilities have not been defined in the request to the skill using the invocation-request-template.json.

Describe the solution you'd like
The ability to define the capabilities within the JSON config or the convo.txt context so we can send the capabilities to the alexa skill. So we can go from sending this request without the capabilities:

  "version": "1.0",
  "session": {
    "new": false,
    "sessionId": "97d4d9d0-8dca-11e9-a036-e15e61ac4dae",
    "application": {
      "applicationId": "amzn1.ask.skill.ccc19cb0-0ffd-4425-bfc0-594d44e8beda"
    },
    "attributes": {},
    "user": {
      "userId": "botium-core-test-user"
    }
  },
  "context": {
    "AudioPlayer": {
      "playerActivity": "IDLE"
    },
    "Display": {
      "token": ""
    },
    "System": {
      "application": {
        "applicationId": "amzn1.ask.skill.ccc19cb0-0ffd-4425-bfc0-594d44e8beda"
      },
      "user": {
        "userId": "botium-core-test-user"
      }
    }
  },
  "request": {
    "type": "IntentRequest",
    "requestId": "98529550-8dca-11e9-a036-e15e61ac4dae",
    "timestamp": "2019-06-13T11:01:28.997Z",
    "locale": "en-GB",
    "intent": {
      "name": "NewsIntent",
      "confirmationStatus": "NONE",
      "slots": {}
    }
  }
}

to this request with the capabilities:

{
  "version": "1.0",
  "session": {
    "new": false,
    "sessionId": "97d4d9d0-8dca-11e9-a036-e15e61ac4dae",
    "application": {
      "applicationId": "amzn1.ask.skill.ccc19cb0-0ffd-4425-bfc0-594d44e8beda"
    },
    "attributes": {},
    "user": {
      "userId": "botium-core-test-user"
    }
  },
  "context": {
    "AudioPlayer": {
      "playerActivity": "IDLE"
    },
    "Display": {
      "token": ""
    },
    "System": {
      "application": {
        "applicationId": "amzn1.ask.skill.ccc19cb0-0ffd-4425-bfc0-594d44e8beda"
      },
      "user": {
        "userId": "botium-core-test-user"
      },
      "device": {
        "deviceId": "amzn1.ask.device.AFRXExxx",
        "supportedInterfaces": {
          "AudioPlayer": {},
          "Display": {
            "templateVersion": "1.0",
            "markupVersion": "1.0"
          },
          "Alexa.Presentation.APL": {
            "runtime": {
              "maxVersion": "1.0"
            }
          }
        }
    }
  },
  "request": {
    "type": "IntentRequest",
    "requestId": "98529550-8dca-11e9-a036-e15e61ac4dae",
    "timestamp": "2019-06-13T11:01:28.997Z",
    "locale": "en-GB",
    "intent": {
      "name": "NewsIntent",
      "confirmationStatus": "NONE",
      "slots": {}
    }
  }
}

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
We have considered just hitting the SMAPI directly with these intents to see what we get but doesn't work well and means not using botium at all which is not prefered.

@codeforequity-at
Copy link
Owner

thanks for the good feature description. I added it to our internal backlog (BOT-657) and to the next sprint (as we consider this to be an important feature).

@codeforequity-at
Copy link
Owner

@StoutyAlex I noticed that you already did plenty of work in your connector fork (https://github.com/bbc/botium-connector-alexa-smapi) - do you think I could just merge your fork in the main connector branch ?

@StoutyAlex
Copy link
Author

Yea sure I will tidy it up and do some testing today and try get that done before the end of the day

@StoutyAlex
Copy link
Author

Do you have a Slack/Message group I can join to discuss the best way of implementing what I have done In the fork into the main repo?

@codeforequity-at
Copy link
Owner

Up to now we were using Github only for these kind of discussions (Pull Request => Review => Questions/Answers). But maybe it's time to create a Slack message group for this ... I will talk to the team.

@codeforequity-at
Copy link
Owner

It is available in the latest Botium builds now (including Botium CLI and Botium Box)

@StoutyAlex We have a discord channel for Botium developer now - pls contact us at our website for receiving an invitation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants