Difference between revisions of "X10"

From ArchWiki
Jump to: navigation, search
(Example mplayer config)
Line 165: Line 165:
 
config = pause  
 
config = pause  
 
end
 
end
 +
#show elapse/total time in the upper left corner
 +
#Source: http://prasinos.eu/articles/mplayer-lirc-elapsed-time
 +
begin
 +
button = GUIDE
 +
prog = mplayer
 +
config = osd_show_property_text "${time_pos} / ${length}"
 +
end
 +
 +
 
</pre>
 
</pre>

Revision as of 17:11, 4 February 2009

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:X10#)

Picture

Heres a Picture from the remote http://omploader.org/vMTdrcg

Can somebody please upload this to the wiki?


Install lirc

pacman -S lirc lirc-utils

The package lirc provides the right kernel module.

Blacklist not working module

For some reason udev loads the wrong kernel module for this radio remote, so you need to blacklist it. this is done in /etc/rc.conf

MODULES=(!ati_remote)

To load the right one at boot:

MODULES=(!ati_remote lirc_atiusb)

INFO: You need to unload the wrong kernel module manually if you attached the receiver before blacklisting the module

Add the daemon to the daemons array to start it at boot:

DAEMONS="(lircd)"

Create /etc/lircd.conf

This maps the keys from your remote to strings you can use for programs like mplayer. This config was created with "irrecord /tmp/x10".

begin remote
 name  /tmp/x10
 bits           16
 eps            30
 aeps          100
 one             0     0
 zero            0     0
 pre_data_bits   8
 pre_data       0x14
 post_data_bits  16
 post_data      0x0
 gap          227990
 toggle_bit_mask 0x80800000
     begin codes
         LIVE_TV                  0x719C
         PHOTO                    0xDA05
         DVD_MENU                 0x5984
         REC_TV                   0xED18
         MUSIC                    0x5B86
         VIDEO                    0x022D
         AUDIO                    0x87B2
         TITLE                    0x0A35
         ANGLE                    0x89B4
         SUBTITLES                0x0833
         POWER                    0xD702
         GUIDE                    0x0631
         TEXT                     0x6B96
         VOLUME_UP                0xDE09
         VOLUME_DOWN              0x5D88
         MUTE                     0xD500
         PROGRAM_UP               0x608B
         PROGRAM_DOWN             0xE10C
         LEFT                     0x729D
         RIGHT                    0xF41F
         UP                       0x6F9A
         DOWN                     0xF722
         OK                       0x739E
         ONE                      0xE20D
         TWO                      0x638E
         THREE                    0xE40F
         FOUR                     0x6590
         FIVE                     0xE611
         SIX                      0x6792
         SEVEN                    0xE813
         EIGHT                    0x6994
         NINE                     0xEA15
         ZERO                     0x6C97
         ASTERISK                 0x0C37
         HASH_KEY                 0x8DB8
         BACK                     0xF520
         INFO                     0x84AF
         PAUSE                    0x147EA90000  #ERROR
         WORLD                    0xF01B
         REWIND                   0x79A4
         REWIND_TO_BEGINNING      0xF621
         PLAY                     0x7AA5
         FORWARD                  0xFB26
         FORWARD_TO_END           0x78A3
         STOP                     0xFD28
         RED_CIRCLE_BUTTON        0x7CA7
     end codes
end remote

Starting lircd

/etc/rc.d/lircd start

Example mplayer config

You need to remove --disable-lirc from mplayers PKGBUILD and recompile it, as it is disabled by default (04.02.09) You can check if lirc support is compiled in with "mplayer -v someplayablefile.xyz" look for "Setting up LIRC support... ~/.lircrc is the default mplayer filename for the lirc config, see man mplayer to change this.


~/.lircrc

begin
     button = VOLUME_UP       #VOLUME_UP is the string defined in /etc/lircd.conf
     prog = mplayer            
     config = volume 1         #this is mplayers internal command, see "mplayer -input cmdlist" for more
     repeat = 1                #dont know what this is good for
end

begin
    button = VOLUME_DOWN
    prog = mplayer
    config = volume -1
    repeat = 1
end

begin
	button = RIGHT
	prog = mplayer
	config = seek +1
	repeat = 1
end

begin
	button = LEFT
	prog = mplayer
	config = seek -1
	repeat = 1
end

begin
	button = UP
	prog = mplayer
	config = seek +100
	repeat = 1
end

begin
	button = DOWN
	prog = mplayer
	config = seek -100
end

begin
	button = PLAY
	prog = mplayer
	config = pause
end

begin
	button = PAUSE
	prog = mplayer
	config = pause 
end
#show elapse/total time in the upper left corner
#Source: http://prasinos.eu/articles/mplayer-lirc-elapsed-time
begin
	button = GUIDE
	prog = mplayer
	config = osd_show_property_text "${time_pos} / ${length}"
end