Tuesday 22 July 2008

Using the Logitech Harmony 670 remote on Linux

Yesterday I bought the ONE remote to RULE them all. Seriously. The best 100$ investment ever (was on sale).

Anyway, so I brought home my acquisition, proceeded to program it to handle all my electronic equipment in the living room. The only issue was to setup my computer to be able to program the remote. This is how I did it:


  1. Make sure you've got libusb (on Ubuntu, sudo apt-get install libusb-0.1-4) installed. Might also need libusb-dev.

  2. Downloaded two packages:

    • congruity-8.tar.bz2
    • concordance-0.20.tar.bz2


  3. Setup concordance first, for the libconcord library as well as the python bindings for using congruity:


    1. Under the concordance tarball directory, in libconcord/: ./configure --prefix=/usr

    2. Then, make and sudo make install to build the library and install it to /usr/lib

    3. Cd to bindings/python, run python setup.py build and sudo python setup.py install



  4. Now, you can go in the extracted tarball directory of congruity, and run sudo ./congruity. You'll notice that it fails, expecting to be passed a filename on every run. You'll need to go on the members.harmonyremote.com website, create an account (if you don't have one already), then proceed through the various steps. When the site expects you to download an EZHex file, save it and manually start congruity (with sudo or as root, as always), or setup your browser to open the files using something like a little wrapper script that would call, for example, gksudo congruity.
  5. Optionally move the congruity-8 directory (the extracted tarball stuff) to someplace where it can live indefinitely, perhaps somewhere in the path?

The rest of the usage should be pretty straightforward. Once the remote is programmed for your devices, point and click :D

I'll probably be building Ubuntu packages for concordance and congruity, so when those are done I'll write a new post with the links. In the meantime, check my PPA page occasionally at https://launchpad.net/~mathieu-tl/+archive, or in sources.list: http://ppa.launchpad.net/mathieu-tl/ubuntu.

4 comments:

Jared said...

Thanks for this. I was lost at sea until I read your instructions. One thing you didn't mention, though, is that congruity uses wxPython.

Looking forward to having an ubuntu package for this.

Stephen Warren said...

You really shouldn't run congruity as root (or use sudo).

Instead, the README describes how to configure udev to allow regular users access to the USB device node that congruity uses (via libusb).

Whilst I don't know of any security issues in congruity, it's best to be careful.

Matt Trudel said...

ah! you bring a very valid point that I did overlook -- running anything as root is generally dangerous, and running congruity is no exception -- you can't know what may happen. However, I'm not sure whether my package really can (policy-wise) change config under udev rules, which would be the correct way of changing this. In fact, I'm even pretty sure this kind of fix would be frowned upon. In any case, you're right, the README says how to do the necessary changes.

Unknown said...

I greatly appreciate your work Matt. I was very happy to find this blog and your packages. Thanks.
Will you be able to provide packages for karmic soon?