[mythtv-users] Dish Network Channel Changing Script

Martin Lynch martin.lynch.toronto at gmail.com
Tue Jan 18 04:13:38 UTC 2011


>> >  Date: Mon, 17 Jan 2011 08:18:47 -0500
>> >  From:Jim at Morton.hrcoxmail.com
>> >  To:mythtv-users at mythtv.org
>> >  Subject: Re: [mythtv-users] Dish Network Channel Changing Script
>> >  
>> >  
>> >  On 1/15/2011 1:48 PM, Patrick Marconi wrote:
>>> >  >  Does anyone have a good Dish Network Channel Changing Script, I've
>>> >  >  tried several versions over time and none of them seem to get around
>>> >  >  the problem of getting stuck a t somepoint due to a schedule download
>>> >  >  or just ending up in "Customer Service" mode.
>>> >  >  Patrick
>> >  I use this one -
>> >  http://www.mythtv.org/wiki/dish-change-channel-lirc.sh
>> >  and it works fine. I do sometimes need to change the time at which the
>> >  box is going to check for updates to keep it from ruining a recording.
>> >  That can be done under preferences on the VIP STB. I keep it set for 4am
>> >  usually. I also keep an eye on upcoming recordings and if something is
>> >  going to record at that time I temporarily change the update setting.
>> >  
>> >  Another thing to note with Dish is that the Dish guide can be toggled
>> >  between HD Only, Subscribed Channels and All Channels. You need to set
>> >  it on Subscribed channels and then hide the remote. I learned the hard
>> >  way that if it is set to HD Only and Myth tries to tune a non-HD channel
>> >  it goes the the nearest HD channel and Myth happily records the wrong
>> >  channel.
>> >  
>> >  -- 
>> >  _________________________________________________________
>> >  
>> >     Jim Morton
>> >  
> Jim, I will give this a try I think the included "up channel" command may be the main trick to solve my problems, I'm not sure I will be very successful in changing the program guide download times though due to lack of my own time. I think I might go the opposite route set it at 4am and just not allow anything to be programmed for recording at that time - I wonder if there is a way to make that a rule that mythtv knows about ? BTW your other tips were good to know, the HD/non HD program guide issue hasn't been a problem so far because I have the sat box attached to myth in the basement and is only really used by me, but since I'm trying to make this more available to the rest of the family it could be an issue in the future.
> Patrick
I ran into the same problem re: the bloody update check, which cannot be 
disabled. After monitoring upcoming recordings daily for a while and 
changing recordings or the update time to avoid conflicts, I finally set 
it for 1.59pm. I figure it takes less than a minute to switch off and on 
and begin updating, and at worst I lose the closing credits. I used to 
have it on the hour, and ended up a with a bunch of 2 min recordings of 
the warning box that it was about to shut down. Recording of course 
fails after that. Came uncomfortably close to pitching the STB down 32 
storeys for a number of reasons (lirc, mainly, but the damn updates too).

Here's the script I use - it's modified for my VIP612. Key changes are 
the removal of the "select", originally designed to "wake up" the 
machine, which I found did nothing, and the sleep change from 0.15 to 
1.0, which was essential. I use the USB-UIRT IR Blaster, as I never 
could get the HD-PVR blaster working:

*********************

#!/bin/sh

# This script is provided without any warranty of fitness to whoever
# wishes to use it. It has been used by me for many months with the
# VIP211 receivers. -- Daniel Kristjansson (March 20th, 2008)
# Additional modifications by Martin Lynch to enable use with
# Bell 9241 and Dish Network VIP612. It will likely work with
# other VIP STBs too (Jan 2, 2011).

# If you have a separate IR reciever you will want to give it "/dev/lircd"
# and use something like "/dev/lircd1" for the transmitter.
# If the tranmitter is on a remote LIRC server, use the ip/hostname:port
# with -a to address it.

DEVICE="-d /dev/lircd"
#DEVICE="-d /dev/lircd1"
#DEVICE="-a hostname:port"

# Use dish1, dish2 .. dish16 depending on which id you are using
# Every dish receiver can be assigned a different remote code, so
# that you can have multiple receivers in one room, and controlled
# by the same LIRC transmitter.

REMOTE_NAME=dish

# This is the command passed in from MythTV.

cmd="$1"

# First, leave sleep mode..
# Note: I have commented this out as it did not function correctly and
# appears unnecessary - ML
#irsend $DEVICE SEND_ONCE $REMOTE_NAME select
#sleep 0.3

case $cmd in
     [0-9]*)
     # make sure we leave any encrypted channel..

     # Note: this IR send slows down MythTV LiveTV, if you want faster
     # channel changing in LiveTV remove it. However if someone ever
     # changes to a channel you don't get, either with this script or
     # manually, you need this "up" to leave that channel.

# I likewise commented this out - encrypted channels do not pose a
# problem for a component connection (they certainly do for firewire!) ML

#    irsend $DEVICE SEND_ONCE $REMOTE_NAME up
  #   sleep 0.3

     for digit in $(echo $1 | sed -e 's/./& /g'); do
         irsend $DEVICE SEND_ONCE $REMOTE_NAME $digit
         # If things work OK with sleep 1, try this for faster channel 
changes:
         #sleep 0.15

# I commented out the sleep 0.15 as channel changes did not work
# only the first digit made it through. Increased to 1 second. ML
     sleep 1.0
     done

     # Send a select so that this channel change takes immediately.
     irsend $DEVICE SEND_ONCE $REMOTE_NAME SELECT

     ;;

     *)
         irsend $DEVICE SEND_ONCE $REMOTE_NAME $cmd
         ;;
esac

*********************


-- 

Kind regards,

Martin



More information about the mythtv-users mailing list