Some year ago I built my own Lirc device, a home brew transceiver, which I attached to my Linux machine in my hall. Using a somewhat long telephone cable I could place the receiver and transmitter in the living room. The cable is somewhat hidden, so I’m kind of pleased with the installation.
With the infrastructure in place it was time to utilize software. I first just used the terminal to easily send IR-codes, via
irsend. No automation there! I realized I needed an OK remote to be able to control the whole HTPC environment. By using a remote controller having ordinary navigational operations and also the play and record buttons was enough to control all devices accordingly. This is my setup:
| | / IR Receiver +-------------
| |RS232 / \ |
| +----------------+ -- ( | IR Remote
| | \ / |
| |LAN \ IR Transmitter +-------------
| +------. `--------|)
Linux Box \
\ H/K 5500 | .---------------. o |
+--------+ +----------+ | | | o |
| |TV-out | |||| | | | | o |
| +--------->| - - - O |--->| | | |
| | +----------+ | `---------------´ |
+--------+ | +---------------------+
HTPC Computer | Television
5+1 Audio System
The Linux box is where the LIRC device is attached. This box must be configured to receive and transmit IR signals. With a correct LIRC configuration, see below, this can be accomplished.
I usually use Zoom Player for playing media files, because of its nifty full screen file navigator. So my primary target is to control this application
Zoom Player needs to be started when when a certain button on the remote controller is pressed. To achieve this a special agent is used–EventGhost. EventGhost can actually be used to connect to a LIRC server, and controlling Zoom Player, using a downloadable plug-in. Though, I’ve chosen to not use EventGhost as my logic controller. Instead the Linux box will be used as orchestrian, sending commands to desired places, i.e. a push approach, when certain input stimulus (IR signals) is received.
A Phillips PW3818 acts as video display, recieiving the video signal via S-Video.
A The AVR Receiver, H/K 5500, on which the volume and surround emulation must be chosen. Sound is delivered to a 5+1 loudspeaker system.
The Remote Controller
A Logitech Harmony 525 is used as my only remote. I added the XBox360 device to the Harmony. This device will act as the HTPC controller. It has functions for playing as well as recording, and also navigation buttons. More than needed. And it won’t interfere with my existing devices, that is, I don’t own a XBox!
The Xbox360 configuration was added to my
lircd.conf. The controller was included in the big
remotes.tar.gz file. I did have some problom using the the signals sent from the virtual XBox360. It was solved by adding
lircd.conf and the XBox360 device.
lirc.conf also includes the configurations for my television and my AVR. With this configuration I should be able to recieive signals as well as react and trigger transmitting of signals.
The solution is quite elegant. A simple bash script is used to send commands to Zoom Player, via its remote interface. This happens via a FIFO and a a
netcat process, which is run in the background. In case
netcat needs to be started/respawned, it does this automatically. Netcat running as a background process is needed, to let Zoom Player send back responses, on a not closed connection. (If not Zoom Players generates errors.)
Now I only needed to map the XBox commands to call the script with relevant commands, which is done via
lircrc, for example:
remote = Microsoft_Xbox360
button = UpArrow
repeat = 2
prog = irexec
config = /usr/local/sbin/zprpc VK_UP
(More to come)