Using a Wii Controller on Mythbuntu

My wife and I love our MythTV box (a great set of open source projects that allow you to make your own TiVo-like machine), so we just needed to have a front-end box for our treadmill.  But, we didn’t have an extra second remote control. As it turns out, with a little bit of work (and a USB Bluetooth dongle), you can control your MythTV box with a Wii controller.

We’re running Mythbuntu 7.10 (I used to be a huge Knoppmyth fan, but it hasn’t been updated in a while).  By following the directions on mythtv.org, you can get really far, except you need a few tweaks:

Finding the Wii Remote Driver — Finding WMD is difficult since the maintainer’s site has gone away.  I was able to get a copy by searching for WMD 0.1.2, and I placed a copy here (GPLv2 license).

Adding the uinput module - I had to add uinput to my /etc/modules (to test run “modprobe uinput”)

Permissions on /etc/input/uinput - I had to add the line:
  chmod 777 /dev/input/uinput
to my /etc/rc.local in order to make sure that the user running mythfrontend could access uinput

Updating wmd/Config.py to point to uinput — I needed to update the line that pointed to uinput:
  ‘UINPUT_DEV’: “/dev/input/uinput”,

Creating a .mythtv/session file - With the latest X session conventions, instead of editing a .Xsession file, you need to create a .mythtv/session file in the home directory of the user that runs mythfrontend (in my case that user is “butch”).  In my session file I have:
  /home/butch/wmd/mythtv_wiimote.sh &

So now we can start up our MythTV box, press 1 & 2 simultaneously on the Wii controller specifically assigned to it (we marked it with a rubber band), and use it as a remote control.

5 responses to “Using a Wii Controller on Mythbuntu

  1. Wow, that’s a terrific idea. We’ll try doing that ourselves and see what happens.

  2. I almost have this working. Used a slightly different approach in that i used CWIID, which is pretty simple to get working with ubuntu
    I can run wminput from the commandline a get it working with myth, I was hoping you could expand (idiot proof) your info on the session file since mine doesn’t seem to work.
    Thanks

Comments are closed.