[mythtvnz] what lircd.conf to use for TelstraClear remote?
Hadley Rich
mythtvnz@lists.linuxnut.co.nz
Fri, 9 Feb 2007 09:31:48 +1300
On Fri, 09 Feb 2007 09:19:04 Duncan Kennington wrote:
> For reference, my channel changing script is:
>
> #!/bin/sh
> REMOTE_NAME=sky
> for digit in $(echo $1 | sed -e 's/./& /g'); do
> /usr/local/lirc-ledxmit/bin/ledxmit-irsend SEND_ONCE $REMOTE_NAME $digit
> sleep 1.3
> done
>
> (the sleep is important - depending on the decoder this can be adjusted
> down - 1.3 is slow, but always works. I found 0.8 would have 20 sometimes
> change to 2 instead)
Here's mine;
#!/usr/bin/python
import os, sys
#import time
try:
channel = sys.argv[1]
except:
print "Usage: change_chan.py NUMBER"
sys.exit()
else:
if len(channel) == 1:
channel = "00%s" % channel
if len(channel) == 2:
channel = "0%s" % channel
for number in channel:
os.system('/usr/local/lirc-ledxmit/bin/ledxmit-irsend
SEND_ONCE DTH335 %s' % number)
Python is overkill but I use it for other stuff so it's on there anyway. My
Skybox (Motorola) doesn't seem to care about how fast you send the digits so
there's no sleep. Also sending all three digits is faster for me as the Sky
box then doesn't have to pause when you are finished waiting for more input.
hads
--
http://nicegear.co.nz
New Zealand's VoIP supplier