Logitech Harmony and VDR

Logitech Harmony 555

Recently discovered that popular series of Logitech’s remote controls Harmony has IR codes to control Video Disk Recorder (VDR) box. To get them to your device just download new remote using Logitech software choosing type PVR, producer KLS and model VDR. Also you can use this config file for LIRCd. Have fun!

[via VDR Wiki]

Control MythTV with CommandIR 2

CommandIR II

CommandIR 2 – a second generation of hardware extension for Linux media PC’s, was reviewed on the MythPVR.com. It allows to control Linux box itself and any A/V equipment via IR. The CommandIR 2 is equiped by four independently controlled IR blasters, on-board IR receiver, wired IR receiver (optional), six software controllable LEDs (they can be used to indicate something like starting recording, high level of system load etc) and USB port to connect the PC.

The CommandIR 2 is design specially for Linux. MythTV supports it from the box. But for other Linux distributions the CommandIR 2 can be configured manually.

The CommandIR 2 seems very interesting devices to extend control of home entertainment system. It’d be nice to add it into LinuxMCE since it already supports GC100, IRTrans USB, Tira-2.1 and USB-UIRT.

[via MythPVR.com]

Nokia770/N800 as smart remote control

Nokia770-OS2007

Using Nokia770 or its next generation N800 is limited just your imagination and a little bit of hardware issue. The new Maemo application Ir Remote Control can be a good confirmation of that. The application gives a easy way to use Internet Tablet as remote control for your A/V equipment and home appliance.

The first versions of the Ir Remote Control used a dedicated PC with running LIRC server there. The latest one has its own LIRC back-end and supports IR Trance Ethernet to send IR command via LAN.

Basically, the Ir Remote Control uses LIRC client library to send desired command:

netirsend --server 'localhost' --port '8765' 'SEND_ONCE' 'Yamaha_RAV16' 'Vol+'

where
– server – IP address or service name where LIRC is running;
– post – LIRC server port;
– SEND_ONCE – LIRC directive, can be also SEND_START and SEND_END;
– Yamaha_RAV16 – the name of remote supported by LIRC (the command LIST can be used to get the list of all remotes);
– Vol+ – desired command, in that case – increasing of volume.

So, using Nokia770 or N800 together with IT Trance Ethernet and Ir Remote Control gives you an elegant and efficient way to control your IR stuff.

Configure iMON PAD/VFD in LinuxMCE

iMON PAD and VFD

Preface

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.

iMON PAD

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:

  1. Go to Advanced :: Configuration :: Device Templates, add new manufacture – SoundGraph, add a new template for that manufacture (choose LIRC Remote Control as Device Category)
  2. 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 (1707).
  3. 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 (816)
  4. 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!
  5. 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.
  6. 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
CD lirc-0.8.2
patch -p1 < ../lirc-imon-pad2keys.patch ./configure make make install

  • download sources of LIRC 0.8.2 and diff file from Ubuntu site.
  • untar LIRC sources and apply diff to build the package:
    tar -vzxf lirc_0.8.2.orig.tar.gz
    CD lirc-0.8.2
    patch -p0 < ../lirc_0.8.2-0ubuntu8.diff
  • Apply iMON PAD patch:
    patch -p1 < ../lirc-imon-pad2keys.patch
  • Build the package:
    dpkg-buildpackage -rfakeroot
  • Note:

    • 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

    Note: the LCDProc includes supporting of iMON VFD display since version 0.5.0. You shouldn't compile it from the sources just install LCDProc using apt-get -
    sudo apt-get install lcdproc
    and define imon driver in the LCDd.conf.
    • 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 (848) 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).
    • Run ./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
      and run update-rc.d lcdd defaults to create symlinks to start/stop lcd daemon and client.
    • Make a symlink: ln -s /usr/local/sbin/LCDd /usr/local/bin if 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:
    ReportLevel=5
    ReportToSyslog=yes

    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:
      -h 127.0.0.1
      -p 13666

      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
    Note: if by some reason you don't have VDR sources just install VDR headers:
    sudo apt-get install vdr-dev
    apply that patch - LCDProc VDR Plugin (669) to the vdr-lcdproc sources
    CD lcdproc-0.0.10-jw2
    patch -p0 < ../lcdproc-0.0.10-jw2-package.diff
    and build the package
    dpkg-buildpackage -rfakeroot
    Then install created package and restart VDR.

    Now your VFD display should display information from VDR.

    You may use my built package for AMD64 - vdr-plugin-lcdproc AMD64 (721).

    Media Director Issue

    To compile lcdproc on diskless media director you have install following packages first:

    • gcc
    • libc6-dev
    • kernel-headers
    • libncurses5-dev
    • dialog

    Troubleshooting

    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.

    See also