Mythtv

From SaruWiki
Jump to navigation Jump to search

lirc

LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press <enter> for password):

cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login

Get the sources:

cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc

After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:

cvs update

Compile:

cd lirc
 ./autogen.sh
 ./setup.sh
 make

/etc/lirc/hardware.conf

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=""
#Don't start lircmd even if there seems to be a good config file
START_LIRCMD=false
#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
#DRIVER="pinsys"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/lirc0"
MODULES="lirc_mceusb" 
TRANSMITTER_DEVICE="/dev/lirc0"
# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""

/etc/lirc/lircd.conf

################################################################################
# lircd.conf file for the new Microsoft Media Center remote using a new
# Microsoft Media Center receiver.
################################################################################
begin remote
 name  mceusb
 bits           16
 flags RC6|CONST_LENGTH
 eps            30
 aeps          100
 header       2667   889
 one           444   444
 zero          444   444
 pre_data_bits 21
 pre_data      0x37FF0
 gap          105000
 toggle_bit     22
 rc6_mask     0x100000000


     begin codes
# starts at A1
       BLUE         0x00007BA1
       YELLOW       0x00007BA2
       GREEN        0x00007BA3
       RED          0x00007BA4
       TELETEXT     0x00007BA5
       RADIO        0x00007BAF
       PRINT        0x00007BB1
       VIDEO        0x00007BB5 # VIDEOS button
       IMAGE        0x00007BB6 # PICTURES button
       PVR          0x00007BB7 # RECORDED TV button
       AUDIO        0x00007BB8 # MUSIC button
       TV           0x00007BB9
# no BA - D8
       Guide        0x00007BD9
       TV           0x00007BDA # LIVE TV button
       Dvd          0x00007BDB
       Back         0x00007BDC
       OK           0x00007BDD
       Right        0x00007BDE
       Left         0x00007BDF
       Down         0x00007BE0
       Up           0x00007BE1
       STAR         0x00007BE2
       Hash          0x00007BE3
       PREVIOUS     0x00007BE4 # REPLAY button
       Next         0x00007BE5 # SKIP button
       Stop         0x00007BE6
       Pause        0x00007BE7
       Record       0x00007BE8
       Play         0x00007BE9
       Rewind       0x00007BEA
       Forward      0x00007BEB
       CHANNELDOWN  0x00007BEC
       CHANNELUP    0x00007BED
       Volumedown   0x00007BEE
       Volumeup     0x00007BEF
       INFO         0x00007BF0 # MORE (i) button
       Mute         0x00007BF1
       MENU         0x00007BF2 # START (Windows) button
       POWER        0x00007BF3
       ENTER        0x00007BF4
       CLEAR        0x00007BF5
       9            0x00007BF6
       8            0x00007BF7
       7            0x00007BF8
       6            0x00007BF9
       5            0x00007BFA
       4            0x00007BFB
       3            0x00007BFC
       2            0x00007BFD
       1            0x00007BFE
       0            0x00007BFF
     end codes
end remote

~/.lircrc begin

   prog   = mythtv
   button = Two
   config = 2

end

begin

   prog   = mythtv
   button = Three
   config = 3

end

begin

   prog   = mythtv
   button = Four
   config = 4

end

begin

   prog   = mythtv
   button = Five
   config = 5

end

begin

   prog   = mythtv
   button = Six
   config = 6

end

begin

   prog   = mythtv
   button = Seven
   config = 7

end

begin

   prog   = mythtv
   button = Eight
   config = 8

end

begin

   prog   = mythtv
   button = Nine
   config = 9

end

IRblaster

To get the right codes from youre remote you can record it with irrecord

#irrecord /tmp/remote.conf

Now follow the instructions To get the raw codes

#irrecord -f /tmp/remoteraw.conf

