[mythtv-users] Adding a second IR controlled Dish Receiver

stephen mythmail at nb.sympatico.ca
Tue Dec 21 18:59:28 UTC 2004



Joel Anderson wrote:

>>Hi Everyone,
>>
>>How would I add a second Dishnetwork receiver?
>>
>>I currently have a mythtv 0.16, FC1, pvr-250, homebrew IR blaster. A friend
>>of mine is giving me his old dish receiver and I'd like to add it to my system.
>>I have the current receiver setup with 2 instances of lirc, one controlling
>>Myth and the other controlling the receiver. I'm assuming I need another
>>instance of lirc to control the second receiver. I plan on buying another
>>pvr-250, building another IR blaster and adding the second receiver to my
>>account.
>>
>>1.) How do I set that up?
>>2.) How does mythtv know which instance to use for which receiver?
>>3.) Is this even possible or is it more work than it's worth? I'd REALLY
>>like the ability to watch/record 2 things at the same time.
>>
>>On another note, is it possible to also add the ability to record "off-air"
>>programs that aren't the same as what's in the program guide? There are a
>>lot of local channels that I can get off-air around here that dish doesn't
>>carry.  I know I can add another tuner/guide to the PVR, but do the
>>channels have to be the same or is mythTV smart enough to know which tuner
>>carries which channels?
>>
>>Any help/advice would be much appreciated.
>>
>>Thanks,
>>--Pete
> 
> 
> There is a big howto for setting up another instance as you mention,
> sorry I don't have the link handy but it has been posted many times if
> you check the archives.
> 
> IIRC, you can change the remote codes for the dish receivers, so you
> can use one blaster to control more than one.  The basics seemed to be
> programming the second remote and receiver for the alternate codes,
> learning them for your lirc config, mod or add a new channel change
> script that uses the new remote.
> 
> I haven't tried it myself, but I will help my friend with a simliar
> setup in the new year that will include 2-3 StarChoice receivers which
> apparently can be done similarly.
> 
> Sorry I don't know where I read all this, it was a while ago.  Someone
> please correct me if my memory is mistaken.  :)
> 


I can confirm that switching the remote codes with StarChoice receivers 
seems to work -- I'm doing that now.  Well, sort of, but more on that 
later.  I can use one IR blaster to change channels on multiple 
receivers, and since I have only one serial port on my computer it works 
out pretty good.  With the additional receiver(s) set to alternate code 
sets, only one of them will change channels.

Regarding lirc, there is no need for more than one instance for 
transmitting to multiple receivers.  Just add a new "begin remote"/"end 
remote" section in the lircd.conf file.  (An example can be found here: 
  http://lirc.sourceforge.net/remotes/motorola/IRC442 )

Also, you don't need additional channel change scripts either.  All 
that's needed is to modify the existing one to take an extra argument 
that specifies which remote's codes need to be sent.  For example, here 
is what the pertinent parts of my script look like:

=====================================================

#!/bin/sh
# remote name is $1
# new channel is $2

for digit in $(echo $2 | sed -e 's/./& /g'); do
   /usr/local/lirc-ledxmit/bin/ledxmit-irsend SEND_ONCE $1 $digit
   sleep 0.3
done

=====================================================

The first argument is the remote name as defined in my 
/etc/ledxmitd.conf file (I used the how-to found here: 
http://losdos.dyndns.org:8080/public/mythtv-info/MythTV_DISH_IR_LED_TX_via_Modified_LIRC.html 
).  I hard-code that name in the mythbackend setup screen for "Input 
Connections".  I can't recall the exact setting name, but it is similar 
to "External Channel Script".  Since the first argument sent by MythTV 
in that particular setting is the channel, appending a remote name right 
after the channel change script effectively bumps the channel to be the 
2nd argument.  In my mythconverg db, the "externalcommand" column in the 
"cardinput" table now has a value of "/usr/local/bin/dish_chan.sh 
StarChoice301_1" (obviously this will be different for each input card).

So, one blaster, one channel change script, and one instance of lirc for 
transmitting should be able to handle multiple receivers.  If you are 
also receiving IR signals you may need to run a 2nd instance of lirc, 
but I could be wrong.  (For me, it's just easier to run two separate 
instances.)

However, as I mentioned above, I'm only sort of doing it now.  The only 
issue I'm having is that I don't yet have a way to get the alternate 
codes into a lircd.conf file.  I found one for the default codes here ( 
http://lirc.sourceforge.net/remotes/motorola/IRC-442 ), and they work 
great.  Now I'm just waiting for a couple of parts to come in so I can 
build a home-brew receiver and get the alternate codes.

Stephen



More information about the mythtv-users mailing list