BreadCrumbs: Lirc
Lirc
From Luke Jackson
(Difference between revisions)
Revision as of 23:50, 19 November 2007 (edit) Ljackson (Talk | contribs) (→Lircrc Files) ← Previous diff |
Revision as of 23:51, 19 November 2007 (edit) Ljackson (Talk | contribs) (→Lircd Files) Next diff → |
||
Line 36: | Line 36: | ||
Lircd files map infrared hex singnals to key names. | Lircd files map infrared hex singnals to key names. | ||
+ | |||
+ | Add remotes to the lircd configuration file: | ||
+ | |||
+ | /etc/lircd.conf | ||
=== Hauppauge WinTV-PVR-150 === | === Hauppauge WinTV-PVR-150 === |
Revision as of 23:51, 19 November 2007
Contents |
Summary
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.
Install
Yum (Fedora Core 7)
For Fedora Core 7 I used the atrpms repository. They have already build all the necessary binaries we will need for the installation. You can checkout their install page or follow the condensed instructions.
-or-
Install the GPG-Key:
rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms
Copy the text below into the following file:
/etc/yum.repos.d/atrpms.repo
[atrpms] name=Fedora Core $releasever - $basearch - ATrpms baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1
Install the needed packages with yum:
[root@server.com etc]# yum install lirc-lib-devel lirc-lib lirc lirc-kmdl-`uname -r` lirc-devices
Lircd Files
Lircd files map infrared hex singnals to key names.
Add remotes to the lircd configuration file:
/etc/lircd.conf
Hauppauge WinTV-PVR-150
# # this config file was automatically generated # using lirc-0.7.0(any) on Sun Nov 28 20:25:09 2004 # # contributed by # # brand: Hauppauge_WinTV-PRV-150 # Created: G.J. Werler (The Netherlands) # Updated: Ljackson (USA) - 2007/11/19 # Project: Mythtv Fedora Pundit-R www.mythtvportal.com # Date: 2004/11/28 # model no. of remote control: Hauppauge A415-HPG # devices being controlled by this remote: PVR-350 # begin remote name Hauppauge_WinTV-PRV-150 bits 13 flags RC5|CONST_LENGTH eps 30 aeps 100 one 969 811 zero 969 811 plead 1097 gap 114605 toggle_bit 2 begin codes Go 0x00000000000017BB Power 0x00000000000017BD TV 0x000000000000179C Videos 0x0000000000001798 Music 0x0000000000001799 Pictures 0x000000000000179A Guide 0x000000000000179B Radio 0x000000000000178C Up 0x0000000000001794 Left 0x0000000000001796 Right 0x0000000000001797 Down 0x0000000000001795 OK 0x00000000000017A5 Back/Exit 0x000000000000179F Menu/i 0x000000000000178D Vol+ 0x0000000000001790 Vol- 0x0000000000001791 Prev.Ch 0x0000000000001792 Mute 0x000000000000178F Ch+ 0x00000000000017A0 Ch- 0x00000000000017A1 Record 0x00000000000017B7 Stop 0x00000000000017B6 Rewind 0x00000000000017B2 Play 0x00000000000017B5 Forward 0x00000000000017B4 Replay/SkipBackward 0x00000000000017A4 Pause 0x00000000000017B0 SkipForward 0x000000000000179E 1 0x0000000000001781 2 0x0000000000001782 3 0x0000000000001783 4 0x0000000000001784 5 0x0000000000001785 6 0x0000000000001786 7 0x0000000000001787 8 0x0000000000001788 9 0x0000000000001789 Asterix 0x000000000000178A 0 0x0000000000001780 # 0x000000000000178E Red 0x000000000000178B Green 0x00000000000017AE Yellow 0x00000000000017B8 Blue 0x00000000000017A9 end codes end remote
Lircrc Files
Add commands to the default configuration file:
/etc/lircrc
Additionally you can add commands to another configuration file to your home directory:
~/.lircrc
Note: If this file is present it will override the file in /etc/lircrc
irexec
#-------------------------------------------------- # File: /etc/lircrc (This works with the '''Hauppage 350 grey remote''') #-------------------------------------------------- #-------------------------------------------------- # irexec #-------------------------------------------------- begin button = Ch+ prog = irexec config = python /path/to/ivtv-channel.py up end begin button = Ch- prog = irexec config = python /path/to/ivtv-channel.py down end begin button = OK prog = irexec config = python /path/to/ivtv-channel.py enter end begin button = Prev.Ch prog = irexec config = python /path/to/ivtv-channel.py last end begin button = 0 prog = irexec config = ivtv-tune -c 0 end begin button = 1 prog = irexec config = ivtv-tune -c 1 end begin button = 2 prog = irexec config = ivtv-tune -c 2 end begin button = 3 prog = irexec config = ivtv-tune -c 3 end begin button = 4 prog = irexec config = ivtv-tune -c 4 end begin button = 5 prog = irexec config = ivtv-tune -c 5 end begin button = 6 prog = irexec config = ivtv-tune -c 6 end begin button = 7 prog = irexec config = ivtv-tune -c 7 end begin button = 8 prog = irexec config = /usr/bin/ivtv-tune -c 46 end begin button = 9 prog = irexec config = ivtv-tune -c 9 end begin button = Red prog = irexec config = killall -9 mplayer end begin button = Green prog = irexec config = date end begin button = Yellow prog = irexec config = mplayer "/myvideo.avi" & end begin button = Blue prog = irexec config = mplayer /dev/video0 & end
mplayer
#-------------------------------------------------- # File: /etc/lircrc (This works with the '''Hauppage 350 grey remote''') #-------------------------------------------------- #-------------------------------------------------- # mplayer #-------------------------------------------------- begin prog = mplayer button = Menu/i repeat = 3 config = osd end begin button = Vol+ prog = mplayer config = volume +1 repeat = 1 end begin button = Vol- prog = mplayer config = volume -1 repeat = 1 end begin prog = mplayer button = Pause repeat = 3 config = pause end begin prog = mplayer button = Play repeat = 3 config = seek +1 end begin prog = mplayer button = Stop repeat = 3 config = quit end begin prog = mplayer button = Mute repeat = 3 config = mute end begin prog = mplayer button = Forward repeat = 3 config = seek +10 end begin prog = mplayer button = Rewind repeat = 3 config = seek -10 end begin prog = mplayer button = SkipForward repeat = 3 config = seek +30 end begin prog = mplayer button = Replay/SkipBackward repeat = 3 config = seek -30 end begin prog = mplayer button = TV repeat = 3 config = vo_fullscreen end begin prog = mplayer button = Back/Exit repeat = 3 config = quit end
vlc
#-------------------------------------------------- # File: /etc/lircrc (This works with the '''Hauppage 350 grey remote''') #-------------------------------------------------- #-------------------------------------------------- # vlc #-------------------------------------------------- begin prog = vlc button = Play config = key-play-pause repeat = 0 end begin prog = vlc button = Pause config = key-play-pause repeat = 0 end begin prog = vlc button = Stop config = key-stop repeat = 1 end begin prog = vlc button = Back/Exit config = key-quit repeat = 3 end begin prog = vlc button = Ch+ config = key-next repeat = 3 end begin prog = vlc button = Ch- config = key-prev repeat = 3 end begin prog = vlc button = TV config = key-fullscreen repeat = 3 end begin prog = vlc button = Rewind config = key-jump-extrashort repeat = 3 end begin prog = vlc button = Forward config = key-jump+extrashort repeat = 3 end begin prog = vlc button = Replay/SkipBackward config = key-jump-long repeat = 3 end begin prog = vlc button = SkipForward config = key-jump+long repeat = 3 end begin prog = vlc button = Vol- config = key-vol-down repeat = 1 end begin prog = vlc button = Vol+ config = key-vol-up repeat = 1 end begin prog = vlc button = Mute config = key-vol-mute repeat = 0 end begin prog = vlc button = Left config = key-nav-left end begin prog = vlc button = Down config = key-nav-down end begin prog = vlc button = Up config = key-nav-up end begin prog = vlc button = Right config = key-nav-right end begin prog = vlc button = Guide config = key-nav-activate end begin prog = vlc button = Menu/i config = key-disc-menu end begin prog = vlc button = Radio config = key-audio-track end