Roku Remapping Useless Channels

23 Oct 2016 03:44

Does your Roku remote have a useless Rdio button? Rdio has closed, but you cannot remap your remote buttons. Or can you?

IMG_20161022_204713.jpg

You cannot really remap the keys, but what you can do is check what channel is currently displayed on the TV and launch another one instead. Unfortunately, there's no pub/sub mechanism, so you need to poll.

Here's te whole code:

#!/bin/bash

PLAYSTATION=tvinput.hdmi3
ROKU_MEDIA_PLAYER=2213
YOUTUBE=837

while sleep 1; do
  curApp="`curl -s http://roku:8060/query/active-app | grep -o '>.*</app>'`"
  case "$curApp" in
    *VUDU*)
      curl -X POST http://roku:8060/launch/$ROKU_MEDIA_PLAYER
      ;;
    *Netflix*)
      curl -X POST http://roku:8060/launch/$YOUTUBE
      ;;
    *Rdio*)
      curl -X POST http://roku:8060/launch/$PLAYSTATION
      ;;
  esac
done

As you can see starting VUDU channel opens the Roku Media Player, starting Netflix opens YouTube, and RIP Rdio is remapped to to HDMI3, which is the HDMI port I used for my PlayStation.

To find out what IDs different channels have, just call:

curl http://roku:8060/query/apps

(Note I'm using http://roku:8060/ in this script, that's because I run a local DNS server in my local network and my Roku TV has a fixed IP that "roku" name resolves to.)

Comments: 0

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License