Harmony software for Linux is here!
July 17th 2007 @ 3:03 am Tech

That’s right, as promised, there is now (rough) code to program your harmony in Linux! I can’t take credit for making it work. Kevin Timmerman did all the reverse-engineering to make it work, so much of the code is his. My contributions have been cleanup, de-windows-ifications (the code works in Windows and Linux, but was originally written for Windows), and various readability improvements. So the hard stuff like “oh, we need to send 0xA3 0x04” is Kevin. Like any of us, Kevin was hurrying to make it work, so clean-ups like “hmm, lets move those to defines” is me.

In the next few days, all this code will be checked into source-code control on SourceForge (or similar).

In the meantime, there isn’t a help message, or a whole lot of documentation. Compiling it (there are instructions for this!), and running “harmony <file>” where <file> is what you downloaded from the harmony site, should do the trick though.

Currently it can do a Connectivity Test, update the remote’s program, and even learn IR codes from other remotes! A lot of UI and documentation work will come in the next few weeks – this just gets the code out there!

The code can be found here! This version is the latest I received from Kevin plus a cleanups and documentation from me.

By the time you read this, Kevin and I will both have plenty of changes pending. We are definitely looking for help and contributors, but I encourage you all to wait a week or so until we get this into public source-code control, and get some of our pending changes in. That should make it easier for us to apply patches and easier for you to not write patches we’ve already checked in.

Still no word from Logitech.

Update 1: I’ve applied for a sourceforge project. Hopefully that will get approved tomorrow. I’ve also released version 0.7 as well. This starts to factor out the very large main loop, adds a –help option, converts the code to use getopt, and adds some more documentation. Enjoy!

Update 2: Version 0.8! Finished factoring out harmony.cpp. Now we can do some neat things to make the UI better. Added a TODO file with some thoughts on the two possibilities for the new UI. Fixed up the help output. Added a few error messages. SF project not approved yet, but I’ll probably wait to make UI changes until I have that so I can use source-code control. Also, I’m not clear how cross-platform getopt is. We may need to include it in the distribution. Don’t think anything good is included with Windows for this.

Update 3: Version 0.9! Wow, we’re trucking along! This contains a bug fix (one of my changes caused filenames on the command line to get lost) and Windows getopt compatibility from Kevin. I did the UI re-write (finally), more re-factoring, and a much more verbose –help message. Finally, Kevin added a small program called ‘snoop’ which takes SnoopyPro XML output and converts it to a text file with interpreted Harmony commands! Hopefully SourceForge will approve our project tomorrow.

Update 4: Our SF project was approved! See my recent post for details!

-phil
rss 11 comments
  1. July 17th, 2007 | 2:43 pm

    This is the only reply I’ve received from Logitech so far. What is interesting is that I didn’t ask them to provide Linux drivers, but rather to offer you assistance / specs so that the OSS community could develop the Linux support for them.

    -Ilan

    —–

    Hi Ilan,

    I did speak with the Harmony team, and they said that at this time we do
    not support any versions of Linux operating system. Nor do we have plans to
    add Linux support in the near future.

    Sorry that I can’t bring you better news.

    Best,
    Kate

    Kate Brinks
    Public Relations Manager
    Mice, Keyboards and Harmony Universal Remote Controls
    510-713-5115 office
    415-823-3121 mobile
    kate_brinks@logitech.com

  2. Phil [Member]
    July 17th, 2007 | 3:34 pm

    I got the same thing from Tate Tran. However, I responded explaining I didn’t want Linux support, and instead wanted communication specs so *I* could write the Linux support for them. She wrote me back asking for specific examples to pass to the developers, so I wrote back with that just now.

  3. chairman [Visitor]
    July 21st, 2007 | 2:01 pm

    Is this code supposed to work with Harmony 520?

    I just get:
    Unable to find a remote (error -16)
    Failed with error -16

    when I try to use harmony -c

  4. Phil [Member]
    July 21st, 2007 | 5:47 pm

    It should – but libusb requires you to be root. My guess is you’re not root, so libusb can’t use usbfs (which requires directio, which requires root).

  5. Carl Seutter [Visitor]
    July 21st, 2007 | 6:14 pm

    I get the same error when running as root. When running as non-root I get -1. Putting some debugging statements in libusb/libusbhid.cpp, it seems to be failing on the call to usb_claim_interface. I’ve tried this on Fedora, CentOS, and Debian with the same results. I was beginning to wonder if I was the only one.

  6. Phil [Member]
    July 21st, 2007 | 6:34 pm

    Gah – I wish SourceForge would have approved our project by now. We’d have a mailing list. Blog comments are not the greatest forum for troubleshooting. If you’re having problems with v0.9 of the software, please drop me an email: phil (at) ipom (dot) com. I’ll be happy to help you troubleshoot.

    Anyway – in your case, check dmesg – see if the in-kernel HID driver attached to the device when you plugged it in. Not all Harmonies are grabbed by the in-kernel HID driver; my 880 isn’t, but Kevin’s 6-series is. If it did, you’ll have to tell it to unbind using sysfs. You can see how to do this here: http://lwn.net/Articles/143397/

    I’ll be submitting a kernel patch to blacklist harmonies from the in-kernel HID driver as soon as the sourceforge project is up (they like to see active user-space code before blacklisting a device).

  7. Phil [Member]
    July 21st, 2007 | 8:20 pm

    Carl, and others: Also, try this patch: http://www.phildev.net/harmony/harmony-0.9_claim_error.patch . It will give you a much more useful error message.

  8. Carl Seutter [Visitor]
    July 21st, 2007 | 9:25 pm

    thanks for the help. From looking around it seemed as though it may have registered in usb then after unbinding it showed up in usbhid. But I might have missed it in usbhid initially. However, after getting it unbound, I was able to perform a successful harmony -c as root.

  9. August 27th, 2007 | 2:40 pm

    Hey guys, nice work you’re doing there. Any plan on supporting the Harmony 1000 ? I’m tempted to buy it and would be happy to help and debug.

  10. Phil [Member]
    August 27th, 2007 | 2:47 pm

    There is experimental code in 0.10 for the 1000, though you’ll need to tweak the source to enable it (there’s a patch on the -devel mailing list).

    Go ahead and jump on the -devel list, it’s low traffic, and that’s the best way to keep up with the changes.

  11. September 14th, 2007 | 7:45 pm

    Thanks for your reply.

comment on this article

Notice: All comments are moderated. Your comment will appear once approved.