Selfhosted Alexa media player skill for Jellyfin
Project description
Jellyfin Alexa Skill
Selfhosted Alexa media player skill for Jellyfin
Note: This project is still in a very early alpha phase, this means not all features are fully functional yet and features or usage can change significantly between releases. Moreover, new releases can result in data loss of the skill database. Support for playing videos is currently not fully implemented and may lead to unexpected errors.
Table of Contents
- About
- Features
- Installation
- Supported languages
- Skill speech examples
- Project plan
- FAQ
- Third party notices
- License
About
This is a self-hosting Alexa skill to play media from your Jellyfin server. Besides simple playback, other additional functions like playback of playlists or managing favorites are included. The skill and the Jellyfin player can be used behind a NAT or firewall without port opening/forwarding. Since the skill and also the Jellyfin server must be reachable from the outside, in this case the two services are exposed with a tunnel.
Features
- playback control:
- play a specific media
- play media from an artist
- pause/resume/stop/cancel a playback
- play previous/next song in queue
- repeat a single media
- repeat all media in queue
- shuffle mode
- playlist:
- play a specific playlist
- favorite:
- play favorite media
- mark current media as favorite
- remove current media from favorites
- metadata:
- show the metadata of the media (title and artist)
If you have a feature idea, use this issue template to suggest your idea for implementation.
Installation
Before you begin, make sure you meet the following requirements:
- up-to-date Jellyfin Server with public or local access
- free Amazon developer account
- python 3.6+ or docker + docker-compose installed
- optional:
- free ngrok account if you're running a local access server
The initial setup requires several steps:
- create a Alexa skill:
- go to the Amazon Developer Console webpage for Alexa and create a new skill
- now fill out the skill setup settings:
- the skill name can be custom, there are no requirements
- choose one of the supported languages of this skill for the
Primary locale
- choose
Custom
for the model type - choose
Provision your own
for the skill's backend resources - on the next page choose
Start from Scratch
- generate SMAPI tokens:
- create a new security profile for the SMAPI access
described here
to get a
CLIENT-ID
andCLIENT-SECRET
- install npm if you have not already installed it and install the ask-cli package:
npm install ask-cli -g
- now setup the ask cli:
ask configure
- use the client id and client secret from step i. to generate the refresh
token:
ask util generate-lwa-tokens --client-id <CLIENT-ID> --client-confirmation <CLIENT-SECRET>
- create a new security profile for the SMAPI access
described here
to get a
Note: The Skill id is needed for the interaction with the Alexa Skill. The SMAPI access is needed for the automatic setup of the skill.
Use this config file and adjust the values which are commented as required
in the config file. Save the
file in a safe place, because the file contains sensitive credentials. Also remember the save path, because the config
file will be used again later.
Now you are ready to perform the actual installation and startup, you have two options to use the project:
- use docker:
- you can build the image locally or use the prebuild images
on Github container registry
- if you want to build the Docker image locally, use this commands:
git clone https://github.com/infinityofspace/jellyfin_alexa_skill cd jellyfin_alexa_skill docker build -t jellyfin_alexa_skill:latest .
- if you want to build the Docker image locally, use this commands:
- start the skill:
docker run \ -v /path/to/the/skill.conf:/var/lib/jellyfin_alexa_skill/config/skill.conf \ -v /path/to/persistence/skill/data:/var/lib/jellyfin_alexa_skill/data \ ghcr.io/infinityofspace/jellyfin_alexa_skill:latest
- you can build the image locally or use the prebuild images
on Github container registry
OR
- with pip:
- install:
- from pypi:
pip3 install jellyfin_alexa_skill
- you can also install from source:
git clone https://github.com/infinityofspace/jellyfin_alexa_skill cd jellyfin_alexa_skill pip3 install .
- from pypi:
- start the skill:
jellyfin_alexa_skill --config /path/to/skill.conf --data /path/to/skill/data/
- install:
Note: The default path for the skill.conf file is /var/lib/jellyfin_alexa_skill/config/skill.conf
and for the skill
data path it is /var/lib/jellyfin_alexa_skill/data
.
Now activate a skill in your Alexa app, then you can use the skill with your Alexa enabled devices.
Supported languages
The skill has support for the following languages:
- English
- German (currently only english Alexa response)
Skill speech examples
The wiki contains examples how to interact with the skill.
Project plan
Take a look at the project plan to see what features and bug fixes are planned and in progress.
FAQ
You can find the FAQ here.
Third party notices
Module | License | Project |
---|---|---|
flask-ask-sdk | License | Project |
jellyfin-apiclient-python | License | Project |
pyngrok | License | Project |
ask-smapi-sdk | License | Project |
ask-smapi-model | License | Project |
rapidfuzz | License | Project |
peewee | License | Project |
gunicorn | License | Project |
Furthermore, this readme file contains embeddings of Shields.io.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jellyfin_alexa_skill-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bce9c6f30e8093606069cd17499f2e1486cd40deb1149e92e4c9ff8e4addf818 |
|
MD5 | e82a2c08a4e62cefb19d356a6fb10cb9 |
|
BLAKE2b-256 | 6cd4f451bf912599ae788bbaa4eff387f7b1191dd3fe2ad6e82dcd355ac2f4a5 |