Alexa app for interacting with Plex Server and Client.
Create an AWS Lambda function named alexa-plex-py
using the
alexa-skills-kit-color-expert-python
blueprint. Set the handler to
aplexa.lambda_handler
. Or use the aws
CLI:
aws lambda create-function \
--region us-east \
--function-name alexa-plex-py \
--role arn:aws:iam::account-id:role/lambda_basic_execution \
--handler aplexa.lambda_handler \
--runtime python2.7 \
--timeout 15 \
--memory-size 512
The aws
CLI will need to be configured as described in the AWS Developer Guide
For more info on setting up AWS Lambda functions see the AWS Lambda Developer Guide.
Create a new Alexa Skill using the new lambda function alexa-plex-py
,
intent-schema.json
and sample-utterances.txt
. Once created the application
id can be found for the ALEXA_APP_ID
environment variable mentioned below.
Define some environment variables to configure the app by creating a .env
file.
# Username used to log into plex.tv
PMS_USERNAME=
# Password used to log into plex.tv
PMS_PASSWORD=
# Plex server to access. This is usually the hostname of the server running PMS
PMS_SERVERNAME=
# Plex client to access. THis is usually the hostname of the server running PHT
PMS_CLIENT=
# The id of the Alexa app. Get this after creating the skill above.
ALEXA_APP_ID=
After configuring the aws
CLI, use make
the zip and push the code to AWS Lambda.
# make with no args will just create the zip
make
# This will create the zip and upload it.
make deploy
# For more options
make help