'''ATTENTION:''' ''This article is a work in progress and not completed.''

+

{{Outdated2|The site linked to for the Wiimote drivers no longer exists.}}

−

----

+

This article describes how to install and configure a software to use the nintendo Wii remote to control MythTV.

−

This article describes how to install and configure a software to use the nintendo Wii remote to control MythTV.

+

There are two methods - the original method, and the new kid on the block, MythPyWii. MythPyWii is easier to set up, and has more functions (and is cooler!), but is likely to have more bugs, though it seems stable currently. Here are the [http://www.benjiegillam.com/mythpywii-installation/ MythPyWii installation instructions], and [http://www.youtube.com/watch?v=Fx8uoTlZXF0 a video of MythPyWii in action].

* First check, if the bluetooth adapter is installed correctly. Entering the following command should give you a list of all adapters.

* First check, if the bluetooth adapter is installed correctly. Entering the following command should give you a list of all adapters.

# hcitool dev

# hcitool dev

Line 21:

Line 16:

hci0 01:23:45:67:89:AB

hci0 01:23:45:67:89:AB

−

* Next scan for bluetooth devices. To activate the discover mode of the Wii remote, press buttons ''1'' and ''2'' simultaneously, then enter the following command which should give you a list of all bluetooth devices in range.

+

* Next scan for bluetooth devices. To activate the discover mode of the Wii remote, press buttons ''1'' and ''2'' simultaneously, then enter the following command, which should give you a list of all bluetooth devices in range.

# hcitool scan

# hcitool scan

Scanning ...

Scanning ...

99:88:77:66:55:44 Nintendo RVL-CNT-01

99:88:77:66:55:44 Nintendo RVL-CNT-01

−

The WiiMote is named (as you can see) ''Nintendo RVL-CNT-01''.

+

The Wii remote is named (as you can see) ''Nintendo RVL-CNT-01''.

−

==Install linux driver for Wii remote==

+

=== Install linux driver for Wii remote ===

−

Now install the [http://www.forthewiin.org/ Wii remote driver] by downloading and unpacking the newest package from [http://www.forthewiin.org/ this site], or use the subversion repository to get the bleeding edge version.

Now install the [http://www.forthewiin.org/ Wii remote driver] by downloading and unpacking the newest package from [http://www.forthewiin.org/ this site], or use the subversion repository to get the bleeding edge version. The latest code from subversion has mouse support.

The following chapters assume you installed the driver in ''~mythtv/wmd''

The following chapters assume you installed the driver in ''~mythtv/wmd''

+

==== Modify configuration file ====

Edit the configuration file ''~mythtv/wmd/wmd/Config.py''

Edit the configuration file ''~mythtv/wmd/wmd/Config.py''

Find ''MY_WIIMOTE_ADDR'' and set the address of your Wii remote which you got from the previous scan.

Find ''MY_WIIMOTE_ADDR'' and set the address of your Wii remote which you got from the previous scan.

'MY_WIIMOTE_ADDR': "99:88:77:66:55:44",

'MY_WIIMOTE_ADDR': "99:88:77:66:55:44",

−

Find ''commandMap'' and configure the buttons to suite your needs<br>

+

Find ''commandMap'' and configure the buttons to suite your needs

+

+

{{Python|~mythtv/wmd/wmd/Config.py|

<pre>

<pre>

'commandMap': {

'commandMap': {

Line 50:

Line 51:

},

},

</pre>

</pre>

+

}}

+

==== Test driver ====

To test the driver run ''~mythtv/wmd/WMD.py''. Press button ''1'' and ''2'' on your remote and wait for the driver to connect.

To test the driver run ''~mythtv/wmd/WMD.py''. Press button ''1'' and ''2'' on your remote and wait for the driver to connect.

Original Method (very manual)

Installing a bluetooth adapter

First check, if the bluetooth adapter is installed correctly. Entering the following command should give you a list of all adapters.

# hcitool dev
Devices:
hci0 01:23:45:67:89:AB

Next scan for bluetooth devices. To activate the discover mode of the Wii remote, press buttons 1 and 2 simultaneously, then enter the following command, which should give you a list of all bluetooth devices in range.

# hcitool scan
Scanning ...
99:88:77:66:55:44 Nintendo RVL-CNT-01

The Wii remote is named (as you can see) Nintendo RVL-CNT-01.

Install linux driver for Wii remote

Now install the Wii remote driver by downloading and unpacking the newest package from this site, or use the subversion repository to get the bleeding edge version. The latest code from subversion has mouse support.
The following chapters assume you installed the driver in ~mythtv/wmd

Modify configuration file

Edit the configuration file ~mythtv/wmd/wmd/Config.py
Find MY_WIIMOTE_ADDR and set the address of your Wii remote which you got from the previous scan.