I had to use an external channel changer script as I moved to use the ir blaster of my Hauppauge PVR 150.
Shortly thereafter I found that myth is calling the channel-changer script with some weird parameters. For instance,
to change to channel 18, it would evoke the script with an argument of 34590 or so. (Now, try changing your STB
to channel 34590, you will know how it was barfing.)
I am blaming my DB schema (2 years old).
Anyways, here's the script that fixes this problem. Save this as /usr/local/bin/change-channel.sh, chmod it, and
let mythtv-setup know.
You can also wget this script:
wget http://malayalam.homelinux.net/evuraan/change-channel.sh.txt -O /usr/local/bin/change- channel.sh
Lets cut the chase, here's the script:
#! /bin/bash
coin="$@"
REMOTE_NAME="blaster"
say="/usr/bin/logger -p info -t mythchannel"
user="mythtv"
pass="mythpassword"
flip_it() {
for digit in $(echo $score | sed -e 's/./& /g'); do
irsend SEND_ONCE $REMOTE_NAME "$digit"
$say "`date` coin is $coin, score is $score, digit is $digit"
done
sleep 2
}
if [ -z "$coin" ]
then
RET="1"
else
bb="`echo " mysql -u $user -p $pass -Ee 'select channum from channel where freqid="$coin" ' mythconverg"`"
[ ! -z "$bb" ] && score="`(echo "$bb")| sh|grep channum|awk {'print $2'}`"
fi
if [ -z "$score" ]
then
RET="1"
else
flip_it
RET="0"
fi
exit $RET
A few things, mostly technical notes...
Monday, January 07, 2008
External Channel changer script which looks up channum against freqid
Subscribe to:
Post Comments (Atom)
സൂചിക::Index
-
►
2005
(25)
-
►
April
(8)
- GandhiCon 3 ? M$ to Support Linux in Virtual Serve...
- IE, like FireFox to support Tabbed Browsing too?
- Does Linux LVM support alternate PV links?
- Setting up ssh equivalency between Linux hosts
- Second field in /etc/shadow explained.
- CNET.com --- stupid, mindless IT journalism.
- Microsoft Corp. v. Zamos (Goliath .v. David)
- Gmail grows and Gmail ROCKS..!!
-
►
February
(11)
- How RAM is used in Linux
- RHEL ES 4.0 release 1 -- miseries while kickstarti...
- Auto-finding your hard drives for Linux Kickstart
- How to read Malayalam newspapers using FireFox
- How to turn on rsh and rlogin on RedHat Enterprise...
- Addressing IDN Spoofing on Firefox...
- Debug flags for sendmail
- Debugging check_rcpt (Anti-Relay)
-
►
April
(8)

This work is licensed under a Creative Commons License.
0 comments:
Post a Comment