Using a raspberry Pi as a DIY equivalent to Logitech Harmony

54 replies

So, I have an eye coming my way and an order for an arduino is being made. I'll pick up a new Beoremote one next weekend too.

I checked some arduino tutorials and based on the code you posted on github, I think I can get it working. Will have to look a bit further into the right pin connections.

I'd appreciate your input on the openhab configuration and rules files. Not sure yet how to communicate with the arduino from within openhab either, is there an easy binding for this? I guess your openhab config files might explain this further.

 

So as I reread this thread, you mainly control all your devices over CEC? You say in a previous post that your hdmi devices are connected directly to your tv and the receiver? Does this mean that they are physically linked to both the tv and the receiver, or is one of these two responsible for forwarding the CEC commands received from openhab?

(The link you posted to the CEC binding is dead by the way.)

 

Arduino to Pi is simple - the USB connection acts as a USB serial port, so I use the serial binding in OpenHab to listen. I customized the code to listen for returns, so it doesn't have to poll as much. It along with a diagram of the connections inside the eye are in your inbox.

CEC has bus semantics. Devices only have one connection, but once on the bus, you can talk to regardless of what its connected to. So the Pi can be connected to the reciever along with some sources, and other sources direct to the TV, as long as the tv and reciever are connected, you can talk to all of them. I connect 4k sources to the TV as my receiver can't handle 4k video.

 

Mail received, thank you very much!

I'll get my stuff going once my components arrive. Holidays are over however, so I'll have to use my spare time in the weekends from now on.

 

Good to know about the CEC bus semantics. It explains everything.

Thanks again for your kind help! I'll keep you guys posted on my progress.

In the meanwhile I have acquired a BeoRemote One BT and an IR eye, still awaiting my arduino hardware to hook everything up.

I wondered, in your setup, the specs of the AV Receiver are not too important? 4K devices are directly connected to the TV, and sound is fed into the receiver separately?

Would you say this is 'suboptimal'? I wondered what the up/downside to this approach is. Is there a reason why you (or me) would want a newer receiver to connect sources directly to that receiver?

Wow! I have no idea how I missed this thread. You have no idea how much I'd love to use a B&O remote (BROne or Beo4) as remote to use for my non-B&O television. I love my B&O remotes and would love to use them more.

I have a spare Raspberry and could give it a try. It has an IR sensor on-board and also a bluetooth dongle via USB. A few questions to get me started? Really appreciate your help and am sure this "project" will not be an easy one...

1) Does this work with either IR or bluetooth? While I don't have a bluetooth version of the BROne, i'd consider to buy one for this purpose. Assume bluetooth would be better to use than IR as it is the more modern technology and allows better connectivity?

2) Would this allow me to turn on a non-B&O television with the on/off button? And change volume?

3) Would the TV/DTV/etc. keys allow me to switch between the different HDMI sources? One of the HDMI sources will be my Raspberry (with the remote attached to it), others will be Apple TV and there may be a third HDMI port?

4) Would this allow me to control programs on the RPi (when HDMi of the RPi is selected)? And then also allow me to control the ATV when the HDMI of the Apple TV is selected? This would mean that the RPi sends a signal over CEC to the TV that then gets send via CEC to the Apple TV? Seems magic and is this really how it works?

5) Does it allow long-click to control the Apple TV?

 

This is really exciting. Hope you can help me figure this out! Thanks in advance!

Hi,

A few answers:

1) it's IR only, the bluetooth part is not well supported in the openhab community, but I think the remote limits it's own functions when connected to a non-B&O device. Once connected to a mac/iphone, the only things that work are basic listening buttons (play/pause/next/prev/volume and on/off). I couldn't find a way to interpret other buttons on my mac and I tried almost all remote/keyboard mapping tools out there.

2) The IR sensor on your pi will not support B&O frequencies, so it can't receive commands from the remote, nor can it send commands to B&O tech. It may however send IR signals to your non-B&O tv, so using a B&O IR eye as a receiver, you may get it working. Once the receiving part is done, you can receive all signals and map them to whatever you like.

3-4) if your tv supports receiving network commands or CEC commands, this should be possible. I have not tried it out yet.

5) no idea, but if you can map everything to everything, a press on e.g. the yellow button could trigger an event for such long presses.

 

I just received my Arduino board and am trying to get it up and running!

Got it, thanks for the update.

I already have an IR eye, but have no idea how I'd connect this with the RPi?

My TV supports CEC commands, so it seems this may be doable

What do you need the Arduino board for?

Don't know if the pi can do it on its own, but the arduino connects to the IR eye and relays the commands to the openhab server, which in its turn controls the TV (and other devices). 

I would expect a pi to be able to do the work of the arduino on its own, but have no experience in this field. It may be a matter of having the necessary libraries available...

The reason to use an arduino / Pi combo is so that the pi doesn’t need to be doing realtime monitoring of the signal from the ir reciever/eye. That is a full time job, where you want to be as "close to the metal as possible", and an arduino does it well. The arduino sketch (code) is basically a tight for loop, waiting for IR pulses, and then timing them. Doing this with a Pi would be more tricky as it would need to be tied to an interrupt, and the Pi has other higher-level functions to run. At ~$8 for an arduino, its a simplicity trade off that is well worth while. Also as you can fit an arduino nano in the back of a b&o eye, and just have a usb cable coming out, its aesthetically elegant. The USB from the arduino maps to a serial over USB device, so its really easy to read the results from the Pi (or other host device).

You don’t technically need a raspberry pi - you could do all of this with a PC, Mac or NAS box. A Pi is a convenient host, and is cheap (~$50 with PSU & case) and has hdmi/CEC if you need it. It can also interface to IR boards, and general purpose I/O pins which is useful for say forcing a power-on of beolab speakers.

[duplicate]

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.