• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 12
Solved Connect Xiaomi Mi Box BT remotes to LibreELEC devices
(2018-01-09, 09:18)Atreyu Wrote: had my first ‘plug&play’ experience with this ;-)

Installed kszaq’s latest 8.x release on am new box, paired the remote and waited a couple of seconds. Done.

Nice to not have to drag some files over anymore. Thanks for your work on this wrxtasy! I just wanted to play around with this remote, but it’s responsiveness made it a keeper :-)
Your welcome.

Yes I agree it's responsiveness is excellent, especially the repeat button and repeat delays are spot on for doing things like scrolling through long file lists. No more stabbing repeatedly at a remote button to scroll thru anything quickly.

Makes LE a joy to use. Smile

Reply
(2017-09-12, 11:16)wrxtasy Wrote: How to Set it all up:

1) Kodi Settings > LibreELEC > Services > Bluetooth > Enable

2) Kodi Settings > LibreELEC > Bluetooth > Xiaomi Remote > Trust and Connect

3) Then simply copy and paste this:
Code:
curl -sL http://wrxtasy.libreelec.tv/LE-Xiaomi/xbt.sh | bash -
4) You can check connected devices (USA Spec remote here) with:
Code:
cat /proc/bus/input/devices
6) Want to further custom remap remote buttons for particular individual areas of Kodi use ?

Kodi Settings > Addons > Install from Repository > Programs > Keymap Editor

Two suggested remote buttons that definitely need remapping to increase Kodi functionality:
KeyMap Editor:

Fullscreen Video > Playback > Stop > press Xiaomi remote Back button
Fullscreen Live TV > Playback > Stop > press Xiaomi remote Back button
Global > Navigation > Context Menu > press Xiaomi remote Context (hamburger) button

 
I have done this, on a MeCool M8S Pro L and LE, but

1.) after the reboot the connection to the remote is lost even though the remote shows up under "Bluetooth" but with a "No" unter "Connected".

I have done a "Delete" followed by a "Trust and Connect" only then and ran the curl command.

2.) After that LE doesnt work with no remote anymore. Even a Logitech K400 with an USB dongle doesnt work anymore. The LE iself does work...i can still send Youtube Links to LE and they are played (like before) and Twitch still shows when a new channel goes live...so the LE is not dead or something like that.

Any idea what i can do now? ...besides reinstalling LE and start from scratch...
Reply
(2017-10-28, 12:07)wrxtasy Wrote: Had an aftermarket Xiaomi Remote arrive from Aliexpress after over a month in the post from Zurich, Switzerland.

It is the one with the AAA batteries and the Silicon Skin. High quality remote and the silicon skin works surprisingly well and fits snugly so the remote does not get lost down the side of the couch.

Works out of the box with my recent LibreELEC mods. Only had to remap the Context button with Kodi's Keymap Addon.
Time to play around with @zang's keymaps. Smile

LibreELEC 8.2 has now been released that includes inbuilt support for Xiaomi BT remotes for all LibreELEC hardware platforms

Basically turn BT on in LE settings, then Trust and Connect. No need for scripts or curl commands.

Reply
(2018-01-13, 13:50)wrxtasy Wrote:
(2017-10-28, 12:07)wrxtasy Wrote: Had an aftermarket Xiaomi Remote arrive from Aliexpress after over a month in the post from Zurich, Switzerland.

It is the one with the AAA batteries and the Silicon Skin. High quality remote and the silicon skin works surprisingly well and fits snugly so the remote does not get lost down the side of the couch.

Works out of the box with my recent LibreELEC mods. Only had to remap the Context button with Kodi's Keymap Addon.
Time to play around with @zang's keymaps. Smile

LibreELEC 8.2 has now been released that includes inbuilt support for Xiaomi BT remotes for all LibreELEC hardware platforms

Basically turn BT on in LE settings, then Trust and Connect. No need for scripts or curl commands. 
 ok, thank you. It works as long i dont reboot. After the reboot every settings seems to be lost and i have to "Trust and Connect" again. Wasnt it supposed to work after then too? After reboot i pressed a button and waited for like 3 minutes...nothing. When i look under Bluetooth in the settings, no devices are listed there. It is LE running on a M8S Pro L.
Reply
I had the same issues when I was running le from an SD card, I installed to internal wipe android firmware from my x96 pro plus and now both Hdmi cec and bluetooth (Mi remote) work flawlessly.
Reply
(2018-01-14, 20:08)veloglou Wrote: I had the same issues when I was running le from an SD card, I installed to internal wipe android firmware from my x96 pro plus and now both Hdmi cec and bluetooth (Mi remote) work flawlessly.
 I am running it from SD card as well, but running it from internal is not an option for me. I dont believe that everyone with LE 8.2.2.3 and LE on a SD card has the same problem with a bluetooth remote, but perhaps i will try my luck in the LE forum, because i think that it is more a LE problem then a Kodi specific one.
