Difference between revisions of "Using an IR Blaster with MythTV"

From MythTV Official Wiki
Jump to: navigation, search
(IR Blaster Vendors)
(Configuring Myth Backend)
(39 intermediate revisions by 21 users not shown)
Line 1: Line 1:
 +
{{cleanup}}
 +
 +
 
== Introduction ==
 
== Introduction ==
  
 
The mission: Get MythTV to change channels on my Cable provided STB (Set Top Box). I connected a coax cable from the STB to my caputre card, but with an STB one cannot tune/change  stations using the tuner built into the capture card. The capture card should remain on channel 3, and I need an Infra Red emitter to send signals to my set top box when Myth needs to change channels.
 
The mission: Get MythTV to change channels on my Cable provided STB (Set Top Box). I connected a coax cable from the STB to my caputre card, but with an STB one cannot tune/change  stations using the tuner built into the capture card. The capture card should remain on channel 3, and I need an Infra Red emitter to send signals to my set top box when Myth needs to change channels.
 +
 +
'''N.B. In the UK you can control your Sky or Sky+ box and some of the AUS Foxtel IQ boxes using a [http://www.dusky-control.com/ Dusky Control]'''
  
 
== Hardware ==
 
== Hardware ==
Line 7: Line 12:
 
You can build your own serial port IR emitter very inexpensively or you can buy one.
 
You can build your own serial port IR emitter very inexpensively or you can buy one.
  
