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?
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:
while sleep 1; do
curApp="`curl -s http://roku:8060/query/active-app | grep -o '>.*</app>'`"
case "$curApp" in
curl -X POST http://roku:8060/launch/$ROKU_MEDIA_PLAYER
curl -X POST http://roku:8060/launch/$YOUTUBE
curl -X POST http://roku:8060/launch/$PLAYSTATION
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:
(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.)