Solved Connect Xiaomi Mi Box BT remotes to LibreELEC devices - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222) +--- Forum: Hardware (https://forum.kodi.tv/forumdisplay.php?fid=112) +--- Thread: Solved Connect Xiaomi Mi Box BT remotes to LibreELEC devices (/showthread.php?tid=317011) |
RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - zang - 2017-09-17 What's the procedure for getting a fix like this into the main releases? RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - wrxtasy - 2017-09-17 First we get some Guinea Pigs to test it and report any bugs Then I will submit a pull request to patch the C2's Linux Kernel and it's config. RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - Vlaves - 2017-09-17 @wrxtasy I have successfully running the remote now with Libreelec 8.1.7 on the Wetek Hub. Wanted to ask how to do key remapping. Wanted to use the addon but when I want to edit the global context menu key to the actual context menu on the remote it doesn't recognize the button. The button is not recognized at all. Is there a file where I can do the correct mapping? Also this remote was waking up the Wetek hub with the power key just fine while running Android TV ROM. Would it be possible to do the same within Libreelec? Thanks again for your great support here RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - zang - 2017-09-17 (2017-09-17, 17:26)Vlaves Wrote: @wrxtasy I have successfully running the remote now with Libreelec 8.1.7 on the Wetek Hub. Wanted to ask how to do key remapping. Wanted to use the addon but when I want to edit the global context menu key to the actual context menu on the remote it doesn't recognize the button. The button is not recognized at all. On both the Odroid C2 and Raspberry Pi 3 versions of LibreELEC, the contextual menu key wasn't mapped by default, and I used the Keymap Editor add-on to quickly remedy that. It's the fastest way to get a custom key map up and running. I also manually edited the created key map afterwards to include some long-press functions (long press isn't currently supported in the add on) via the SMB share->userdara->keymaps->gen.xml Without installing the add on, I believe any keyboard.xml dropped into the keymap folder will work. Here's a simple one making use of the contextual menu key in a short- and long-press configuration. Code: <keymap> RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - zang - 2017-09-17 (2017-09-17, 15:28)wrxtasy Wrote: First we get some Guinea Pigs to test it and report any bugs For some reason I assumed that with a project the size and platform breadth of LE that it'd be more of a committee-thing than just a pull-request. RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - Vlaves - 2017-09-17 (2017-09-17, 19:17)zang Wrote: ... Thanks for the reply. Problem here is, that the key ids seems to be different from my remote and the even when I use the Editor scrip,t it is not getting a keypress from the context key at all The home key is context menu within the GUI. So somwhere befor the keypress reach Kodi its not mapped correctly for my remote. Where would I need to adjust the mappins before it comes to Kodi? RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - zang - 2017-09-18 Settings->system->enable debug logging, then ssh into LibreELEC and type Code: tail -f .kodi/temp/kodi.log RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - wrxtasy - 2017-09-18 (2017-09-17, 19:24)zang Wrote:Everyone has their own areas of expertise.(2017-09-17, 15:28)wrxtasy Wrote: First we get some Guinea Pigs to test it and report any bugs So LE developer chain of events....implement new features often in community build first, test patches, bug bust code, submit code in a pull request, specific Hardware platform code review by LE developers, suggestions, sometimes heated discussion, amendments, rebasing, squashing, then finally a codebase merge to hopefully make it into a final LE 8.x release. RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - wrxtasy - 2017-09-18 (2017-09-17, 21:33)Vlaves Wrote: Thanks for the reply. Problem here is, that the key ids seems to be different from my remote and the even when I use the Editor scrip,t it is not getting a keypress from the context key at all Yes all your buttons will not be mapped on your Xiaomi remote yet because I suspect your aftermarket (non USA Spec) Xiaomi remote may have different button outputs vs the one I mapped LibreELEC for. The remote buttons are in different spots as well. The BT Fixed C2 and @kszaq's AML 32bit LE 8.1.7+ releases currently have my full USA spec Xiaomi remote button mappings. What I need please is: outputs from a Kodi log and a list of all the corresponding buttons pressed on the Xiaomi remote: Eg remote button = shows KEY_xxxx in Kodi log...like Home button = KEY_HOME (in Kodi log) Context button = KEY_F5 Back button = KEY_BACK I need this for every button except the power, left, right, up, down buttons. RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - Atreyu - 2017-09-18 (2017-09-18, 06:50)wrxtasy Wrote: Yes all your buttons will not be mapped on your Xiaomi remote yet because I suspect your aftermarket (non USA Spec) Xiaomi remote may have different button outputs vs the one I mapped LibreELEC for. The remote buttons are in different spots as well. Same here on my two remotes i have tried. No keypress registered for the far right (context menu) button at all. Still very usable with some remapping though. Away for work right now, but i'll try and get the code for this key from kodi.log when i return. RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - Vlaves - 2017-09-18 (2017-09-18, 06:50)wrxtasy Wrote: ... Thanks for the reply Will send it as soon as possible. Would that also help to make the remote work properly on the ATV ROM which is on the nand on the wetek? I posted that in the wetek forum already, but seemed like its not solvable there. RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - wrxtasy - 2017-09-19 Improvements for getting the Xiaomi aftermarket remotes working: I written an automated script, so the remotes work better when USB devices are plugged in and out, and also the Xiaomi remotes with the Chinese name 小米蓝牙遥控器 should work. Simple copy and paste this: Code: curl -sL http://wrxtasy.libreelec.tv/LE-Xiaomi/xbt.sh | bash - Xiaomi remote remapping is found here, use a Kodi debug log (enable in Kodi settings > System) to see KEY press events: Code: cat .kodi/temp/kodi.log and custom edit them if needed: Code: nano .config/xiaomibtremote.evmap CTRL-O to save CTRL-X to exit RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - Atreyu - 2017-09-19 Thanks wrxtasy for your efforts. I'll see if I can try it later ... RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - Vlaves - 2017-09-19 (2017-09-19, 07:46)wrxtasy Wrote: Improvements for getting the Xiaomi and USA Spec remotes working: Thanks so much, that's great So now if I want the power key to be the power key I can self remap it in the "/storage/.config/xiaomibtremote.evmap" Any chance something can be done regarding the remote in the ATV ROM? RE: Connect Xiaomi Mi Box BT remotes to LibreELEC devices - wrxtasy - 2017-09-19 No idea about ATV ROM (yet) - I see the same behavior on other ROM's with similar remotes regarding keyboard input. Power key will turn device OFF but not back ON, so its useless in its default state for LibreELEC. I've just uploaded what I think is the correct mapping for the Vendor ID=2717 ProdID=32B1 (non Mi Box USA) aftermarket remotes. Can you just check all Remote buttons are working please ? I would like confirmation the context button (F12 I think) is working ? First get the new Map: Code: wget http://wrxtasy.libreelec.tv/LE-Xiaomi/xiaomibtremote.evmap -O /storage/.config/xiaomibtremote.evmap and reboot. If all remote buttons are working I would suggest custom Mapping with the Kodi Keymap editor because that has extra functionality for certain sections of Kodi. ie. Fullscreen Video only - use back key to Stop video playback Fullscreen Live TV.. |