<commit_before># Alexa integration with Kodi

## Updating

If you are updating from a previous version, **it is very important that you browse to the UPGRADING.md file and look at what you need to do.**

## About

Here are some of the features supported by this skill:

- Basic navigation (Up/Down, Left/Right, Page Up/Down, Select, Back, Menu, Zoom, Rotate, Move)
- Playback control (Play/Pause, Skip, Previous, Stop, Step/Jump)
- Adjust volume
- Shuffle all music by an artist
- Play/Shuffle specific album
- Play/Shuffle the latest album by an artist
- Play a specific song
- Play/Shuffle audio and video playlists
- "Party mode" for music (shuffle all)
- Shuffle all episodes of a TV show
- Play random unwatched episode of TV show
- Play random unwatched movie
- Play random movie from a specific genre
- Play specific episode of a TV show ('Play season 4 episode 10 of The Office')
- Play specific movie
- Continue watching next episode of last show that was watched
- Play next episode of a show
- Play newest episode of a show
- Recommend media to watch/listen to
- List/Play recently added media
- List available albums by an artist
- Clean/Update video and audio sources
- "What's playing?" functionality for music, movies, and shows
- Report time remaining on current media and when it will end
- Cycle through audio and subtitle streams
- Search for something in your library
- Execute addons
- Shutdown/reboot/sleep/hibernate system
- Toggle fullscreen
- Eject media

## Initial Computer Setup
Unless you are going to host the skill on Heroku, there are a few things in the instructions that you will need to install before you can get started: 

 - **Python 2.7 (Python 3 will not work)**
 - Git

 There are numerous tutorials online about how to install these, so just Google how to install them on your OS if you are uncertain about how to proceed.

## Kodi Setup

Before a command from Alexa can be sent to your [Kodi](https://kodi.tv) box, you need to enable the "Allow remote control via HTTP", "Allow remote control from applications on this system", and "Allow remote control from applications on other systems" options in your [Kodi](https://kodi.tv) settings. Note that wording might be change a little bit on different versions, this example is for [Kodi](https://kodi.tv) 17.

![Kodi settings](http://i.imgur.com/YMqS8Qj.png)

Make sure to keep track of the port, username, and password you are using.

Now, you'll need to have your [Kodi](https://kodi.tv) box opened up to the internet via port forwarding.

If you don't have a dedicated IP address, you'll need a dynamic DNS service to give you a static URL to use so you don't have to be constantly change this value.

Repeat the above for each instance of [Kodi](https://kodi.tv) that you wish to control via the skill.  Remember you will need to open a separate, unique port on your router for each instance of [Kodi](https://kodi.tv).

Once you get that setup, you'll have to have your own server to handle the requests and pass them to your [Kodi](https://kodi.tv) box. Since this is a Python application, it has several ways that you can run it. Here are a few options to get started:<commit_msg>Show addon dependencies in README.<commit_after># Alexa integration with Kodi

## Updating

If you are updating from a previous version, **it is very important that you browse to the UPGRADING.md file and look at what you need to do.**

## About

Here are some of the features supported by this skill:

- Basic navigation (Up/Down, Left/Right, Page Up/Down, Select, Back, Menu, Zoom, Rotate, Move)
- Playback control (Play/Pause, Skip, Previous, Stop, Step/Jump)
- Adjust volume
- Shuffle all music by an artist
- Play/Shuffle specific album
- Play/Shuffle the latest album by an artist
- Play a specific song
- Play/Shuffle audio and video playlists
- "Party mode" for music (shuffle all)
- Shuffle all episodes of a TV show
- Play random unwatched episode of TV show
- Play random unwatched movie
- Play random movie from a specific genre
- Play specific episode of a TV show ('Play season 4 episode 10 of The Office')
- Play specific movie
- Continue watching next episode of last show that was watched
- Play next episode of a show
- Play newest episode of a show
- Recommend media to watch/listen to (*requires script.skin.helper.widgets addon*)
- List/Play recently added media
- List available albums by an artist
- Clean/Update video and audio sources
- "What's playing?" functionality for music, movies, and shows
- Report time remaining on current media and when it will end
- Cycle through audio and subtitle streams
- Search for something in your library (*requires script.globalsearch addon*)
- Execute addons
- Shutdown/reboot/sleep/hibernate system
- Toggle fullscreen
- Eject media

## Initial Computer Setup
Unless you are going to host the skill on Heroku, there are a few things in the instructions that you will need to install before you can get started: 

 - **Python 2.7 (Python 3 will not work)**
 - Git

 There are numerous tutorials online about how to install these, so just Google how to install them on your OS if you are uncertain about how to proceed.

## Kodi Setup

Before a command from Alexa can be sent to your [Kodi](https://kodi.tv) box, you need to enable the "Allow remote control via HTTP", "Allow remote control from applications on this system", and "Allow remote control from applications on other systems" options in your [Kodi](https://kodi.tv) settings. Note that wording might be change a little bit on different versions, this example is for [Kodi](https://kodi.tv) 17.

![Kodi settings](http://i.imgur.com/YMqS8Qj.png)

Make sure to keep track of the port, username, and password you are using.

Now, you'll need to have your [Kodi](https://kodi.tv) box opened up to the internet via port forwarding.

If you don't have a dedicated IP address, you'll need a dynamic DNS service to give you a static URL to use so you don't have to be constantly change this value.

Repeat the above for each instance of [Kodi](https://kodi.tv) that you wish to control via the skill.  Remember you will need to open a separate, unique port on your router for each instance of [Kodi](https://kodi.tv).

Once you get that setup, you'll have to have your own server to handle the requests and pass them to your [Kodi](https://kodi.tv) box. Since this is a Python application, it has several ways that you can run it. Here are a few options to get started:
{'fraction_non_alphanumeric': 0.06605816831683169, 'fraction_numerical': 0.0027846534653465345, 'mean_word_length': 4.003869969040248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4680856', 'n_tokens_mistral': 1746, 'n_tokens_neox': 1670, 'n_words': 1001}