Created
November 3, 2016 06:40
-
-
Save hcooper/ffe491986f916b0bcc635c4c11290a9f to your computer and use it in GitHub Desktop.
Remotely control roku & plex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from plexapi.server import PlexServer | |
from roku import Roku | |
PLEX_SERVER = 'http://plexserver:32400' | |
PLEX_TOKEN = '#############' | |
PLEX_CLIENT = 'Roku 3 - 4E755U058982' | |
ROKU_HOSTNAME = 'roku' | |
ROKU_PLEX_APP = 'Plex' | |
# Launch the plex roku app | |
roku = Roku(ROKU_HOSTNAME) | |
roku.launch(roku[ROKU_PLEX_APP]) | |
plex = PlexServer(PLEX_SERVER, PLEX_TOKEN) | |
movie = plex.library.section('Movies').get('Jurassic Park') | |
client = plex.client(PLEX_CLIENT) | |
client.playMedia(movie) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment