Ubuntu: Getting Streamzap PC Remote Control working with Ubuntu and Boxee

We periodically watch videos from the internet on our TV.  I found a cool piece of software that is getting a lot of attention – Boxee.  It’s pretty slick, though not without it’s bugs (it is beta software and free, though, so I can’t complain).  In the spirit of true American laziness, once I realized Boxee would work on our computer connected to our TV I decided I wanted to try a remote to control Boxee.  I found a remote that says it works with Linux – the Streamzap PC Remote.  I ordered it from Amazon.com and once it arrived I faced the next issue: getting it to work with Linux.

The Streamzap ships with software for Windows, but no software for Linux.  Like most of Linux, support for the hardware is mostly built in or provided via open-source software packages. It isn’t the easiest thing in the world to set it up, so I’ve documented here how to do it so I have a future reference and for others (based on these instructions).

First, install the “lirc” package using the Synaptic Package Manager (or “sudo apt-get install lirc” in the terminal).

lirc - 01

Once the install is complete, a window will pop up asking for the remote and some additional information.  Fill everything out, selecting the Streamzap PC Remote.

Once the install is complete, you can test to see if the remote is working by plugging it into a USB port, starting a terminal, and typing the following at the prompt:

irw

If the remote is working, when you push a button you should see an indicator in the terminal that the button was pushed.  If you see indicators, LIRC is communicating with your remote and your remote is communicating with your computer, like this:

lirc - 02

Now, you need to tell LIRC which buttons should do what in which programs.  You can use a program to help generate the requisite scripts.  Install “mythbuntu-lirc-generator” from the Synaptic Package Manager (or “sudo apt-get install mythbuntu-lirc-generator” in the terminal).

Once installed, type “mythbuntu-lirc-generator” in the terminal and it will generate LIRC files for several programs.  It puts a “.lircrc” file in “/home/USER/”.  That file indicates that the generated scripts are installed in “/home/USER/.lirc”, which is a hidden folder in your user folder.  Here’s what the files says:

#Custom lircrc generated via mythbuntu-lirc-generator
#All application specific lircrc files are within ~/.lirc
include ~/.lirc/mythtv
include ~/.lirc/mplayer
include ~/.lirc/xine
include ~/.lirc/vlc
include ~/.lirc/xmame
include ~/.lirc/xmess
include ~/.lirc/totem
include ~/.lirc/elisa

You can modify these for the Streamzap Remote Control.  I modified one, totem, to give it added functionality.  My version is included in the zip file linked to below.

If you want to use the remote in Boxee, you have to install Boxee, then find the Boxee remote file in “/home/USER/.boxee/UserData”.  The file is called “Lircmap.xml”.  You need to add the following to the file:

<remote device=”Streamzap_PC_Remote”>
<pause>PAUSE</pause>
<stop>STOP</stop>
<forward>&gt;&gt;</forward>
<reverse>&lt;&lt;</reverse>
<left>LEFT</left>
<right>RIGHT</right>
<up>UP</up>
<down>DOWN</down>
<select>OK</select>
<pageplus>CH_UP</pageplus>
<pageminus>CH_DOWN</pageminus>
<back>EXIT</back>
<menu>MENU</menu>
<title>PLAY</title>
<info>More</info>
<skipplus>&gt;&gt;|</skipplus>
<skipminus>|&lt;&lt;</skipminus>
<display>Teletext</display>
<start>Home</start>
<record>RECORD</record>
<volumeplus>VOL_UP</volumeplus>
<volumeminus>VOL_DOWN</volumeminus>
<mute>MUTE</mute>
<power>POWER</power>
<myvideo>Videos</myvideo>
<mymusic>Music</mymusic>
<mypictures>Pictures</mypictures>
<mytv>TV</mytv>
<one>1</one>
<two>2</two>
<three>3</three>
<four>4</four>
<five>5</five>
<six>6</six>
<seven>7</seven>
<eight>8</eight>
<nine>9</nine>
<zero>0</zero>
<mytv>RED</mytv>
<mymusic>GREEN</mymusic>
<mypictures>YELLOW</mypictures>
<myvideo>BLUE</myvideo>
</remote>

If you want to just use my files, here they are.

<lircmap>
<remote device=”Streamzap_PC_Remote”>
<pause>PAUSE</pause>
<stop>STOP</stop>
<forward>&gt;&gt;</forward>
<reverse>&lt;&lt;</reverse>
<left>LEFT</left>
<right>RIGHT</right>
<up>UP</up>
<down>DOWN</down>
<select>OK</select>
<pageplus>CH_UP</pageplus>
<pageminus>CH_DOWN</pageminus>
<back>EXIT</back>
<menu>MENU</menu>
<title>PLAY</title>
<info>More</info>
<skipplus>&gt;&gt;|</skipplus>
<skipminus>|&lt;&lt;</skipminus>
<display>Teletext</display>
<start>Home</start>
<record>RECORD</record>
<volumeplus>VOL_UP</volumeplus>
<volumeminus>VOL_DOWN</volumeminus>
<mute>MUTE</mute>
<power>POWER</power>
<myvideo>Videos</myvideo>
<mymusic>Music</mymusic>
<mypictures>Pictures</mypictures>
<mytv>TV</mytv>
<one>1</one>
<two>2</two>
<three>3</three>
<four>4</four>
<five>5</five>
<six>6</six>
<seven>7</seven>
<eight>8</eight>
<nine>9</nine>
<zero>0</zero>
<mytv>RED</mytv>
<mymusic>GREEN</mymusic>
<mypictures>YELLOW</mypictures>
<myvideo>BLUE</myvideo>
</remote>

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.