Using an LG Magic Remote with Kodi

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ClayMontgomery Offline
Junior Member
Posts: 21
Joined: Apr 2013
Reputation: 0
Post: #1
I managed to get the Magic Remote (AN-MR650) for my new LG Smart TV working to drive Kodi on my GeexBox using a Flirc. It's fantastic to have a single remote to control all the features of a smart TV plus Kodi too!

This is the remote I have:

LG Magic Remote at Amazon

LG's documentation for the remote is horrible. It took some googling and experimenting to figure it out. First of all, I learned the Magic Remote is actually both an RF and IR device. The remote must be physically close to the TV when you program the Flirc because RF communication is needed for the TV to tell the remote the proper IR codes. I know this sounds weird, but it's because all of the intelligence for the universal remote features are in the TV, not the remote. Yawor explains it here:

Flirc Forum Post

Flircs must be programmed using the Flirc app on a Windows PC, but you must do it near the TV!

Second, you must pair the Flirc with an HDMI input using the TV's "Device Connector" menu. That setup requires you to select a device vendor. Of course, neither Kodi nor Flirc are on that list. I chose 'Sony'. You can probably choose any brand, but you must choose one because it defines the IR codes the Magic Remote will send to the Flirc. The Flirc will then convert those codes into the MCE keys that Kodi needs.

If you are not familiar with Flirc programming for Kodi DVR functions, I detail it thoroughly in my Kodi DVR guide:

The Best HTPC Solution for Internet and Live TV in America

Unfortunately, only about half of the buttons on the Magic Remote can be programmed into the flirc. I don't know why. But, it's enough to drive Kodi including DVR functions if you use the numeral buttons also. Strangely, the four colored buttons do not work. Does any one have any idea about how to get those working?

Regards, Clay
find quote
subzero79 Offline
Junior Member
Posts: 13
Joined: Apr 2014
Reputation: 0
Post: #2
I manage to get the full num pad, arrows, enter (scroll button), back and color buttons using this device : "LG/Bluray-DVDPlayer/control type 2"

This remote is pretty limited using CEC, as LG doesn't expose the numeric keypad, using IR gives you a little bit more. I wanted to extend more functionality using long-press but the magic remote doesn't even do long press.

kodi runs in libreelec using an amlogic s905x box.

If you need the remote.conf ir codes maps i can post them here.
find quote
ClayMontgomery Offline
Junior Member
Posts: 21
Joined: Apr 2013
Reputation: 0
Post: #3
Thank you for this idea! I tried using the LG - Control Type 2 device configuration and it does work better than the Sony codes I was using. The 4 color buttons work now! This provides enough buttons for good control of my Kodi DVR.

I have had no success at all getting CEC to work with OpenELEC 6.0 and from what you said I guess it's better to use the Flirc with the LG Magic Remote anyway.

I would like to try your code map file. Can you please post it here?

Are you using a Flirc, or does your code map eliminate the need for a Flirc?

Thanks, Clay
find quote
subzero79 Offline
Junior Member
Posts: 13
Joined: Apr 2014
Reputation: 0
Post: #4
The device i have has an IR receiver, it came with a remote, but i have a harmony logitech that works and also the default LG tv one.


This is the remote.conf codes for the lg remote that worked for me using the device type 2. I don't use FLIRC

Code:
#*******************************************************************************​**************************
#this file is configuration for each factory remote device
#     work_mode      0 :software mode  1 :hardware mode
#    repeat_enable      0 :disable repeat 1 :enable repeat    
#
#    factory_code      each device has it's unique factory code.
#              pattern:custom_code(16bit)+index_code(16bit)
#              examble: 0xff000001 = 0xff00(custom cod)  0001 (index)
#
#    release_delay      unit:ms.release will report from kernel to user layer after this period of time
#              from press or repeat triggered.
#
#    debug_enable      0 :debug disable  1 :debug disable
#
# SW MODE:
#    bit_count      how many bits in each frame      
#    tw_leader_act      time window for leader active
#    tw_bit0          time window for bit0 time.
#    tw_bit1          time window for bit1 time
#    tw_repeat_leader  time window for repeat leader
# REG
#    reg_base_gen      set value for PREG_IR_DEC_BASE_GEN    
#    reg_control      set value for PREG_IR_DEC_CONTROL
#    reg_leader_act      set value for PREG_IR_DEC_LEADER_ACTIVE
#    reg_leader_idle      set value for PREG_IR_DEC_LEADER_IDLE
#    reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
#    reg_bit0_time      set value for PREG_IR_DEC_BIT0_TIME
#*******************************************************************************​******************************


#LG magic remote IR
factory_code    = 0x2d2d0001
factory_infcode = 1
work_mode       = 0
repeat_enable   = 1
release_delay   = 150
debug_enable    = 1


key_begin
    0x45 158        #Return    KEY_BACK
    0x7c 398        #Red    KEY_RED
    0x7d 399        #Green    KEY_GREEN
    0x7e 400        #Yellow    KEY_YELLOW
    0x7f 401        #Blue    KEY_BLUE
    0x59 105        #Left KEY_LEFT
    0x47 103        #Up    KEY_UP
    0x5a 106        #Right    KEY_RIGHT
    0x48 108        #Down KEY_DOWN
    0x58 28            #OK    KEY_ENTER
    0x44 11            #    KEY_0
    0x3b 2            #    KEY_1
    0x3c 3             #    KEY 2
    0x3d 4             #    KEY 3
    0x3e 5             #    KEY 4
    0x3f 6             #    KEY 5
    0x40 7             #    KEY 6
    0x41 8             #    KEY 7
    0x42 9             #    KEY 8
    0x43 10            #     KEY 9
key_end

repeat_key_begin
    0x45 158        #Return    KEY_BACK
    0x7c 398        #Red    KEY_RED
    0x7d 399        #Green    KEY_GREEN
    0x7e 400        #Yellow    KEY_YELLOW
    0x7f 401        #Blue    KEY_BLUE
    0x59 105        #Left KEY_LEFT
    0x47 103        #Up    KEY_UP
    0x5a 106        #Right    KEY_RIGHT
    0x48 108        #Down KEY_DOWN
    0x58 28            #OK    KEY_ENTER
    0x44 11            #    KEY_0
    0x3b 2            #    KEY_1
    0x3c 3             #    KEY 2
    0x3d 4             #    KEY 3
    0x3e 5             #    KEY 4
    0x3f 6             #    KEY 5
    0x40 7             #    KEY 6
    0x41 8             #    KEY 7
    0x42 9             #    KEY 8
    0x43 10            #     KEY 9
repeat_key_end
(This post was last modified: 2017-03-08 06:07 by subzero79.)
find quote