Using a raspberry Pi as a DIY equivalent to Logitech Harmony

54 replies

djmp wrote:

Thanks! Should have been more clear in my question though. I have the IR codes via USB and thanks for the remote control mappings.

I'm talking about accessing the LEDs and the Timer/Play/Up/Down buttons on the eye. I'm guessing that's i2c coming out of the TX/RX connections on the eye? Haven't hooked them up yet to the Arduino but was wondering if someone had.

With the above arduino code, this part:

else
  {
    uint8_t value = PCF_20.read8();
    uint8_t buttons = value ^ 0xFF;
    // Capture state, then act when buttons released
    if (buttons !=0) {
      lastButtons = buttons;
    } else if (lastButtons != 0) {
      
      Serial.print("0:254:");
      Serial.println(lastButtons);
 
      lastButtons=0;
    }
handles the puck buttons. They come back as 0:254:x over usb.

 

djmp wrote:

Thanks! Should have been more clear in my question though. I have the IR codes via USB and thanks for the remote control mappings.

I'm talking about accessing the LEDs and the Timer/Play/Up/Down buttons on the eye. I'm guessing that's i2c coming out of the TX/RX connections on the eye? Haven't hooked them up yet to the Arduino but was wondering if someone had.

With the above arduino code, this part:

else
  {
    uint8_t value = PCF_20.read8();
    uint8_t buttons = value ^ 0xFF;
    // Capture state, then act when buttons released
    if (buttons !=0) {
      lastButtons = buttons;
    } else if (lastButtons != 0) {
      
      Serial.print("0:254:");
      Serial.println(lastButtons);
 
      lastButtons=0;
    }
handles the puck buttons. They come back as 0:254:x over usb.

 

Thanks samsp!  I got the buttons and also LED control going.

For IR I do notice that I’ll get occasional misreads of the IR remote, incorrect code reported. Maybe that’s to be expected?

I get that too. Luckily, the wrong codes don't map to any other real functionality in my case. At least not that I'm aware of. Sometimes it doesn't do what I wanted, but it never did anything else instead.

I get more errors if I use the remote from far away, needing it to bounce of several walls before it reaches the eye.

I thought it had something to do with the frequency of the arduino not exactly being that of the IR signals, so it sometimes misses part of the signal..

Just to say that the IR eye is working well. Buttons & IR commands report over USB. For fun I added a BLINK command which sets selected LEDs blinking at a 1 HZ rate - I use this to show the attached system is starting up. Thanks to all in the thread for advice and code fragments. I ended up using a Pro Micro Arduino, very small and fits fine in the IR eye. 

I'd love a copy of the LED code, I have tried to set the LED state in the past and just seemed to hang the I2C communications. It would be nice to have a flash when a command is received, and also during startup.

It is slick the way the arduino fits in the back, and turns a pretty proprietary device (B&O remotes) into something that can work with all sorts of home automation.

Are you using a PI or something else at the other end of the USB?

djmp wrote:

Thanks samsp!  I got the buttons and also LED control going.

For IR I do notice that I’ll get occasional misreads of the IR remote, incorrect code reported. Maybe that’s to be expected?

I have a feeling that the output of the IR Receiver is pretty noisy. I looked at the output with a cheap USB scope, and it seemed to have quite a lot of flicker in it, even when no signals were being received.

Is this coming back as misreads in the serial data over USB? I have seen those occasionally but wasn't sure if that was user error or not. Do you have an idea of the frequency of the misreads? For me its probably in the single digit percent - so I haven't noticed enough of a problem to spend more time investigating it.

Sorry for the delay, was busy with work. I’ll send you a zip of the source.

I have it connected to a Pi with some code handling IR events. I’m swapping out a Beosystem 3 for a newer processor but still want to use the Beoremote.

I’ve noticed that IR reliability goes way down if I use in a room with a plasma screen. That produces a ton of IR interference so I think the timing code is getting thrown off and misdecoding the pulse sequence. I’ve seen it go into debug reporting too which meant that it got a bit lost. Haven’t had time to dig further and I don’t have a scope.

or
BeoWorld Gold Membership card
Join BeoWorld

Register to access the forums, reference material, and exclusive member benefits — including our monthly prize draw.

Become a Member

December 2026 Prize Draw

Gold Members Only

As a Gold member you're automatically entered into our exclusive prize draw — your chance to win iconic Bang & Olufsen products. A unique benefit of BeoWorld Gold membership, every draw brings a new opportunity to win something special.