Mythtv
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
Lirc will initiate the hardware with the below config file. In this case a mce usb receiver with a ir blaster and also a volume knob (Antec fusion)
# /etc/lirc/hardware.conf # #Chosen Remote Control REMOTE="Windows Media Center Transceivers/Remotes (all)" REMOTE_MODULES="lirc_dev lirc_mceusb2" REMOTE_DRIVER="" REMOTE_DEVICE="/dev/lirc1" REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb" REMOTE_LIRCD_ARGS="" #Chosen Remote Control REMOTE="Windows Media Center Transceivers/Remotes (all)" REMOTE_MODULES="lirc_dev lirc_imon" REMOTE_DRIVER="" REMOTE_DEVICE="/dev/lirc0" REMOTE_LIRCD_CONF="" REMOTE_LIRCD_ARGS="" #Chosen IR Transmitter TRANSMITTER="Microsoft Windows Media Center V2 (usb) : Direct TV Receiver" TRANSMITTER_MODULES="lirc_dev lirc_mceusb2" TRANSMITTER_DRIVER="" TRANSMITTER_DEVICE="/dev/lirc1" TRANSMITTER_SOCKET="" TRANSMITTER_LIRCD_CONF="" TRANSMITTER_LIRCD_ARGS="" #Enable lircd START_LIRCD="true" #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" # Default configuration files for your hardware if any LIRCMD_CONF="" FORCE_NONINTERACTIVE_RECONFIGURATION="false" START_LIRCMD="" REMOTE_SOCKET=""
/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
Whit this config file lirc will listen on the devices and will translate the input. It will give a hardware name for the device and the button pressed. irw wil give you a xample on the commandline
#irw
Now press some buttons
To feed the command to the appropiate program (if this program supports lirc) make a config in the home dir of the user.
~/.lirc/mythtv
begin remote = ClickWheel prog = mythtv button = KEY_VOLUMEUP config = ] repeat = 0 delay = 0 end
begin remote = ClickWheel prog = mythtv button = KEY_VOLUMEDOWN config = [ repeat = 0 delay = 0 end
And the final piece of the puzzle and this was the hardest to find but the most simple thing to do. It seems that Lirc has it all figured out for the newest version on how to run multiple devices without major manual configuration EXCEPT the Lirc init.d script.
With my devices plugged in and issuing an ls -l /dev/lirc* I had all the devices I needed with manual configuration so
Code:
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0 crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1 lrwxrwxrwx 1 root root 19 2010-02-21 11:44 /dev/lircd -> /var/run/lirc/lircd lrwxrwxrwx 1 root root 20 2010-02-21 11:44 /dev/lircd1 -> /var/run/lirc/lircd
SEE the problem - /dev/lircd1 was pointing to /var/run/lirc/lircd so when issuing an irsend command from a script or a command line I was getting the hardware cannot send error. The actual fix I finally found in another post - THANK YOU TO cyber_source - YOU ARE A LIFE SAVER.
You need to edit your /etc/init.d/lirc startup script and change a couple lines
First Line 83 Needs to be changed from
"${TRANSMITTER_SOCKET}1" to this - "${TRANSMITTER_SOCKET}"
and then line 131 Needs to be changed from
TRANSMITTER_SOCKET="/var/run/lirc/lircd" to this TRANSMITTER_SOCKET="/var/run/lirc/lircd1"
save and exit the file reboot your system and run another ls -l /dev/lirc* and you should see
Code:
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0 crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1 lrwxrwxrwx 1 root root 19 2010-02-21 11:44 /dev/lircd -> /var/run/lirc/lircd lrwxrwxrwx 1 root root 20 2010-02-21 11:44 /dev/lircd1 -> /var/run/lirc/lircd1
IRblaster
To get the right codes from youre remote you can record it with irrecord. This will provide a configuration file which you can use in lirc
#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
EPG
To use the epg we want to grad the data from a source. In this case we use tv_grab_nl_py. This script will grab all data from www.tvgids.nl
XMLTV-configuratiebestand aanmaken
- Start MythTV Setup
- Choose for Video Sources.
- Choose for existing or a new video source
- Listings grabber: The Netherlands (tv_grab_nl_py...)
- Klick Finish
On the prompt
# tv_grab_nl_py --configure
This will create a config file in /homedir/.xmltv/tv_grab_nl_py.conf Edit this config file and clear out all channels you don want (or edit them out) To see is something is happening
#mythfilldatabase -v all --refresh-today
To see what's in the database
- mysql -u mythtv -p mythconverg -e "select chanid, callsign, name, xmltvid from channel;"
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.
VLC
To make VLC player the default player. Goto Utilities/Setup -> SetUp -> Media Settings -> Video Settings -> Player Settings
vlc file://%s vlc://quit
nd change the extensions goto Utilities/Setup -> SetUp -> Media Settings -> Video Settings -> File Types
TV card
- See if the card is working in a MS windows pc with technotrends own software
- Try installing w_scan to do a channel scan the use the configuration file created by importing it into mythtv.
- Recompile the drivers with new source files
- http://mythportal.be/TTBudgetS1500