Reply
(2018-01-14, 20:08)veloglou Wrote: I had the same issues when I was running le from an SD card, I installed to internal wipe android firmware

fyi i tried it now and it didnt help. I reinstalled LE and started from scratch (without backup) and now it works. The only thing that bothers are the 30-40 seconds after the box has booted that the Mi remote works. Interessting to see that under the bluetooth devices the Mi remote has two entries but afaik this is meant to be. Just to be sure i tried it with another device and there are the double entries as well...so it works like intended...i guess.
Reply
(2018-01-22, 13:20)blindhai Wrote:
(2018-01-14, 20:08)veloglou Wrote: I had the same issues when I was running le from an SD card, I installed to internal wipe android firmware

fyi i tried it now and it didnt help. I reinstalled LE and started from scratch (without backup) and now it works. The only thing that bothers are the 30-40 seconds after the box has booted that the Mi remote works. Interessting to see that under the bluetooth devices the Mi remote has two entries but afaik this is meant to be. Just to be sure i tried it with another device and there are the double entries as well...so it works like intended...i guess.

I know the Bluetooth stack in LE isn’t as fleshed out as it could be. I get double entries the odd time as well, often when the remote has disconnected and is having troubles reconnecting. My first thought is that some BT software component is crashing and on re-lists everything when it starts back up.

Though this remote works, it’s not 100% stable and at least once a day needs the 30-40 seconds to reconnect. I’m pretty sure Bluetooth shouldn’t need this long to connect.
Reply
Hi, I have some problems with my custom Actions. I have created a file called remote.xml and placed it here: \Userdata\keymaps.
My remote.xml looks like this:
<keymap>
<global>
<remote>
<mute>ShutDown()</mute>
<previousmenu>Stop</previousmenu>
</remote>
</global>
<FullscreenVideo>
<remote>
<select>PlayPause</select>
<stop>AudioNextLanguage</stop>
<leftctrl>NextSubtitle</leftctrl>
<volumedown>ShowSubtitles</volumedown>
</remote>
</FullscreenVideo>
</keymap>

All Actions work, excluding Stop, NextSubtitle and ShowSubtitle. I don't understand why they are not working. I have also tried volumeup instead of leftctrl, but it doesn't change anything. My log:
22:27:16.307 T:1945542656   DEBUG: LIRC: Update - NEW at 215972:73 0 KEY_VOLUMEUP devinput (KEY_VOLUMEUP)
22:27:16.307 T:1945542656   DEBUG: OnKey: leftctrl (0xd0) pressed, action is VolumeUp

I think this is the default Xiaomi Mi remote key mapping.
Reply
After months of growing frustrations with a Xiaomi MiTV remote (BTLE version with CR2032 coin battery) losing bluetooth connection at least once a day, I paired one of my backups. It's also a MiTV remote, but uses 2xAAA batteries and key codes match what Wrxtasy uses. I had them both connected to make sure I could test that it was a problem with the remote, and not a general bluetooth problem.

Now, I'm left wondering why long press commands don't work on the backup remote. I had a highly configured and optimized key mapping on the BTLE version that I want to bring over to the backup, but it ain't working. Am I wrong in thinking long press isn't supported on this model? 

