My mythtv server has one infrared receiver because it comes with the pvr-150 card.
My mythfrontend is a different machine that has no infrared receiver.
This is how I pass the infrared signals over the network to control both boxes with one receiver and one remote.I’ve done this 3 times and it’s always a headache to figure out, so I figure i’ll write it down this time.
I’m assuming you’ve already got an infrared receiver, it shouldn’t matter if it’s a pvr-150 or not, and that you’ve got lirc installed and accepting signals on one host.
Reading through the LIRC documentation suggested this could be done, but I haven’t found any tutorials, or even anyone else that’s doing it.
Anyway. On the lirc server. The one that has the infrared reciever working (which can be verified by typing “irw” and pressing buttons on the remote) we have to start lirc with the –listen option.
This may vary between different versions of lirc and different distros.
On my debian server, I manually edited the /etc/init.d/lircd file, and modified this line:
start-stop-daemon –start –quiet –exec /usr/sbin/lircd — –listen
by adding –listen to the startup script, lirc opens up a port and listens for client connections. I found out later that it’s better to edit /etc/lirc/hardware.conf and add “–listen” to the LIRCD_ARGS variable. Either way works. The second is cleaner.
So now LIRC is listening for client connections on the server that has the infrared reciever.
On my mythfrontend, which is now running on ubuntu studio, I installed lirc, copied the lircd.conf file for my remote to /etc/lirc and set the /etc/lirc/hardware.conf LIRCD_ARGS to LIRCD_ARGS=”–connect=ip.of.the.server”.
After doing that and tring to run lirc, I noticed irw wasn’t working. And here is what it said in the messages file:
Jul 17 18:03:37 cambridge lircd-0.8.2-CVS: lircd(userspace) ready
Jul 17 18:03:37 cambridge lircd-0.8.2-CVS: connected to 192.168.0.102
Jul 17 18:03:40 cambridge lircd-0.8.2-CVS: accepted new client on /dev/lircd
Jul 17 18:03:40 cambridge lircd-0.8.2-CVS: could not open /dev/lirc
Jul 17 18:03:40 cambridge lircd-0.8.2-CVS: default_init(): No such device or address
Jul 17 18:03:40 cambridge lircd-0.8.2-CVS: caught signal
So, even though it was connected to my lirc server, it was still trying to access a raw infrared device at /dev/lircd.
To resolve this, I set the lirc driver to NULL in /etc/lirc/hardware.conf.
After that, I can control my frontend by passing infrared signals to my backend.
This is obviously useful for MythTV, but think of all the possibilities… data centers can assign commands to infrared signals. Reboot boxes with a remote control.. anything. All with one remote and one infrared receiver.