Example #1
0
    elif(actions == "d"):
        roku.down()
    # home
    elif(actions == "h"):
        roku.home()
    # left
    elif(actions == "l"):
        roku.left()
    # right
    elif(actions == "r"):
        roku.right()
    # select
    elif(actions == "s"):
        roku.select()
    # back
    elif(actions == "b"):
        roku.back()
    # play/pause
    elif(actions == "p"):
        roku.play()
    elif(actions == "netflix"):
        netflix.launch()
    elif(actions == "plex"):
        plex.launch()
    elif(actions == "primevideo"):
        primevideo.launch()
    else:
        print("...")
    if actions.strip() == 'exit':
        break
Example #2
0
from roku import Roku
rokuls = Roku.discover(timeout=10);
print(rokuls);
ip =  input('IP: ');
roku = Roku(ip);

while True:
	remoteinput = input('Remote Input (i.e. down, up, left, right, back, home, ok): ');

	if remoteinput == 'down':
		roku.down();
	elif remoteinput == 'up':
		roku.up();
	elif remoteinput == 'left':
		roku.left();
	elif remoteinput == 'right':
		roku.right();
	elif remoteinput == 'back':
		roku.back();
	elif remoteinput == 'home':
		roku.home();
	elif remoteinput == 'ok':
		roku.select();
	else:
		print('Not a valid command.');