Implements Alexa Video Skill
Example Youtube
Donation
If you want to buy me a beer :)
Working features
- Search and Display Examples
- This will display a list of matched Movies/TVshows
- Search and Play Examples
- Control playback Examples
- Seeking Examples
- Setting and Adjusting volume, and muting, unmuting
- Turning On/Off - “Alexa, turn On/Off
" (Device name is taken from KodiConnect page) - This is only available for devices with CEC capability, like RPi, etc. (it checks for
cec-client
binary)
- This is only available for devices with CEC capability, like RPi, etc. (it checks for
Steps to set up Kodi Alexa integration
Please follow the tutorial here
Please join Discord if you have any questions regarding setup, or in general
Discord link
Setup tutorial
- Create account on Kodi Connect page, to link your Kodi devices
- You don’t need to use email and/or password related to any Amazon service.
- Set up AWS and Amazon accounts
- These are needed to have your Lambda function and Alexa skill hosted.
- Set up Lambda and Alexa skill
- Deploy Lambda function to your AWS account (manually), and create Alexa skill (through KodiConnect automation)
- Link Kodi Device to Alexa Echo devices
Tutorial - Kodi Connect
Navigate to https://kodiconnect.kislan.sk
Click Register to move to registration page.
Enter your valid email address, and choose a password (currently it’s not possible to reset/change password).
You will also have to enter this password when linking Alexa Skill, and/or Google Assistant “Skill”.
Confirmation page will look like this, and you can close this window.
After receiving and open the confirmation email, click on the link, which will open the confirmation page.
Here just click on the link, which will take you to the Login page.
Enter email address and password which you entered on the registration page.
Choose a name for your Kodi instance. You can just enter Kodi, as this is unique to your account.
This is only relevant if you plan to use multiple Kodi instances.
A secret will be generated for your Kodi instance, which will be required for Kodi Connect Addon
Tutorial - Addon
- Download newest addon version here
- Install addon on Kodi - official instructions here
- In addon settings, enter email (one you used to register on Kodi Connect page) and secret (that was generated for your device)
- Only 1 secret per device can be used, but you can generate as many as you want
Note: If updating Addon which introduces new features, you need to relink the Kodi device in Alexa app. Just unlink the device, and go through discovery again. This is because new versions of Addon now report supported features, to ensure backward compatibility, and seamless user experience. This should be the first step, if some of the features is not working for you.
Tutorial - Amazon Developer and AWS Account
You will need to have a valid Amazon Developer, and AWS account. These are free to sign up for.
For Amazon Developer, go to their page (developer.amazon.com), and click “Sign In”. From there, you can click “Create your Amazon Developer account”.
For Amazon Web Services (AWS), go to their page (aws.amazon.com), and click “Sign Up”. It will ask you for a credit card, but do not worry - AWS includes a “free tier”. The service that kodi uses, AWS Lambda, will allow up to 1,000,000 requests, per month, free. You can read more here: AWS Lambda - Pricing.
For your own safety, you are encouraged to look at Billing, and set limits/budgets, just in case. If you use other AWS Services, they may be subject to a cost.
Tutorial - Alexa skill and Lambda function
Region Select
This step is VERY IMPORTANT.
At the top right of the screen, there is a button next to your username, but before the “Support” button. It may have the name of a region. You must click it and select the correct Lambda Function Region according to your Alexa language.
Amazon provides a list of regions and languages. Here is a copy:
Skill language | Endpoint Region | Lambda Region Name | AWS Region |
---|---|---|---|
English (US), English (CA) | North America | US East (N. Virginia) | us-east-1 |
English (UK), French (FR), German, Italian, Spanish (ES) | Europe, India | EU (Ireland) | eu-west-1 |
English (IN) | Europe, India | EU (Ireland) | eu-west-1 |
Japanese, English (AU) | Far East | US West (Oregon) | us-west-2 |
For example, I am located in Slovakia, but my Amazon Echo devices are set to “English (US)”. For this step, I would choose “US East (N. Virginia)”.
Setting up Alexa Skill - Part 1
- Open Kodi Connect page
- Log in if you’re not already
- On the Devices page, click the “Alexa skill”, which will redirect you to the Amazon website to log in (you need to use Amazon account that you have on your Echo devices).
- After signing in, you will be redirected back to Kodi Connect page, with a single button “Create skill”.
- Press it, and wait until “empty” Skill is created, and skill ID is presented.
Leave this window/tab open, as we will need to return back to it.
But copy the Skill ID, which should look something like this:
amzn1.ask.skill.2ba4b05b-3bd2-46b1-bbb5-15153ff41a48
Setting up AWS Lambda
- Click on the Services button at the top left. In the list, look for the “Compute” section, and click on “Lambda”.
- Click on the orange “Create Function” button.
- Make sure the “Author from scratch” tile is selected.
- Set the following options:
- Name - “kodi”
- Runtime -
Node.js 12.x
- Under “Permissions” section expand “Choose or create an execution role”
- Ensure that “Create a new role with basic Lambda permissions” is selected
- Click the “Create Function” button.
- In the “Designer” section, click on the “+ Add trigger” button, then pick “Alexa Smart Home” from the dropdown.
- In the “Application ID” box, paste the “Skill ID”, that you’ve copied in the previous section (e.g.
amzn1.ask.skill.2ba4b05b-3bd2-46b1-bbb5-15153ff41a48
). - Make sure “Enable Trigger” is checked. Click “Add” at the bottom right.
- Download the zip file with the Lambda function code from here
- Then in the same section, click on the name of your function (should be “kodi”).
- In the “Function code” section below, look for “Code entry type”. Click on this menu, and select “Upload a .zip file”.
- Click the “Upload” button, and select the zip file we downloaded earlier (e.g.
kodi-alexa-video-package-1.0.zip
). - Click “Save” at the top right of the page, and wait for it to load.
Copy the function ARN that is in the upper right corner, which should look something like this:
arn:aws:lambda:<region_you_picked>:<long_number>:function:kodi
Setting up Alexa Skill - part 2
- Go back to the page from “Part 1”, or if you’ve closed it, Kodi Connect - Alexa Skill page
- Here enter the Lambda function ARN, that you’ve or you can copy from the AWS page, where you’ve created it (
arn:aws:lambda:<region_you_picked>:<long_number>:function:kodi
), and press “Link Lambda” button - Give it a few seconds, and it will update the skill to be ready for use.
Tutorial - Enable Alexa skill
Navigate to https://alexa.amazon.com
Click Kodi Video under Your skills.
Click on Enable button, to start Skill account linking.
Enter your credentials for Kodi Connect.
Press Allow button, to authorize Amazon with Kodi Connect Server.
Confirmation page will open after that, which you can close, and return to previous page.
Device discovery will start automatically, which should not take more than few seconds.
After discovery, at least one Kodi instance should be visible in list. Pick one to connect it to the Echo.
Pick which Echo devices can control the Kodi instance.
This page just shows you the list of connected Kodi instances. Just click the last link, to go back to skill overview.
!!! Note: There is probably a bug in Alexa app, because after this step, there are no linked devices in the list, but if you continue to the next step, everything works as expected.
All is set up now, and you can start asking Alexa to play movies and/or tv shows on your Kodi instance.