You wil get this file for a topfield tf6000cok remote

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010
# 
# contributed by 
#
# brand:Topfield
# model no. of remote control: TP-014
# devices being controlled by this remote: Topfield TF6000COK
#
begin remote
 name  topfield
 flags RAW_CODES|CONST_LENGTH
 eps            30
 aeps          100
 gap          107620
     begin raw_codes
         name KEY_1
            9000    4450     600     500     650     450
             650    1650     600     500     600     500
             650     500     600     500     600     500
             650    1600     650    1600     600    1650
             600    1650     600    1650     600    1650
             600    1600     650    1600     600    1650
             600     550     600     500     600     500
             600    1650     600     550     550     550
             600     500     650     500     600    1650
             600    1650     600    1600     600     550
             600    1650     550    1650     650    1650
             550
         name KEY_2
            9050    4400     600     500     650     500
             600    1650     600     500     600     500
             650     500     600     500     600     500
             650    1650     600    1600     600    1650
             600    1650     600    1650     600    1650
             600    1650     600    1600     600     550
             600    1650     600     500     600     500
             650    1600     600     550     600     500
             600     550     600    1600     600     550
             600    1650     550    1650     650     500
             600    1650     600    1650     600    1600
             600
         name KEY_3
            9000    4450     600     500     650     500
             600    1600     650     500     600     500
             600     550     600     500     600     550
             600    1600     600    1650     650    1600
             600    1650     600    1650     600    1650
             600    1600     600    1650     600    1650
             600    1650     600     500     600     550
             600    1650     600     500     600     500
             600     550     600     500     600     550
             600    1600     650    1650     550     550
             600    1650     600    1600     600    1650
             600
         name KEY_4
            9050    4450     600     500     600     500
             650    1600     600     500     650     500
             600     500     650     500     600     500
             600    1650     600    1650     600    1650
             600    1600     650    1600     650    1600
             600    1650     600    1650     600     500
             600     550     600    1650     550     550
             600    1650     600     500     600     500
             650     500     600    1650     600    1650
             600     500     600    1650     600     500
             650    1600     600    1650     600    1650
             600
         name KEY_5
            9050    4400     650     450     650     500
             600    1650     600     500     650     500
             600     500     600     500     650     500
             600    1650     600    1600     650    1650
             600    1600     600    1650     600    1650
             600    1650     600    1650     600    1650
             600     500     600    1650     600     500
             600    1650     600     500     650     500
             600     500     600     550     600    1650
             600     500     600    1650     600     500
             600    1650     600    1650     600    1650
             600
         name KEY_6
            9050    4400     650     500     600     500
             600    1650     600     500     650     500
             600     500     600     500     650     500
             600    1650     600    1650     600    1600
             600    1650     600    1650     600    1650
             600    1650     600    1650     600     500
             600    1650     600    1650     600     500
             600    1650     600     550     550     550
             600     500     600    1650     600     500
             600     550     600    1650     600     500
             600    1650     600    1650     600    1650
             600
         name KEY_7
            9000    4450     600     500     600     500
             650    1600     650     450     650     500
             600     500     650     500     600     500
             600    1650     600    1650     600    1650
             600    1650     600    1600     650    1600
             600    1650     600    1650     600    1650
             600    1650     550    1650     650     500
             600    1650     600     500     600     550
             600     500     600     500     600     550
             600     500     600    1650     600     500
             650    1600     600    1650     600    1650
             600
         name KEY_8
            9050    4400     650     450     650     500
             600    1650     600     500     650     500
             600     500     600     500     650     500
             600    1650     600    1600     650    1650
             550    1650     600    1650     600    1650
             600    1650     600    1600     650     500
             600     550     550     550     600    1650
             600    1650     550     550     600     500
             650     500     600    1600     650    1650
             550    1650     600     550     600     500
             600    1650     600    1650     600    1650
             600
         name KEY_9
            9050    4400     650     500     600     500
             600    1650     600     500     650     500
             600     500     600     500     650     500
             600    1650     600    1650     600    1600
             600    1650     650    1600     600    1650
             600    1650     600    1650     600    1600
             600     550     600     500     600    1650
             600    1650     600     550     550     550
             600     500     600     550     600    1600
             600    1650     600     550     600     500
             600    1650     600    1650     600    1650
             600
         name KEY_0
            9000    4450     600     500     650     450
             650    1600     650     500     600     500
             600     500     650     500     600     550
             600    1600     600    1650     600    1650
             600    1650     600    1650     600    1650
             600    1600     600    1650     600     550
             600     500     600     500     650     500
             600    1650     600     500     600     550
             600     500     600    1650     600    1650
             600    1600     650    1650     550     550
             600    1650     600    1600     600    1650
             600
         name KEY_CHANNELUP
            9050    4400     650     500     600     500
             650    1600     650     500     600     500
             600     500     650     500     600     500
             650    1600     600    1650     600    1650
             600    1650     600    1600     600    1650
             650    1600     600    1650     600    1650
             600     500     600    1650     600     500
             600    1650     650     500     600    1600
             650     500     600     550     550    1650
             600     550     600    1650     550     550
             600    1650     600     500     600    1650
             600
         name KEY_CHANNELDOWN
            9050    4400     650     500     600     500
             650    1600     600     500     650     500
             600     550     600     500     600     500
             600    1650     600    1650     600    1650
             600    1600     650    1650     600    1600
             600    1650     600    1650     600     500
             650    1600     600    1650     600     550
             600    1600     600     550     600    1650
             550     550     600    1650     600     500
             600     550     600    1650     550     550
             600    1650     600     500     600    1650
             600
         name KEY_VOLUMEUP
            9050    4400     650     500     600     500
             600    1650     600     500     650     500
             600     500     600     500     650     500
             600    1650     600    1650     600    1600
             600    1650     650    1600     600    1650
             600    1650     600    1650     600    1600
             600    1650     650    1600     600     500
             650    1650     550     550     600    1650
             600     500     600     500     600     550
             600     500     650    1600     600     500
             650    1650     550     550     600    1650
             600
         name KEY_VOLUMEDOWN
            9050    4400     650     500     600     550
             600    1600     650     500     600     500
             600     500     650     500     600     500
             650    1600     600    1650     600    1650
             600    1650     600    1650     600    1600
             650    1600     600    1650     600     550
             600     500     600     500     600    1650
             600    1650     600     500     650    1600
             600     550     600    1650     600    1600
             600    1650     600     550     550     550
             600    1650     600     500     600    1650
             600
     end raw_codes
end remote

Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf

include "/etc/lirc/remote.conf"

Now we can test irblaster

#irsend SEND_ONCE remote KEY_1

The channel on the topfield DVB must jump to channel 1

Metadata

Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories Choose (create Fanart group) and choose the right directory

Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [1] the right data will be searched.

To configure the metadata yourself you can select the video and press I. Now configure the metadata.