# Wiimote Control for RasPlex - AddOn (v0.5)

**URL:** <https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097>\
**Category:** Apps & Creations\
**Created:** [November 14, 2016, 5:02pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097 "2016-11-14T17:02:51Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![videotecaCNSU](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/videotecacnsu/32/17514_2.png) [@videotecaCNSU](https://forums.plex.tv/u/videotecaCNSU)\
**Post date:** [November 14, 2016, 5:02pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/1 "2016-11-14T17:02:51Z")

</div>

_0.4 tested on build 1.6.2.123_  
_0.5 tested on build 1.7.1.137_

I created a small daemon that uses some dependencies from cwiid so you can use any wiimote as a remote controller for your RasPlex.

# To install

Extract the content inside “/.plexht/addons/packages/” so you get a wiimote folder

if you dont know how to uncompress in linux its  
`tar xf wiimote.0.4.tar.gz`

Edit or create autostart.sh (default location at “/.config”) with  
`#!/bin/sh`  
`(`  
`PATH="${PATH}:/storage/.plexht/addons/packages/wiimote/bin:/storage/.plexht/addons/packages/wiimote/lib";`  
`export PATH;`  
`PYTHONPATH="${PYTHONPATH}:/storage/.plexht/addons/packages/wiimote/lib";`  
`export PYTHONPATH;`  
`LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/storage/.plexht/addons/packages/wiimote/lib";`  
`export LD_LIBRARY_PATH;`  
`sleep 10s;`  
`python ~/.plexht/addons/packages/wiimote/bin/wiimote.py`  
`) &`

Enable BlueTooth from Services

and reboot

# Features

- The daemon will wait till you press 1+2 on a wiimote and connect
- Press power button on the wiimote to disconnect the wiimote
- daemon will wait for a new pairing if a connection its lost
- Wiimotes vibrates to indicate that the connection has been established
- LED 1 of the wiimote its kept on during the operation
- Displays a one time warning message if battery level its below 20%

#Buttons  
For now all buttons are mapped in this way

- Use the Dpad to navigate on vertical mode
- A = Enter/Ok
- B = Escape/Back
- Home = Returns to the main menu
- Minus = Rewind
- Plus = Fast foward
- 1 = Change subtitle
- 2 = Change audio track

---

<div class="post-metadata">

**Author:** ![bhorocks](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@bhorocks](https://forums.plex.tv/u/bhorocks)\
**Post date:** [November 29, 2016, 2:54am UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/2 "2016-11-29T02:54:29Z")

</div>

being newer to the rasplex I found this and would love to get it working. I have extracted the ffiles and placed them all in the correct location and configured the startup.sh script but it doest pair for me.

is the cwiid another plugin necessary for the pairing to work? I am using a pi3 FYI with a default rasplex installation.

---

<div class="post-metadata">

**Author:** ![bhorocks](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@bhorocks](https://forums.plex.tv/u/bhorocks)\
**Post date:** [November 29, 2016, 3:12am UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/3 "2016-11-29T03:12:34Z")

</div>

> @bhorocks said:  
> being newer to the rasplex I found this and would love to get it working. I have extracted the ffiles and placed them all in the correct location and configured the startup.sh script but it doest pair for me.
> 
> is the cwiid another plugin necessary for the pairing to work? I am using a pi3 FYI with a default rasplex installation.

Okk, got it figured out… Works great so far!  
thanks!

---

<div class="post-metadata">

**Author:** ![videotecaCNSU](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/videotecacnsu/32/17514_2.png) [@videotecaCNSU](https://forums.plex.tv/u/videotecaCNSU)\
**Post date:** [November 29, 2016, 1:19pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/4 "2016-11-29T13:19:48Z")

</div>

Because some limitations on the implementation of CWIID you need to pair the wiimote each time you want to use it and the power button will just turn off the wiimote (if you want to save battery)

For pairing you need to press 1+2 or the red sync button on the back on some later motion plus models

good to know its working for you, there is a lot of room for improvement but it works so far and it isn’t heavy on resources

---

<div class="post-metadata">

**Author:** ![Brandon4466](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/brandon4466/32/160340_2.png) [@Brandon4466](https://forums.plex.tv/u/Brandon4466)\
**Post date:** [December 8, 2016, 10:30pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/5 "2016-12-08T22:30:44Z")

</div>

This works without any extra hardware?

How? I’m actually interested because I thought the Wiimote used some kind of proprietary tech other than Bluetooth.

---

<div class="post-metadata">

**Author:** ![videotecaCNSU](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/videotecacnsu/32/17514_2.png) [@videotecaCNSU](https://forums.plex.tv/u/videotecaCNSU)\
**Post date:** [December 12, 2016, 1:42pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/6 "2016-12-12T13:42:51Z")

</div>

> @Brandon4466 said:  
> This works without any extra hardware?
> 
> How? I’m actually interested because I thought the Wiimote used some kind of proprietary tech other than Bluetooth.

Yes

It uses Bluetooth and a proprietary interface that has been reverse engineered a long time ago. In this case Im just implementing the [CWiiD library](https://help.ubuntu.com/community/CWiiD "CWiiD library") for python but there are others. You can find [a lot of documentation](http://wiibrew.org/wiki/Wiimote "a lot of documentation") about it.

The only thing new its that now with build in bluetooth on the pie we can use all the sensors of the wiimote for interacting with IoT devices. Plus they are dirty cheap

What hasn’t been discovered is the shutdown button commands are passed, so all the implementations that you will find doesn’t work with that button. So it isn´t possible to shutdown rasplex with that, but its always possible to assign some button combination for that.

Anyway, look on youtube for “wiimote hacks” for some cool ideas

---

<div class="post-metadata">

**Author:** ![Brandon4466](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/brandon4466/32/160340_2.png) [@Brandon4466](https://forums.plex.tv/u/Brandon4466)\
**Post date:** [December 24, 2016, 2:27am UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/7 "2016-12-24T02:27:15Z")

</div>

Hey, just got a Raspberry Pi 3 and loaded RasPlex on it! I installed your addon, however I cannot get the Wiimote paired, the four lights just continue to blink… is there a more step-by-step tutorial you can provide?

Thanks!

---

<div class="post-metadata">

**Author:** ![Brandon4466](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/brandon4466/32/160340_2.png) [@Brandon4466](https://forums.plex.tv/u/Brandon4466)\
**Post date:** [December 24, 2016, 2:52am UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/8 "2016-12-24T02:52:30Z")

</div>

So I managed to get it paired, but it seems that the daemon is like only half working. I can use the arrow keys to navigate but that’s it. A, B, 1, 2, Home, and Power all don’t work. Am I supposed to pair it a specific way?

Also autostart.sh doesn’t run on boot, I have to many start it…

---

<div class="post-metadata">

**Author:** ![videotecaCNSU](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/videotecacnsu/32/17514_2.png) [@videotecaCNSU](https://forums.plex.tv/u/videotecaCNSU)\
**Post date:** [December 24, 2016, 7:39am UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/9 "2016-12-24T07:39:44Z")

</div>

I get what you are saying, you are currently not running the daemon. If you pair a wiimote as a normal bluetooth joystick you will notice that only the crosshair works with the GUI. Thats why I made the daemon.

If the Daemon its working you should get a pop up message on rasplex asking you to press 1+2 to connect your wiimote. You can do this at any time and it should always connect to the Pi as long as Bluetooth its enable.

To test the autostart.sh file make it executable with chmod +x and run it over ssh. If something its pointing to a wrong directory it will tell you, but its very important to set the correct paths for the script to run.

Just remember  
autostart.sh goes in ~/.config  
and the uncompressed plugin should go in ~/.plexht/addons/packages/ with the bin and lib files inside the “wiimote” folder (I noticed that the forum changes the name of the file)

Also have in mind I haven’t tested yet on 1.7.1, I might have a specific version for it on monday as I know it has been some changes that could prevent commands to be passed to the GUI.

---

<div class="post-metadata">

**Author:** ![videotecaCNSU](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/videotecacnsu/32/17514_2.png) [@videotecaCNSU](https://forums.plex.tv/u/videotecaCNSU)\
**Post date:** [December 27, 2016, 4:27pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/10 "2016-12-27T16:27:16Z")

</div>

ok if you are running it on 1.7.1

edit ~/.plexht/addons/packages/wiimote/bin/wiimote.py  
go to like 35 where it reads

`port = 9778`

change it to

`port = 9777`

and it should work

Also, make sure to have bluetooth enabled or it will silently fail  
You will know that the plugin its running if you get this pop up message when you start rasplex  
 ![](https://global.discourse-cdn.com/plex/original/3X/e/4/e4b38ce050cdb3c870f71cf2d2470a66bc3887b7.jpg)

I will update now my original post and upload a corrected version if you just wish to make a clean install

---

<div class="post-metadata">

**Author:** ![prometheus247](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@prometheus247](https://forums.plex.tv/u/prometheus247)\
**Post date:** [January 5, 2017, 8:21pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/11 "2017-01-05T20:21:11Z")

</div>

Hi,

what a nice plugin. Im looking for a way to use my xbox 360 controller and was wondering, if it was possible to use it with this fancy plugin. Of course, changes and tweaks for matching the xbox keymap would be needed.

Is this something worth thinking about?

---

<div class="post-metadata">

**Author:** ![videotecaCNSU](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/videotecacnsu/32/17514_2.png) [@videotecaCNSU](https://forums.plex.tv/u/videotecaCNSU)\
**Post date:** [January 5, 2017, 9:14pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/12 "2017-01-05T21:14:09Z")

</div>

> @prometheus247 said:  
> Hi,
> 
> what a nice plugin. Im looking for a way to use my xbox 360 controller and was wondering, if it was possible to use it with this fancy plugin. Of course, changes and tweaks for matching the xbox keymap would be needed.
> 
> Is this something worth thinking about?

Mmmm… its not really possible to make it compatible

You would need an xbox wireless receiver as it doesn´t use standard bluetooth communication as the Wii or PS3 and the driver implementation would be different.

sorry, I don´t have one to test it but I think its already implemented at some level

In fact some people used [my same approach](http://blog.lms-dev.com/raspberry/openelec-on-raspberry-with-an-xbox-360-controller/ "my same approach")

---

<div class="post-metadata">

**Author:** ![umi](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/umi/32/110669_2.png) [@umi](https://forums.plex.tv/u/umi)\
**Post date:** [December 15, 2018, 6:22am UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/13 "2018-12-15T06:22:47Z")

</div>

How to get wiimote.0.4.tar.gz?

---

<div class="post-metadata">

**Author:** ![videotecaCNSU](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/videotecacnsu/32/17514_2.png) [@videotecaCNSU](https://forums.plex.tv/u/videotecaCNSU)\
**Post date:** [December 16, 2018, 11:19pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/14 "2018-12-16T23:19:48Z")

</div>

I will upload it again tomorrow  
the original files were lost on the change of forum

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 7:27pm UTC](https://forums.plex.tv/t/wiimote-control-for-rasplex-addon-v0-5/167097/15 "2020-01-08T19:27:22Z")

</div>


