Skip to content

wizardishungry/roku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roku

Documentation

Roku ECP library written in Go

Inspired by https://github.com/ncmiller/roku-cli

The project started out aiming to essentially be a GoLang fork of roku-cli, adding in the options of VolumeUp and VolumeDown buttons.

It is now turning into a Roku ECP library, with accompanying CLI Roku Remote

Library

Installation

go get -u jonwillia.ms/roku

or use go mod

Example

package main

import (
  "jonwillia.ms/roku"
)

func main() {
  devices, err := roku.FindRokuDevices()
  if err != nil {
    panic(err)
  }
  r, err := roku.NewRemote(devices[0].Addr)
  if err != nil {
    panic(err)
  }
  err = r.VolumeUp()
  if err != nil {
    panic(err)
  }
  if r.Device.PowerMode == "PowerOn" {
    // ignoring errors for brevity
    r.PowerOff()
    r.Refresh()
  }
}

CLI

Installation

go get -u jonwillia.ms/roku

Usage

roku -ip 192.168.1.51

You can also simply run

roku

and it will search for Roku devices on the network (takes an extra 3 seconds).

About

Roku ECP library written in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%