Project

roku-ecp

0.0
No commit activity in last 3 years
No release in over 3 years
A library for controlling Roku devices on your local network
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 0.16.2
 Project Readme

Roku External Control Protocol

This library is a client for the Roku ECP, which allows you to control Roku devices on your local network via http.

Roku::Discover allows you to find a Roku device on your network.

Roku::Client allows you to interact with Roku devices.

Roku::Input is a small terminal application that provides keyboard shortcuts for interacting.

Usage

Use the included bin script to get started.

$ roku

It will find your device and tell you when you're ready to interact.

Programatic Usage

If you don't want to use the included remote program, you can use the source library instead.

Find your Roku device and automatically configure the client to use it.

Roku::Client.find_device!
# => "http://192.168.0.106:8060/"

Begin interacting

Roku::Client.active_app
# => #<Struct:Roku::App:0x5611ec31c2a8
#      id = "13535"
#      name = "Plex"
#      type = "appl"
#      version = "5.3.4"

Roku::Client.keypress(:Play)
# => true

View lib/roku/client.rb for complete list of buttons presses.

Limitations / TODO

This approach only supports one device at a time. I only have one device, so I can't test a scenario where multiple devices can be found on the network.