Kodi Community Forum

Full Version: Streacom IR & Remote - Easy custom setup that works with XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
This is not an official streacom thread. Mail streacom and ask.
Im a bit of a noob to this so apologies. Ive been remapping my remote, but Im unsure on how I can get the green Media centre button on the remote to open XBMC? Im assuming i need to use a run command but Im not sure what that would be as your limited to 13 characters? Or am I going about it incorrectly?

Thanks
As above? Has anyone got the media centre button to open XBMC?
(2013-12-15, 18:32)uNiversal Wrote: [ -> ]Anyone managed to get this working under Linux like Ubuntu? If So can you please share your how-to?

Ive read various threads like https://github.com/Claudio-Sjo/HID_linux_xbmc_driver which is found in some forum post, and tried various openelec forum posts, none work or seem to be vague and incomplete.

Problem is that various keys dont work like info and context and record, all others seem ok or I dont use them.

I managed to get the Streacom Remote working under Ubuntu 14.04 with the key remapping program from this thread. With this, all keys can be programmed freely (except red and blue button, which are for changing modes).
The following steps were necessary (just took the examples from here and adjusted to the Streacom remote):

1. Install and Compile
Code:
cd /usr/src/
sudo git clone https://github.com/Claudio-Sjo/HID_linux_xbmc_driver.git
cd HID_linux_xbmc_driver/
sudo make
2. Learn Keys
With the methods described here, I found out manufacturer and product like below.
You can skip this step and directly take my holtek_mce.map in step 3.
Code:
cd /usr/src/HID_linux_xbmc_driver/
sudo ./hid_mapper --learn --lookup-id --manufacturer '1241' --product 'e000' > ~/holtek_mce.map
3. Create Mapping File
Here is my mapping file for comparison. I assigned all the "special" buttons to the F-keys of the keyboard, because only few of the "special commands" worked.
I only assigned Mode 1 because I don't need that many keys. I added the codes for Mode 2 in the mapping file.
This mapping is only useful, if you don't use a PC keyboard and only use the remote for XBMC.
The letters and numbers (A-Z, 0-12) of the remote control buttons are from the official streacom documentation (page 4).
Code:
# holtek_mce.map
# Mode 1
# A,B
0100100000000000:KEY_F1
04003d0000000000:KEY_SPACE
# CDE
0100150000000000:KEY_F2
0100130000000000:KEY_PLAY
0300160000000000:KEY_STOP
# FGH
0300050000000000:KEY_REWIND
0300130000000000:KEY_PLAY
0300090000000000:KEY_F3
# IJ
03b600:KEY_F4
03b500:KEY_F5
# K
0c00280000000000:KEY_HOME
# L,M
00002a0000000000:KEY_BACK
0102000000:KEY_F6
# NOPQR
0000520000000000:KEY_UP
0000500000000000:KEY_LEFT
0000280000000000:KEY_F7
00004f0000000000:KEY_RIGHT
0000510000000000:KEY_DOWN
# STUVW
03e900:KEY_KPPLUS # KEY_VOLUMEUP does not permit holding the button
00004b0000000000:KEY_F8
0000410000000000:KEY_MUTE
03ea00:KEY_KPMINUS # KEY_VOLUMEDOWN does not permit holding the button
00004e0000000000:KEY_F9
# 1-9
00001e0000000000:KEY_1
00001f0000000000:KEY_2
0000200000000000:KEY_3
0000210000000000:KEY_4
0000220000000000:KEY_5
0000230000000000:KEY_6
0000240000000000:KEY_7
0000250000000000:KEY_8
0000260000000000:KEY_9
# 10,0,11
0200250000000000:KEY_DOT
0000270000000000:KEY_0
0101000000:KEY_COMMA
# 12,X,Y,Z
00002a0000000000:KEY_CLEAR
0300170000000000:KEY_F10
01000a0000000000:KEY_F11
0000280000000000:KEY_F7
# GREEN, YELLOW
01000c0000000000:KEY_PAGEUP
04002b0000000000:KEY_PAGEDOWN

