[mythtvnz] LIRC
Robin Gilks
g8ecj at gilks.org
Mon Jul 2 08:33:35 BST 2012
> Hi there,
>
> I've got a Hauppage capture card and an IR blaster that I'm working
> through
> setting up. Both sending and receiving using IR.
>
> Can someone point me in the direction of some general resources about
> LIRC,
> as I feel like I'm chasing my own tale engaging in Google searches. Or,
> and
> this is the beautiful dream, maybe one of you has had success with this
> hardware configuration.
>
> *Capture card: model 01288:* WinTV-HVR-1150
> IR Blaster from here: http://www.irblaster.info/
> OS: 32bit Ubuntu 10.04 with MythTV installed through Synaptic
>
> I've got as far as being able to get channel listings using some PHP I put
> together, I can also capture TV/Audio from S-Video or Composite, and the
> recording works good.
>
> I've got a TeletraClear STB and I want to be able to change channel on
> there using the IR Blaster.
>
> And it would be neat if the supplied IR receiver/remote control combo
> could
> work.
>
> Warm regards
> Rock (not his real name)
Here is my channel change script - it ties into the name of the remote for
the STB (SKY in my case) that is defined in /etc/lirc/lircd.conf (the
exact location of this file varies from system to system).
--------------------------------------
#!/bin/sh
REMOTE_NAME=sky
cmd="$1"
DEVICE=/dev/lircd
/usr/bin/irsend SET_TRANSMITTERS 1
case $cmd in
[0-9]*)
for digit in $(echo $1 | sed -e 's/./& /g'); do
/usr/bin/irsend -d $DEVICE SEND_ONCE $REMOTE_NAME $digit
# If things work OK with sleep 1, try this for faster channel
changes:
# sleep 0.3 or faster
sleep 0.1
done
;;
*)
/usr/bin/irsend -d $DEVICE SEND_ONCE $REMOTE_NAME $cmd
;;
esac
--------------------------------------
The remote name is the bit that defines the codes the STB remote uses -
the lircd.conf file can have definitions for several remotes in it, you
just have to refer to them by name.
--------------------------------------
begin remote
name sky
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 9139 4359
one 708 1536
zero 708 409
ptrail 702
repeat 9140 2115
pre_data_bits 16
pre_data 0x213C
gap 107822
min_repeat 1
toggle_bit 0
begin codes
1 0x0000000000000CF3
2 0x000000000000946B
etc etc etc
--------------------------------------
The numbers that Myth sends to the script are the numbers on the 3rd
screen of the channel edit screens in mythtv-setup (option 6) and can be
different to the number used on the frontend that chooses the channel.
--
Robin Gilks
More information about the mythtvnz
mailing list