Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Info

This page is work under progress

Overview

This page describes the process involved to integrate and use Alexa Video Skill Kit (VSK) with RDK4 client devices (thunder plugin based implementation). The Video Skill API is are a set of APIs that enable control of video devices and streaming services using an Alexa device. With

With the Video Skill API, you can build skills that let customers control their entire video experience by voice. Customers can control video devices and consume video content without invoking a specific skill.

...

To create a video skill for the RDK device, we need to configure it through the Amazon Developer Console. After you've created the skill, you provide skill information, configuration and We need to provide the skill information from developer account & the skill code hosted as an AWS Lambda function.

AWS Lambda is an Amazon Web Service offering that  that handles requests from the Video Skill API and communicates with a device or video streaming service.

To enable communication from your between Lambda function to your & client device, the cloud or service should support the OAuth 2.0 authorization code grant type. You will need information about the authentication endpoint, client ID, and client secret to complete the video skill registration.

...

  1. In the upper-right corner of the console, make sure you've selected:

    • N.Virginia for English (US) skills.
    • EU (Ireland) for English (UK) or German skills.

    Choosing the correct region helps prevent latency issues.

  2. Choose Create function.
  3. Choose Author from scratch.
  4. For Basic information:
    1. Type a name for your function.
    2. For Runtime, choose NodeJS.
    3. For Existing role, chose the role that you created in the previous procedure.
    4. Choose Create function.
  5. On the Configuration page, under Designer, choose Alexa Smart Home.
  6. Under Configure triggers, in the Application ID box, paste your skill ID.
  7. Choose Add, Save.
  8. Navigate back to the AWS Lambda console list of functions.
  9. Choose the function that you just created.
  10. Scroll down to the Function code section.
  11. Write or copy/paste the code in code editor. A reference implementation can be requested to from amazon from below:


    For more information on using the reference implementation jump to the AWS Service configuration section

    This code provides a basic implementation involving single device, it supports device discovery & handling different directives coming from Alexa

    After the modifications are done, choose Save.

  12. Above the code editor, for Handler, leave the default name lambda_function.lambda_handler. A function handler is the main entry point for a Lambda function, and you specify it with the format fileName.entryPointFunctionName. For this example, the file name is lambda_function and the lambda_handler function is the entry point in this code.
  13. At the top of the page, copy the ARN for your Lambda function. You will use this value to finish configuring the video skill in the Alexa Skills Kit developer console. The ARN should be similar to the following: arn:aws:lambda:us-east-1:123456789012:function:myVideoFunction.

...

  • Click Save and Continue
  • On the Availability page, check whether your skill is public, or for use by Alexa for Business Organizations.
  • Select the countries and regions you would like to distribute your skill
  • Click Save and Continue

Anchor
AWS-service-configuration
AWS-service-configuration
Necessary AWS services for demo implementation

A reference code can be availed on request from Alexa Vimeo Demo code

The example using SQS (simple queue service) for communication between CPE and lambda service. AWS modules configuration gives brief overview on how to create and use SQS queues.


Client side configuration

Below configuration needed in the RDK device end for establishing the communication between CPE and cloud.

Configure the SQS service

Communication between lambda and CPE device is handled through SQS with current implementation, same SQS URL need to be configured in lambda as well as in the RDK client device.

Code Block
$ vi /home/root/Alexa_SDK/Integration/VSKConfig.json
- Change the SQS URL that was configured in previous section

Configure AWS credentials

In order to use the AWS services, the access & secret should be configured from the client side. Current implementation is done by keeping the credentials from a well known location

Code Block
$ vi /home/root/.aws/credentials
- Replace the values with your Access key Id & Secret.


References

https://developer.amazon.com/en-US/docs/alexa/video/understand-the-video-skill-api.html

...