Here's my keymap if anyone's interested, with both CR2032 (5 digit key ids) and AAA (2-3 digit key ids) versions: 
xml:
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
    <global>
        <keyboard>
            <key id="224">
                info
            </key>
            <key id="61654">
                info
            </key>
            <key id="224" mod="longpress">
                contextmenu
            </key>
            <key id="61654" mod="longpress">
                contextmenu
            </key>
            <key id="216">
                back
            </key>
            <key id="61448">
                back
            </key>            
            <key id="37">
                activatewindow(home)
            </key>
            <key id="61576">
                activatewindow(home)
            </key>
            <key id="37" mod="longpress">
                Activatewindow(filemanager)
            </key>
            <key id="61576" mod="longpress">
                Activatewindow(filemanager)
            </key>
            <key id="61662">
                ActivateWindow(shutdownmenu)
            </key>
            <key id="192">
                ActivateWindow(shutdownmenu)
            </key>
            <key id="61662" mod="longpress">
                Activatewindow(settings)
            </key>
            <key id="192" mod="longpress">
                ActivateWindow(settings)
            </key>            
            <key id="208">
                PageUp
            </key>
            <key id="209">
                PageDown
            </key>
            <volume_up>
                PageUp
            </volume_up>
            <volume_down>
                PageDown
            </volume_down>
        </keyboard>
    </global>
    <fullscreenlivetv>
        <keyboard>
            <key id="11">
                playpause
            </key>
            <key id="61453">
                playpause
            </key>
            <key id="216" mod="longpress">
                OSD
            </key>
            <key id="61448" mod="longpress">
                OSD
            </key>
            <key id="216">
                stop
            </key>
            <key id="61448">
                stop
            </key>
            <key id="37" mod="longpress">
                AspectRatio
            </key>
            <key id="61576" mod="longpress">
                AspectRatio
            </key>
            <volume_up>
                VolumeUp
            </volume_up>
            <volume_down>
                VolumeDown
            </volume_down>
            <key id="208">
                VolumeUp
            </key>
            <key id="209">
                VolumeDown
            </key>
        </keyboard>
    </fullscreenlivetv>
    <fullscreenvideo>
        <keyboard>
            <key id="11">
                playpause
            </key>
            <key id="61453">
                playpause
            </key>
            <key id="216" mod="longpress">
                OSD
            </key>
            <key id="61448" mod="longpress">
                OSD
            </key>
            <key id="216">
                stop
            </key>
            <key id="61448">
                stop
            </key>
            <key id="37" mod="longpress">
                AspectRatio
            </key>
            <key id="61576" mod="longpress">
                AspectRatio
            </key>
            <volume_up>
                VolumeUp
            </volume_up>
            <volume_down>
                VolumeDown
            </volume_down>
            <key id="208">
                VolumeUp
            </key>
            <key id="209">
                VolumeDown
            </key>
        </keyboard>
    </fullscreenvideo>
    <fullscreenradio>
        <keyboard>
            <key id="11">
                playpause
            </key>
            <key id="61453">
                playpause
            </key>
            <key id="216" mod="longpress">
                OSD
            </key>
            <key id="61448" mod="longpress">
                OSD
            </key>
            <key id="216">
                stop
            </key>
            <key id="61448">
                stop
            </key>
            <volume_up>
                VolumeUp
            </volume_up>
            <volume_down>
                VolumeDown
            </volume_down>
            <key id="208">
                VolumeUp
            </key>
            <key id="209">
                VolumeDown
            </key>
        </keyboard>
    </fullscreenradio>
</keymap>
 Wrx, do longpress commands work with your remote? And if not, has anyone tested the newer 2017 "voice command" versions?
Reply
In the default config the Back-Button quits fullscreen when you are playing a video file, but doesnt quit the playback. How do i change that stopping the playback, when i press this button? I have tried it with keymap editor and mapped Stop to this button under the video section, but it didnt work as intended. Perhaps someone can give me a hint pls? Smile
Reply
Back up your Userdata->Keymaps->gen.xml file, edit it in notepad (or equivalent) and replace its contents with this code: (it’ll cover both versions of the remote). 

XML:
<keymap><fullscreenvideo><keyboard><key id="216">stop</key><key id="61448">stop</key></keyboard></fullscreenvideo><fullscreenlivetv><keyboard><key id="216">stop</key><key id="61448">stop</key></keyboard></fullscreenlivetv></keymap>

If this doesn’t work, get back to us. 

NOTE: Keymap Editor is really picky about the XML having no indentation or carriage returns. This is a bug in KE; it won’t handle properly formatted XML.

Edited to add stop in live TV as well.
Reply
Soo I try to use my Xiaomi remote with kodi, running on arch linux.
This is the exact model I got.

I can pair the remote, no problem. But thats about it. I don't even see an entry in /proc/bus/input/devices!
Reply
The newer “voice” models are a different beast, and I don’t think anyone had tried getting them to work yet.
Reply
Dang, thats what I thought... It is hard to keep an overview over all those different models, especially given that they do not really have model names or numbers.... Confused
There is even at least one newer remote wich looks awesome (i think it got some kind of click wheel?)... Well, good I did not buy this one!

OK, I think I have to live with the fact I can't use this for now. I'll leave some info never the less, in case someone else tries it:

- pairing works just like the other xiaomi remotes, press home and back button at the same time while really close to your bluetooth host device. It is quite fiddely, had to take out the batteries a couple of times, but it worked.
- There are two bluetooth devices in this remote: One is called "DA1458x RCU" (type joypad) , the other one "XMCTD_7AB9" (type unknown). Would be reasonable to assume first one is the physical remote buttons, while the second one is either microphone or motion controller.
- no button presses seem to be recognized, "cat /proc/bus/input/devices" doesn't show anything related to the remote.

That is all I got for now!
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 12

Logout Mark Read Team Forum Stats Members Help
Connect Xiaomi Mi Box BT remotes to LibreELEC devices0