iMON IR receiver and VFD display are used by many producers of cases for HTPC. One of most popular of them is SilverStone. LinuxMCE doesn’t support them from the box but there is a way to add it into system. That howto explains the steps which should be performed to do that.
The driver for iMON IR receiver is included in the LIRC distribution since version 0.7.1. To add it to LinuxMCE you should do following:
- Go to Advanced :: Configuration :: Device Templates, add new manufacture – SoundGraph, add a new template for that manufacture (choose LIRC Remote Control as Device Category)
- In the new template add a property – Configuration and put there LIRC configuration file for iMON PAD, for example, you can use that one – iMON PAD lircd.conf (1708).
- To be able to control MythTV add content of that file – iMON PAD MythTV lircrc (930) into /home/mythtv/.mythtv/lircrc. For VDR replace LIRC section in the remote.conf by this codes remote.conf (818)
- Go to Wizard :: Media Directors and add iMON PAD remote control by pressing the button ‘Add Remote’ on the bottom of the form. After that all needed LIRC packages will be downloaded and installed automatically. You shouldn’t do that manually!
- Quick reload router. You should see running lircd process:
ps -elf|grep lircd
and file /etc/lircd/lircd.conf should contain the content of iMON PAD property Configuration.
- To test you remote control you can use utility irw. Just run it and press a few buttons on the remote. You should see the actual IR command as irw output.
As I mentioned above iMON remote control is supported by LIRC from the box. But to use iMON PAD buttons you have to re-compile LIRC with applied patch LIRC-0.8.1 iMON PAD patch (1565):
tar xvjf lirc-0.8.2.tar.bz2
patch -p1 < ../lirc-imon-pad2keys.patch ./configure make make install
tar -vzxf lirc_0.8.2.orig.tar.gz
patch -p0 < ../lirc_0.8.2-0ubuntu8.diff
patch -p1 < ../lirc-imon-pad2keys.patch
- if you see error message 'dialog not found!' install dialog:
apt-get install dialog
- if you get en error: configure: error: C++ preprocessor "/lib/cpp" fails sanity check install build-essential:
apt-get install build-essential
iMON VFD display
- Download the latest snapshot from venky.ws.
- Untar the tarball:
tar vzxf lcdproc-X.X.X-imon.tgz
- Go to the lcdproc-X.X.X-imon directory, apply this patch Patch for LCDProc-0.4.5 (850) to avoid display good bye message after PC will be switch off.
- Prepare installation:
aclocal && autoheader && autoconf && automake -a
or get already patched version - Patched iMON LCDProc 0.4.5 (769).
./configure && make && make install
- Copy LCDd.conf to /usr/local/etc or modify script /etc/init.d/lcdd to point on LCDd.conf
- Copy Debian scripts to the /etc/init.d:
cp scripts/init-lcdd.debian /etc/init.d/lcdd
update-rc.d lcdd defaultsto create symlinks to start/stop lcd daemon and client.
- Make a symlink:
ln -s /usr/local/sbin/LCDd /usr/local/binif you install LCD in the default path.
The configuration file LCDd.conf contains a set of options for LCDd. Most of them are already defined. So, probably you won't touch that file. However, it might be useful for troubleshooting set following options:
To get more debug information in the /var/log/syslog.
It's also possible to run LCDd from command line:
LCDd -c <config file> -d <driver>
In our case the command should be like that:
LCDd -c LCDd.conf -d imon
Enable VFD display in MythTV
You can find the setup options in Utilities/Setup->Setup->Appearance->LCD device display. Tick the box Enable VFD device and a few options appear. To bring some data to VFD display mythlcdserver should be run.
Enable VFD display in VDR
To be able use VFD display with VDR you have to install plug-in vdr-lcdproc:
- Download and untar somewhere appropriate version of VDR sources (1.4.7 in case of LinuxMCE)
- Download the latest version of vdr-lcdproc plug-in
- Untar it into <your_vdr_src_dir>/PLUGINS/src and make a symlink - ln -s lcdproc-0.0.10-jw2 lcdproc
- Build plug-in: make plugins. Note, for AMD64 you should add option -fPIC to the CXXFLAGS into lcdproc Makefile. Otherwise you'll get this error:
/usr/bin/ld: lcdproc.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
lcdproc.o: could not read symbols: Bad value
- Copy <your_vdr_src_dir>/PLUGINS/lib/libvdr-lcdproc.so.1.4.5 to the /usr/lib/vdr/plugins
- Add a new config file plugin.lcdproc.conf into /etc/vdr/plugins and put there following options:
Where -h defines LCDProc host and -p - LCDProc port (you can find those values in the /etc/LCDProc.conf)
- Restart VDR:
sudo /etc/init.d/vdr restart
Now your VFD display should display information from VDR.
You may use my built package for AMD64 - vdr-plugin-lcdproc AMD64 (722).
Media Director Issue
To compile lcdproc on diskless media director you have install following packages first:
If your remote control or VFD display doesn't work check following:
- LIRCd needs /dev/lirc0 and LCDProc - /dev/lcd0. If you cannot see them then something is wrong.
- Check /var/log/syslog. It can contain an error message about problems with LIRCd config file. This is a common case (at least for me).
- Check connection iMON VFD with USB port. I spent some time to figure out why my remote doesn't work but iMON VFD USB cable was plugged not very well.