* [http://www.mytvstore.com/product_id_004.html MyBlaster] - $45 - $50 - Reportedly very easy to set up and use. It has long range. Does not use lirc. However it is a large item. Scripts for changing the channel on your box included in the Myth contrib directory and are available on SourceForge.  [http://www.mytvstore.com/product_id_004.html Info and purchase here.]
+
* [http://www.irblaster.info/ irblaster.info] - $12 - $15 - inexpensive serial IR blaster similar to what you might build yourself. You stick it with included double sided tape right to the STB pointing at the STB's IR reciever.
 
 
* [http://www.irblaster.info/ irblaster.info] - $12 - $15 - inexpensive serial IR blaster similar to what you might build yourself. [http://www.irblaster.info/ I used this one.] You stick it with included double sided tape right to the STB pointing at the STB's IR reciever.
 
 
 
* DIY - with parts from Radio Shack. Wish I had a good link!
 
 
 
== Recommended IR Blaster HOWTOs ==
 
  
[http://www.eggshellskull.com/index.php Andy's HOWTO] is the easiest to follow, but is Fedora specific. It says Fedora Core 3, however I have used it on Fedora Core 4, and it should work for most Fedorae. It expects that Myth has been setup according to Jarod Wilson's Guide.  
+
* [[MCE_Remote|Microsoft MCE USB remote combo]] - A usb remote and blaster combo. Works very well.
  
A second [http://mythblasterz.gotdns.com/ IR BLASTER HOWTO BROKEN LINK] has been posted to [http://losdos.dyndns.org:8080/public/mythtv-info/IR-BLASTER-HOWTO.html HERE ] with a mirror at [http://mirror.mmdsi.com/losdos.dyndns.org/public/mythtv-info/IR-BLASTER-HOWTO.html]
+
* [http://www.commandir.com/mini/settopboxcontrol/ CommandIR Mini] - A hardware-based USB transceiver supporting multiple IR blasters or "emitters". Can simultaneously control set top boxes and receive remote control commands. Provides a free online MythTV-remote and set-top-box setup tool [http://lircconfig.commandir.com/ LIRC Config].  
This HOWTO is not Fedora specific, but requires recompiling LIRC.  
 
  
If you have a Hauppauge PVR-150, it may include a built-in IR output capability.  See [[Hauppauge PVR-150]].
+
* See the bottom for a growing list of vendors
  
 
== Installing the IR Blaster ==
 
== Installing the IR Blaster ==
Line 31: Line 29:
 
[[Image:geoffholdenhomebrew.jpg]]
 
[[Image:geoffholdenhomebrew.jpg]]
  
You have to load lirc_serial at boot. There are instructions in the links above. The way I do it on Fedora is to edit modprobe.conf. Since you likely also have an IR receiver, such as on the hauppage cards, you need two lirc modules loaded, the lirc_i2c module for the IR receiver, and lirc_serial for the IR emitter. Again please see the details instructions in the links above.
+
You have to load lirc_serial at boot. There are instructions in the HOWto links. The way I do it on Fedora is to edit modprobe.conf. Since you likely also have an IR receiver, such as on the hauppage cards, you need two lirc modules loaded, the lirc_i2c module for the IR receiver, and lirc_serial for the IR emitter. Again please see the details instructions in the links above.
  
 
Once the modules are loaded, you run two instances of the lirc daemon lircd. One instance uses device /dev/lircd0 and the other /dev/lircd1.
 
Once the modules are loaded, you run two instances of the lirc daemon lircd. One instance uses device /dev/lircd0 and the other /dev/lircd1.
 +
{{Note box|lirc_serial.ko has a serious bug in a number of distributions that <nowiki>included Kernels 2.6.{34,35,36}</nowiki> that my prevent it from working. MythBuntu and Ubuntu 10.10 are confirmed to still have this bug as of April 2011. A quick fix is here: http://www.gossamer-threads.com/lists/mythtv/users/477915#477915}}
  
 
== Configuring Myth Backend ==
 
== Configuring Myth Backend ==
  
Instructions in the HOWTO links show you how to make a channel change script. You need to use MythTV setup to tell Myth to use the script to change channels.  
+
Instructions in the HOWTO links show you how to make a [[LircChannelChanger|channel change script]]. You need to use MythTV setup to tell Myth to use the script to change channels.  
  
 
Run the mythtvsetup by opening an X window console and typeing mythtvsetup.  
 
Run the mythtvsetup by opening an X window console and typeing mythtvsetup.  
Line 47: Line 46:
 
You will enter the command for changing channels here. Note the box "Preset Tuner to channel" which says 3. This is important, just as your TV has to be set to channel 3 to recieve signals from the STB, so does your PVR card. Furthermore, I found that this did not work. In order to actually tune my PVR-250 to channel 3 I used this command in my rc.local, which runs after startup:
 
You will enter the command for changing channels here. Note the box "Preset Tuner to channel" which says 3. This is important, just as your TV has to be set to channel 3 to recieve signals from the STB, so does your PVR card. Furthermore, I found that this did not work. In order to actually tune my PVR-250 to channel 3 I used this command in my rc.local, which runs after startup:
  
  iv-tune -c 3 -d /dev/video1
+
  ivtv-tune -c 3 -d /dev/video1
  
 
to change the PVR 250 to channel 3.
 
to change the PVR 250 to channel 3.
Line 59: Line 58:
 
Note that MythTV sends frequency IDs to the external channel changer script and not the channel number.  If you see some weird four/five digit numbers being sent through the IR blaster, you will need to go to the channel editor in setup and change the freqid for the channels to match the ones that you expect to receive through the IR blaster.
 
Note that MythTV sends frequency IDs to the external channel changer script and not the channel number.  If you see some weird four/five digit numbers being sent through the IR blaster, you will need to go to the channel editor in setup and change the freqid for the channels to match the ones that you expect to receive through the IR blaster.
  
'''Note: You can get MythTV 0.20 to send out channel numbers as the parameter. First, get EPG working. Then using, mythtvsetup, channel-editor, remove all your channels. To add the channels again, this time, instead of scanning for channels, get the channel list from the epg service and readd those channels.
+
{{Note box|You can get MythTV 0.20 to send out channel numbers as the parameter. First, get EPG working. Then using, mythtvsetup, channel-editor, remove all your channels. To add the channels again, this time, instead of scanning for channels, get the channel list from the epg service and readd those channels.}}
'''
 
  
 
When using the script and setup at http://losdos.dyndns.org:8080/public/mythtv-info/IR-BLASTER-HOWTO.html  
 
When using the script and setup at http://losdos.dyndns.org:8080/public/mythtv-info/IR-BLASTER-HOWTO.html  
 
*do not* be tempted to change the configure options to set COM1/IRQ4 in the pre-make configuration.  Rather, follow the directions and pass those options through /etc/modules.conf or /etc/modprobe.d/aliases.  
 
*do not* be tempted to change the configure options to set COM1/IRQ4 in the pre-make configuration.  Rather, follow the directions and pass those options through /etc/modules.conf or /etc/modprobe.d/aliases.  
  
Changing the settings at the earlier stage will produce a module that conflicts with the standard lirc (and a frustrating string of errors in dmesg: ledxmit_dev: register_chrdev failed ledxmit_serial: Unknown symbol ledxmit_register_plugin).  
+
Changing the settings at the earlier stage will produce a module that conflicts with the standard lirc (and a frustrating string of errors in [[dmesg]]: ledxmit_dev: register_chrdev failed ledxmit_serial: Unknown symbol ledxmit_register_plugin).
 +
 
 +
== Monitoring STB Status ==
  
 +
As STBs are external devices, it is sometimes difficult to monitor their power state, depending on the make/model of the STB.
 +
 +
Refer [http://evuraan.blogspot.com/2008/01/how-to-ensure-set-top-box-stb-is.html this page] for help to setup a STB monitoring script. For best results,  make your channel changer script first call this, so that it gets unhindered read access to your ivtv device.
  
 
== IR Blaster Vendors ==
 
== IR Blaster Vendors ==
Line 72: Line 75:
 
'''In the USA'''
 
'''In the USA'''
  
[http://mythblasterz.gotdns.com/ Mythblasterz] offer an inexpensive IR blaster with 5+ meter range.
+
*[http://www.irblaster.info/ IRblaster] offer serial port IR blasters, as do:
 
+
*[http://iguanaworks.net/products.psp IguanaWorks] sells long range serial IR blaster & receiver. Also sells Linux-compatible USB IR Trasceivers
[http://www.irblaster.info/ IRblaster] offer serial port IR blasters, as do:
+
*[http://stores.ebay.com/LIRC-and-MythTV-Store LIRC/MythTV] EBay store with interesting IR blaster options. There are some kits for building your own IR transmitters.
 
 
[http://www.mytvstore.com/ MyTVStore] sells the MyBlaster products.
 
 
 
[http://www.iguanaworks.net/ir/ IguanaWorks] also sell IR blasters.
 
  
 
'''In Canada'''
 
'''In Canada'''
  
[http://www.commandir.com/mini/settopboxcontrol/ CommandIR] sells a hardware-based USB multi-blaster.  Available in Canada and the US.
+
*[http://www.commandir.com/mini/settopboxcontrol/ CommandIR Mini] is a hardware-based USB multi-blaster supporting independent control of multiple devices via "emitters"Device receives & blasts simultaneously and they ship globally.  
  
 
'''In Europe'''
 
'''In Europe'''
  
[http://www.dvbshop.net/ Dvbshop.net] sell IR remotes, receivers & blasters
+
*[http://www.dvbshop.net/ Dvbshop.net] sell IR remotes, receivers & blasters
 
+
*[http://www.irtrans.de/en/ IRtrans] sell IR transceivers (combined receiver/blaster) & LAN equipped units too
[http://www.irtrans.de/en/ IRtrans] sell IR transceivers (combined receiver/blaster) & LAN equipped units too
+
*[http://www.redremote.co.uk/serial/ RedEyeRemote] They don't look much, but these IR transmitters work via serial port with NTL PACE and Samsung STBs.
 
+
*[http://www.dusky-control.com/ DuskyControl] This is a USB device which connects to the RF2 port on your Sky or Sky+ box. There is a version with dual outputs to allow control of two boxes.
[http://www.redremote.co.uk/serial/ RedEyeRemote] They don't look much, but these IR transmitters work via serial port with NTL PACE and Samsung STBs.
 
  
 
== HOWTOs ==
 
== HOWTOs ==
  
[http://www.eggshellskull.com/index.php Andy's HOWTO] is the easiest to follow, but is Fedora specific.  
+
*[http://www.eggshellskull.com/index.php Andy's HOWTO] is the easiest to follow, but is Fedora specific.  
 
+
*[http://losdos.dyndns.org:8080/public/mythtv-info/IR-BLASTER-HOWTO.html IR BLASTER HOWTO] with a [http://mirror.mmdsi.com/losdos.dyndns.org/public/mythtv-info/IR-BLASTER-HOWTO.html mirror]. This HOWTO is not Fedora specific, but requires recompiling LIRC.  
[http://mythblasterz.gotdns.com/ IR BLASTER HOWTO BROKEN LINK] has been posted to [http://losdos.dyndns.org:8080/public/mythtv-info/IR-BLASTER-HOWTO.html HERE ] with a mirror at [http://mirror.mmdsi.com/losdos.dyndns.org/public/mythtv-info/IR-BLASTER-HOWTO.html]
+
*[http://ubuntuforums.org/showthread.php?t=890703] Discussion of serial blaster to Motorola Cable box and Dishnet Receiver
This HOWTO is not Fedora specific, but requires recompiling LIRC.  
 
 
 
[[Hauppauge PVR-150]] for built in IR in PVR-150
 
  
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Revision as of 02:16, 23 April 2012

Clean.png Cleanup: This article or section may require cleanup. Discuss the issue on the talk page


Introduction

The mission: Get MythTV to change channels on my Cable provided STB (Set Top Box). I connected a coax cable from the STB to my caputre card, but with an STB one cannot tune/change stations using the tuner built into the capture card. The capture card should remain on channel 3, and I need an Infra Red emitter to send signals to my set top box when Myth needs to change channels.

N.B. In the UK you can control your Sky or Sky+ box and some of the AUS Foxtel IQ boxes using a Dusky Control

Hardware

You can build your own serial port IR emitter very inexpensively or you can buy one.

  • irblaster.info - $12 - $15 - inexpensive serial IR blaster similar to what you might build yourself. You stick it with included double sided tape right to the STB pointing at the STB's IR reciever.
  • CommandIR Mini - A hardware-based USB transceiver supporting multiple IR blasters or "emitters". Can simultaneously control set top boxes and receive remote control commands. Provides a free online MythTV-remote and set-top-box setup tool LIRC Config.
  • See the bottom for a growing list of vendors

Installing the IR Blaster

Irblastersample.jpg

This is the serial IR blaster from irblaster.info

Use the links at the bottom of this page for detailed instructions. You will plug one end of the IR Blaster into a serial port on the Myth backend, and the other side with the diode is pointed at the STB. Normally you put it right over the STB's IR eye as pictured below from Geoff Holden's blog.

Geoffholdenhomebrew.jpg

You have to load lirc_serial at boot. There are instructions in the HOWto links. The way I do it on Fedora is to edit modprobe.conf. Since you likely also have an IR receiver, such as on the hauppage cards, you need two lirc modules loaded, the lirc_i2c module for the IR receiver, and lirc_serial for the IR emitter. Again please see the details instructions in the links above.

Once the modules are loaded, you run two instances of the lirc daemon lircd. One instance uses device /dev/lircd0 and the other /dev/lircd1.

Important.png Note: lirc_serial.ko has a serious bug in a number of distributions that included Kernels 2.6.{34,35,36} that my prevent it from working. MythBuntu and Ubuntu 10.10 are confirmed to still have this bug as of April 2011. A quick fix is here: http://www.gossamer-threads.com/lists/mythtv/users/477915#477915

Configuring Myth Backend

Instructions in the HOWTO links show you how to make a channel change script. You need to use MythTV setup to tell Myth to use the script to change channels.

Run the mythtvsetup by opening an X window console and typeing mythtvsetup.

Once you have defined your input connection, select it and find the following setup page:

Setupconnection.jpg

You will enter the command for changing channels here. Note the box "Preset Tuner to channel" which says 3. This is important, just as your TV has to be set to channel 3 to recieve signals from the STB, so does your PVR card. Furthermore, I found that this did not work. In order to actually tune my PVR-250 to channel 3 I used this command in my rc.local, which runs after startup:

ivtv-tune -c 3 -d /dev/video1

to change the PVR 250 to channel 3.

MyBlaster setup -- does not require LIRC

If you prefer not to have to mess around with LIRC there are alternatives. One of these is the MyBlaster serial. (See the vendor list below.) It is a commercial product but the linux drivers are GPL. The latest driver can be found on SourceForge. To set up, simply edit the perl based driver script for your port and device and call the script using the external channel change script configuration option in mythtv-setup. It is that easy.

Troubleshooting

Note that MythTV sends frequency IDs to the external channel changer script and not the channel number. If you see some weird four/five digit numbers being sent through the IR blaster, you will need to go to the channel editor in setup and change the freqid for the channels to match the ones that you expect to receive through the IR blaster.


Important.png Note: You can get MythTV 0.20 to send out channel numbers as the parameter. First, get EPG working. Then using, mythtvsetup, channel-editor, remove all your channels. To add the channels again, this time, instead of scanning for channels, get the channel list from the epg service and readd those channels.

When using the script and setup at http://losdos.dyndns.org:8080/public/mythtv-info/IR-BLASTER-HOWTO.html

  • do not* be tempted to change the configure options to set COM1/IRQ4 in the pre-make configuration. Rather, follow the directions and pass those options through /etc/modules.conf or /etc/modprobe.d/aliases.

Changing the settings at the earlier stage will produce a module that conflicts with the standard lirc (and a frustrating string of errors in dmesg: ledxmit_dev: register_chrdev failed ledxmit_serial: Unknown symbol ledxmit_register_plugin).

Monitoring STB Status

As STBs are external devices, it is sometimes difficult to monitor their power state, depending on the make/model of the STB.

Refer this page for help to setup a STB monitoring script. For best results, make your channel changer script first call this, so that it gets unhindered read access to your ivtv device.

IR Blaster Vendors

In the USA

  • IRblaster offer serial port IR blasters, as do:
  • IguanaWorks sells long range serial IR blaster & receiver. Also sells Linux-compatible USB IR Trasceivers
  • LIRC/MythTV EBay store with interesting IR blaster options. There are some kits for building your own IR transmitters.

In Canada

  • CommandIR Mini is a hardware-based USB multi-blaster supporting independent control of multiple devices via "emitters". Device receives & blasts simultaneously and they ship globally.

In Europe

  • Dvbshop.net sell IR remotes, receivers & blasters
  • IRtrans sell IR transceivers (combined receiver/blaster) & LAN equipped units too
  • RedEyeRemote They don't look much, but these IR transmitters work via serial port with NTL PACE and Samsung STBs.
  • DuskyControl This is a USB device which connects to the RF2 port on your Sky or Sky+ box. There is a version with dual outputs to allow control of two boxes.

HOWTOs

  • Andy's HOWTO is the easiest to follow, but is Fedora specific.
  • IR BLASTER HOWTO with a mirror. This HOWTO is not Fedora specific, but requires recompiling LIRC.
  • [1] Discussion of serial blaster to Motorola Cable box and Dishnet Receiver