# Mode 2
# Leave commands as in Mode 1
# A
038301:KEY_F1
# CDE
038a01:KEY_F2
03cd00:KEY_PAUSE
03b700:KEY_STOP
# G: Same as B in Mode 1
# K
038301:KEY_HOME
# L
#0101000000
# NOQR
010000fb00:KEY_UP
0100fb0000:KEY_LEFT
0100050000:KEY_RIGHT
0100000500:KEY_DOWN
# U
03e200:KEY_MUTE
# 11
0200200000000000:KEY_COMMA
# XY
0800070000000000:KEY_F10
0800080000000000:KEY_F11
# GREEN
032302:KEY_PAGEUP
4. Set keyboard.xml
The remapped keys have to be set in keyboard.xml. Here is my setting:
Code:
<!--keyboard.xml-->
<keymap>
<global>
    <keyboard>
        <home>XBMC.ActivateWindow(Home)</home>
        <f1>XBMC.ActivateWindow(MusicLibrary,Albums)</f1>
        <space></space><!-- Not defined globaly. Suspend only in Home Menu -->
        <f2>ToggleWatched</f2>
        <f3>FastForward</f3>
        <f4>ChapterOrBigStepBack</f4>
        <f5>ChapterOrBigStepForward</f5>
        <f6>Info</f6>
        <f7>Select</f7>
        <f8>PageUp</f8>
        <f9>PageDown</f9>
        <f10>ContextMenu</f10>
        <f11>Fullscreen</f11>

        <pageup>ActivateWindow(VideoLibrary,MovieTitles)</pageup><!--Green Button-->
        <pagedown>ActivateWindow(VideoLibrary,TvShowTitles)</pagedown><!--Green Button-->

        <two>JumpSMS2</two>
        <three>JumpSMS3</three>
        <four>JumpSMS4</four>
        <five>JumpSMS5</five>
        <six>JumpSMS6</six>
        <seven>JumpSMS7</seven>
        <eight>JumpSMS8</eight>
        <nine>JumpSMS9</nine>        
    </keyboard>
</global>
<Home>
    <keyboard>
        <f6>XBMC.ActivateWindow(SystemInfo)</f6>
        <space>Suspend</space>
    </keyboard>
</Home>
<MyTV>
    <keyboard>
        <f2>Record</f2>
    </keyboard>
    </MyTV>
<FullscreenVideo>
    <keyboard>
        <pageup>AudioNextLanguage</pageup><!--Green Button-->
        <pagedown>NextSubtitle</pagedown><!--Yellow Button-->
        <f10>OSD</f10>
    </keyboard>
</FullscreenVideo>
</keymap>
5. Blacklist key events
create /usr/share/X11/xorg.conf.d/50-remote.conf with the following content:
Code:
Section "InputClass"
Identifier "Remote blacklist"
MatchProduct "HOLTEK"
Option "Ignore" "on"
EndSection
6. Set key mapper to autostart as service
create /etc/init.d/hid_mapper with the following content:
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides:          HID-Mapper Autostart
# Required-Start:    $x11-common    
# Required-Stop:    
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start and stop HID-Mapper
# Description:       With this script you are able to run HID Mapper as daemon.
### END INIT INFO

case "$1" in
    start)
        echo "starting hid_mapper..."
        cd /usr/src/HID_linux_xbmc_driver
        ./hid_mapper --lookup-id --manufacturer '1241' --product 'e000' --map /home/xbmc/holtek_mce.map &
        ;;
    stop)
        echo "stopping hid_mapper..."
            pkill hid_mapper
        ;;
esac
exit 0
Code:
sudo chmod 755 /etc/init.d/hid_mapper
sudo update-rc.d hid_mapper defaults

I think with this guide you get 95% of the remote controls performance without having to mess around with another Windows installation just for reprogramming the firmware.

Edit 2014-12-23: Changed key for volume up/down
Pages: 1 2 3