Skip to content

Instantly share code, notes, and snippets.

@prakashpandey
Forked from coaxial/ir-libreelec.md
Last active July 31, 2022 07:16
Show Gist options
  • Save prakashpandey/2f9abd9fa19a4f33acd99b6c73d22012 to your computer and use it in GitHub Desktop.
Save prakashpandey/2f9abd9fa19a4f33acd99b6c73d22012 to your computer and use it in GitHub Desktop.
How to setup an infrared remote on LibreELEC/Kodi on RPI

Libreelec setup notes

Connect IR Remote to Raspberry Pi 4

OS: Libreelec 10.02

Step 1

Enable lirc in Kodi

Edit the file at /flash/config.txt:

  • mount -o remount,rw /flash
  • vi /flash/config.txt
  • append dtoverlay=gpio-ir,gpio_pin=17 # deskpi internal ir pin 17
  • mount -o remount,ro /flash

Step 2

Copy lircd.conf file to /storage/.config

Step 3

Reboot. You are done.

Select video stream manually in IP TV

To set the stream quality of IP-TV manually, go to

Add-Ons > VideoPlayer InputStream > InputStream Adaptive

Then set Stream Selection to Manually select video stream

Stream Network Camera

Create file in any data directory in /storage e.g videos

  • Camera: TP-Link Tapo
  • Protocol: rtsp
  • Sample link: rtsp://username:password@ip/stream1

File Name: camera-1.strm

Sample camera file

  • Name: camera-1.strm
  • High quality: stream1
  • Low quality: stream2
rtsp://username:password@ip/stream1

Sample lircd.conf file

#
# this config file was automatically generated
# using WinLIRC 0.6.5 (LIRC 0.6.1pre3) on Sat Feb 02 23:13:33 2008
#
# contributed by
#
# brand:             Sony
# model:             RM-W101
# supported devices:
# file:///home/pcp/Downloads/trinitron_rmw101.pdf
# http://lirc.sourceforge.net/remotes/sony/RM-W101

begin remote

  name  Sony_RM-W101
  bits           11
  flags SPACE_ENC
  eps            25
  aeps          100

  header       2420   565
  one          1199   565
  zero          589   565
  ptrail        589
  gap          26057
  toggle_bit      0


      begin codes
          KEY_POWER                0x0000000000000548        #  Was: Power
          KEY_HOME                 0x00000000000002E8        #  Was: info
          KEY_MUTE                 0x0000000000000148        #  Was: Mute
          KEY_MAX                  0x00000000000000E8        #  Was: Maximise
          KEY_BACK                 0x0000000000000528        #  Was: Minimise
          KEY_ESC                  0x0000000000000748        #  Was: Change
          KEY_1                    0x0000000000000008
          KEY_2                    0x0000000000000408
          KEY_3                    0x0000000000000208
          KEY_4                    0x0000000000000608
          KEY_5                    0x0000000000000108
          KEY_6                    0x0000000000000508
          KEY_7                    0x0000000000000308
          KEY_8                    0x0000000000000708
          KEY_9                    0x0000000000000088
          KEY_0                    0x0000000000000488
          KEY_VOLUMEUP             0x0000000000000248        #  Was: Vol+
          KEY_VOLUMEDOWN           0x0000000000000648        #  Was: Vol-
          KEY_CHANNELUP            0x0000000000000048        #  Was: Pg+
          KEY_CHANNELDOWN          0x0000000000000448        #  Was: Pg-
          KEY_EXIT                 0x00000000000006E8        #  Was: Repeat
          KEY_ESC                  0x00000000000004A8        #  Was: Shuffle
          KEY_TV                   0x00000000000001E8        #	Was: PLUP
          KEY_PVR                  0x0000000000000368	     #	Was: PLDN
          BTN_LEFT                 0x0000000000000038        #  Was: LCLICK
          KEY_SELECT               0x0000000000000538        #  Was: select
          KEY_LEFT                 0x0000000000000168        #  Was: left
          KEY_RIGHT                0x0000000000000668        #  Was: right
          KEY_UP                   0x0000000000000178        #  Was: up
          KEY_DOWN                 0x0000000000000578        #  Was: down
      end codes

end remote
#
# this config file was automatically generated
# using WinLIRC 0.6.5 (LIRC 0.6.1pre3) on Sat Feb 02 23:13:33 2008
#
# contributed by
#
# brand: Sony
# model: RM-W101
# supported devices:
# file:///home/pcp/Downloads/trinitron_rmw101.pdf
# http://lirc.sourceforge.net/remotes/sony/RM-W101
begin remote
name Sony_RM-W101
bits 11
flags SPACE_ENC
eps 25
aeps 100
header 2420 565
one 1199 565
zero 589 565
ptrail 589
gap 26057
toggle_bit 0
begin codes
KEY_POWER 0x0000000000000548 # Was: Power
KEY_HOME 0x00000000000002E8 # Was: info
KEY_MUTE 0x0000000000000148 # Was: Mute
KEY_MAX 0x00000000000000E8 # Was: Maximise
KEY_BACK 0x0000000000000528 # Was: Minimise
KEY_ESC 0x0000000000000748 # Was: Change
KEY_1 0x0000000000000008
KEY_2 0x0000000000000408
KEY_3 0x0000000000000208
KEY_4 0x0000000000000608
KEY_5 0x0000000000000108
KEY_6 0x0000000000000508
KEY_7 0x0000000000000308
KEY_8 0x0000000000000708
KEY_9 0x0000000000000088
KEY_0 0x0000000000000488
KEY_VOLUMEUP 0x0000000000000248 # Was: Vol+
KEY_VOLUMEDOWN 0x0000000000000648 # Was: Vol-
KEY_CHANNELUP 0x0000000000000048 # Was: Pg+
KEY_CHANNELDOWN 0x0000000000000448 # Was: Pg-
KEY_EXIT 0x00000000000006E8 # Was: Repeat
KEY_ESC 0x00000000000004A8 # Was: Shuffle
KEY_TV 0x00000000000001E8 # Was: PLUP
KEY_PVR 0x0000000000000368 # Was: PLDN
BTN_LEFT 0x0000000000000038 # Was: LCLICK
KEY_SELECT 0x0000000000000538 # Was: select
KEY_LEFT 0x0000000000000168 # Was: left
KEY_RIGHT 0x0000000000000668 # Was: right
KEY_UP 0x0000000000000178 # Was: up
KEY_DOWN 0x0000000000000578 # Was: down
end codes
end remote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment