Contents
External Tuner
For situations where an external tuner i.e. a cable box or satellite receiver is being used. Channel changes are made by either executing an external application or by sending IR events.
Motorola DCT6200 Series Set Top Box
If you have a Motorola DCT6200 cable box and a firewire cable, you can use the dct6200wrapper external tuner plugin to change the channels on the set top box. It can be downloaded from the Add-Ons section of the main freevo website: http://freevo.sourceforge.net/addons/index.php?action=downloadfile&filename=dct6200.tgz&directory=Plugins. There is also a short write up and download available here DCT6200 Firewire Tuner for Freevo.
Installation
- Untar the archive downloaded above somewhere:
tar xzf dct6400.tgz
- Follow the instructions in the INSTALL file.
Configuration
- Add the following to your local_conf.py file (please refer to the INSTALL file):
DCT6200_COMMAND=/path/where/you/installed/6200ch DCT6200_ARGS="-p 0 -n 1" (if you need to override the port and/or node number that is compiled into the 6200ch program) plugin_external_tuner = plugin.activate('tv.dct6200wrapper')
Make sure you have configured Freevo to use an external tuner. You will need a VIDEO_GROUPS setting something like the following:
VIDEO_GROUPS = [ VideoGroup(vdev=TV_DEVICE, adev=AUDIO_DEVICE, input_type='tuner', tuner_type='external', input_num=4, tuner_norm=CONF.tv, tuner_chan=3, tuner_chanlist=CONF.chanlist, desc='IVTV Video Group', group_type='ivtv', recordable=True), ]
The above settings work for an WinPVR-250 card using the ivtv drivers. The important parts are the tuner_type='external' setting and the input_num setting. The tuner_type must be set to 'external' in order to ensure the external tuner plugin gets invoked. The input_num setting controls which input of the WinPVR card is receiving the signal from your cable set top box. For my particular card and using the coaxial cable input of the WinPVR card, input_num happens to be 4.
That's it. As long as the firewire port on your set top box is active, Freevo will change the channel when recording a show or selecting a channel from the program guide. However, trying to change channels while watching a current show does not work. In this situation, you have to exit back to the tv guide and select the new channel for viewing.
Troubleshooting
The main problem with using the firewire port of your Motorola set top box is that it may not be on. Check out this web page: DCT6200 Firewire Tuner for Freevo for some tips and links to get help.
Motorola DCT2XXX Series Set Top Box
If you have a Motorola DCT2XXXX (eg, DCT2224) and a serial cable, you can use the dct2xxx external tuner plugin to change channels on the set top box. It can be downloaded from the Add-Ons section of the main freevo website: DCT2XXXSerialTuner.
Prerequisites
- Install pySerial into your python runtime. If you use Debian and used apt-get to install python, you can use apt-get to install pySerial as well:
apt-get install pyserial
- Make sure you are running Freevo version 1.5.2 or above.
Installation
- Extract the serialtuner.tar.gz archive (included in the gzipped tar file you can download using the link above) into your python runtime's site-packages directory.
- Copy the dct2224serial.py file into your Freevo installation's freevo/tv/plugins directory. This directory could be in many places, depending on how you installed freevo. For Debian and apt-get, the above directory can be found in /usr/lib/python2.3/site-packages.
Configuration
- Add the following line to your local_conf.py file:
plugin_external_tuner = plugin.activate("tv.dct2224serial")
Make sure you have configured Freevo to use an external tuner. You will need a VIDEO_GROUPS setting something like the following:
VIDEO_GROUPS = [ VideoGroup(vdev=TV_DEVICE, adev=AUDIO_DEVICE, input_type='tuner', tuner_type='external', input_num=4, tuner_norm=CONF.tv, tuner_chan=3, tuner_chanlist=CONF.chanlist, desc='IVTV Video Group', group_type='ivtv', recordable=True), ]
The above settings work for an WinPVR-250 card using the ivtv drivers. The important parts are the tuner_type='external' setting and the input_num setting. The tuner_type must be set to 'external' in order to ensure the external tuner plugin gets invoked. The input_num setting controls which input of the WinPVR card is receiving the signal from your cable set top box. For my particular card and using the coaxial cable input of the WinPVR card, input_num happens to be 4.
That's it. As long as the serial port on your set top box is active, Freevo will change the channel when recording a show or selecting a channel from the program guide. However, trying to change channels while watching a current show does not work. In this situation, you have to exit back to the tv guide and select the new channel for viewing.
Troubleshooting
The main problem with using the serial port of your Motorola set top box is that it may not be on. Check out this web page: DCT2XXXSerialTunerHome for some tips and links to get help.
EchoStar Satellite Box
System: Haupauge PVR 350 with remote and Bell Express Vu Satellite.
Building Lirc
Lirc has two jobs on my system:
- Receive signals from the Hauppauge remote to pass on to Freevo
- Transmit IR signals to my satellite box so that Freevo can change channels.
In MythTV DISH IR LED TX via Modified LIRC they suggest modifying lirc build files to produce a "lirc-transmit" mdoule that won't interfer with your regular lirc receiving module. I haven't done this.
Since I use Gentoo I followed the similar, but simpler, advice found at use multiple lirc drivers simultaneously. Basically you build two lirc modules (lirc-hauppauge and lirc-serial) one after the other. Then you modify your init scripts to start both modules instead of the regular lirc init.
HACKS: The kernel had already grabbed control of my com port and therefore regular loading of lirc-serial fails. To get around this I call setserial in my local start script and then modprobe lirc-serial explicitly. I also make sure dev/lirc1 is writeable for everyone. These hacks can likely be worked around by configuring your kernel/bios to not grab the com port and by setting up devfs/udev/pam to grant the correct permissions for lirc1. I haven't done this yet.
# file /etc/conf.d/local.start # This is a good place to load any misc. # programs on startup ( 1>&2 ) # let go of the serial port and THEN load lirc_serial /bin/setserial /dev/ttyS0 uart none /sbin/modprobe lirc_serial /bin/chmod 666 /dev/lirc1
Important: My init script for lirc-serial includes a niceness parameter (-N -10), this was necessary to get channel changing to work reliably. The whole init script for lircd-serial looks like:
start() { ebegin "Starting lircd serial" start-stop-daemon --start --quiet -N -10 -p /var/run/lircd-serial.pid -a /usr/sbin/lircd -- -o /dev/lircd1 -d /dev/lirc1 -p 777 -P /var/run/lircd-serial.pid eend $? } stop() { ebegin "Stopping lircd serial" start-stop-daemon --stop --quiet -p /var/run/lircd-serial.pid eend $? }
Configuring LIRC for Transmit/Blasting
1) First set up up the recieving side, see Lirc
2) Install your IR blaster hardware (I bought one from irblaster it works great).
3) Configure /etc/lircd.conf for your transmit codes.
I started with echostar 3100. Make sure you can at least turn your tuner box on and off with irsend, e.g., irsend -d /dev/lircd1 SEND_ONCE <your_remote> power
I used the following script to test channel changing from the command line:
remote=3100_2 /usr/bin/irsend -d /dev/lircd1 SEND_ONCE $remote $1 sleep 0.3 /usr/bin/irsend -d /dev/lircd1 SEND_ONCE $remote $2 sleep 0.3 /usr/bin/irsend -d /dev/lircd1 SEND_ONCE $remote $3 exit 0
Note: I tweaked the original 3100 settings until I got better response.
4) Configure Freevo
First setup your video group in local_conf.py for an external tuner, e.g.,
VIDEO_GROUPS = [ VideoGroup(vdev='/dev/video0', adev=None, input_type = 'tuner', input_num=6, tuner_norm='NTSC', tuner_type='external', desc='ExpressVu', group_type="ivtv", recordable=True) ]
Next configure a pluging for channel changing:
# plugin for ir blasting for channel change plugin_external_tuner = plugin.activate('tv.irsend_generic2', args=('/usr/bin/irsend -d /dev/lircd1 SEND_ONCE 3100_2'))
HACK: I couldn't get tv/irsend_generic or irsend_echostar to work for me so I hacked irsend_generic to mimic the behaviour of my send script. I called it irsend_generic2.
NOTE: the name of the variable, plugin_external_tuner, seems to be important for recordserver (oddly enough it doesn't seem to be important for watching TV).
Troubleshooting
First make sure lirc works for both transmitting and receiving outside of Freevo.
- Depending on your system you may have tweak:
- the niceness of of lirc-serial
- the time between irsend commands (the sleep)t
- the actual lircd.conf parameters
HDHomeRun
Setting up the HDHomeRun is slightly different than for the other tuners. Accordingly, I provide below a rough guide including configuration files that work in Melbourne, Australia. I have not limited the configuration steps to the tuner itself, as it seems that it would be useful to have one place within the Wiki where the steps for the HDHomeRun are brought together.
You may need to modify the examples to make them work in your area.
Create an XMLTV File
I used Shepherd to obtain an XMLTV file. For reference, my XMLTV file ended up at the path /home/freevo/.shepherd/output.xmltv.
Tell Freevo about the file that you created
You will need to give Freevo information about the XMLTV file that you made. To do this, you will end up placing text similar to the following in the file /etc/freevo/local_conf.py. The setting XMLTV_FILE just refers to the location that you places the XMLTV file you created immediately above.
The remaining material is created using a combination of Freevo and the HDHomeRun utilities.
XMLTV_FILE="/home/freevo/.shepherd/output.xmltv" TV_CHANNELS = [ ( '7hd.shepherd.au', '7HD', '177500000.1332' ), ( '7two.shepherd.au', '7TWO', '177500000.1330' ), ( 'abchd.shepherd.au', 'ABC HD', '226500000.560' ), ( 'abc1.shepherd.au', 'ABC1', '226500000.561' ), ( 'abc2.shepherd.au', 'ABC2', '226500000.562' ), ( 'abc3.shepherd.au', 'ABC3', '226500000.564' ), ( 'go!.shepherd.au', 'GO!', '191500000.1074' ), ( 'nine.shepherd.au', 'Nine', '191500000.1072' ), ( 'ninehd.shepherd.au', 'Nine HD', '191500000.1073' ), ( 'onedigital.shepherd.au', 'One Digital', '219500000.1592' ), ( 'onehd.shepherd.au', 'One HD', '219500000.1585' ), ( 'sbshd.shepherd.au', 'SBS HD', '536500000.789' ), ( 'sbsone.shepherd.au', 'SBS ONE', '536500000.785' ), ( 'sbstwo.shepherd.au', 'SBS TWO', '536500000.786' ), ( 'seven.shepherd.au', 'Seven', '177500000.1328' ), ( 'ten.shepherd.au', 'TEN', '219500000.1589' ) ]
As I've hinted above, you can obtain much of the content of the above block by executing the following command:
freevo tv_grab --query
However, you should notice that you do not have the numbers for the third item of each tuple in the list above. The automatically generated output from Freevo may have zeroes in that location. In order to make Freevo work, you will need to fill in these numbers.
To do so, first obtain the numbers by executing the following commands:
# Install the utilities if you don't have them. apt-get install hdhomerun-config # Find out the ID of your HDHomeRun. hdhomerun_config discover # Ask your HDHomeRun to tell you about the channels it sees. hdhomerun_config <id> scan <tuner> scanfile
You will obtain output that includes something similar to the following:
SCANNING: 191500000 (au-bcast:7) LOCK: t7qam64 (ss=85 snq=81 seq=100) TSID: 0x0430 PROGRAM 1072: 9 Nine Digital PROGRAM 1073: 90 Nine Digital HD PROGRAM 1074: 99 GO! SCANNING: 184500000 (au-bcast:6) LOCK: none (ss=84 snq=0 seq=0) SCANNING: 177500000 (au-bcast:5) LOCK: t7qam64 (ss=84 snq=83 seq=100) TSID: 0x0503
Use this information to fill in the list that Freevo generated for you above, for example, there is a line in my list above that reads:
( 'nine.shepherd.au', 'Nine', '191500000.1072' ),
I made this line by taking the Frequency number given to me by HDHomerun_config (191500000) and appending the program number for Nine Digital (1072). The two numbers are separated by a dot.
HDHomeRun as DVB
An alternate method of using a HDHomeRun tuner is with dvbhomerun package
This module and utilities make a HDHomeRun dual tuner look like 2 DVB tuners.
Either Ubuntu packages, or source.
http://sourceforge.net/apps/trac/dvbhdhomerun/
http://sourceforge.net/apps/trac/dvbhdhomerun/wiki/UbuntuPackages
Your TV Channels will be as usual for DVB-T TV eg
TV_CHANNELS = [ ( 'abcnews24.free.au' ,'ABC News 24' , 'ABCNews24' ), ( 'abc1.free.au', 'ABC1' , 'ABC1' ), ( 'abc2.free.au', 'ABC2', 'ABC2' ), ( 'abc3.free.au', 'ABC3', 'ABC3'), ]
with a correct channels.conf in your .mplayer directory
eg
ABCNews24:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:516:654:672 ABC1:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:512:650:673 ABC2:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:513:651:674 ABC1:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:512:650:675 ABC3:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:514:652:676
PleaseUpdate: Howto set up other external tuners (eg, IR Remotes) properly.