RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
This page describes the process involved to integrate and use Alexa Video Skill Kit (VSK) with RDK4 client devices. Video Skill API are a set of APIs that enable control of video and streaming services using an Alexa device.
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.
This page will help in understanding the steps to enable the video skill in Alexa developer console, configuration of related AWS service required to process the directives & to communicate with the device using an separate channel & client end configuration requirements.
To create a video skill for the RDK device, we need to configure it through the Amazon Developer Console. 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 that handles requests from the Video Skill API and communicates with a device or video streaming service.
To enable communication between Lambda function & 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.
To configure a new video skill, you need an account on the Alexa Skills Kit (ASK) developer console. After registration is completed
amzn1.ask.skill.1a2b55555-c325-1234-d56e-1f234d5e6a78
For more information on how to use the developer console, see Manage Skills in the Developer Console.
Next, you will create a Lambda function so that you can configure the Video Skill Service endpoint.
The code for VSK is hosted as a Lambda function on AWS. AWS Lambda is a service that lets you run code in the cloud without managing servers. The Video Skill API sends your skill requests. Your code parses the request, takes any necessary actions, and responds.
You need an AWS Identity and Access Management (IAM) Role with the AWSLambdaBasicExecutionRole
policy attached. If you don't have this, complete the steps for To create an IAM role before completing the steps to create a Lambda function. If you already have a role with this policy, skip to To create a Lambda function.
Navigate to the Identity and Access Management (IAM) console.
Navigate to the AWS Lambda console.
In the upper-right corner of the console, make sure you've selected:
Choosing the correct region helps prevent latency issues.
Write or copy/paste the code in code editor. A reference implementation can be requested from amazon:
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.
lambda_function
and the lambda_handler
function is the entry point in this code.Account linking is required in order to use the video skill from any client device, please refer below section to know about account linking (Step 1 & 2 should be enough to complete the account linking process).
When your implementation is complete, and you've tested your Lambda function, you can functionally test your smart home skill.
Without configuring the distribution pat, we would not be able to enable the skill from Alexa App or from Alexa web console.
Next move to the Distribution page. The information you provide here displays with your skill in the Alexa app and is required unless noted as optional.
Select Distribution, and on the English (US) Store Preview page, specify:
Click Save and Continue
On the Privacy and Compliance page, answer the questions provided. For Testing Instructions, provide test account credentials.
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.
Below configuration needed in the RDK device end for establishing the communication between CPE and cloud.
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.
$ vi /home/root/Alexa_SDK/Integration/VSKConfig.json - Change the SQS URL that was configured in previous section
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
$ vi /home/root/.aws/credentials - Replace the values with your Access key Id & Secret.
https://developer.amazon.com/en-US/docs/alexa/video/understand-the-video-skill-api.html