Using a raspberry Pi as a DIY equivalent to Logitech Harmony

54 replies

I have remote control envy. I have loved the B&O remotes since childhood, when a friend had a BeoMaster 5000 with the MCP. The Beo4 is pretty, but the BeoRemote 1 is damn sexy. The problem is I can't justify the B&O source hardware to control it with. I looked at the Lintronic solution, but it seems 1998.

I looked at Neeo, but they recently were bought out, and the remote didn't have a play button. I have a logitech harmony with hub (no screen) and that has good ergonomics, but is not as pretty as the B&O.

On a recent search for other stuff I came across OpenHab, Lirc and realized that Raspberry Pi has CEC capabilities via its built in HDMI port. If you use the right IR receiver for the Pi, there is a Lirc config for Beo4. That made me realize it should also be controllable via Beoremote One in IR mode. This is seeming do-able.

Has anybody tried this before?

Is there a price list for the Beo Remote One - It seems we don't have a B&O dealer in the SF Bay area to ask, I'm trying to figure if the ones on ebay are overpriced or not?

 

 

As an update to anyone who was interested, I now have this working, and it was surprisingly simple.

The net result is I have:

 

  • An Raspberry PI running Linux with OpenHab2 as the main controller.
    • It is connected to my receiver via HDMI, to control the other devices
    • It controls a Vizio TV, Sony PS4 and Fire TV Cube via HDMI-CEC commands
    • It controls the receiver via IP with an existing binding for openhab
    • It controls a sonos connect (non amp) connected to the receiver in the living room
    • It controls a another pair of sonos connects driving 2 pairs of Beolab 4000's for the office and bedroom
    • It controls Hue, Lutron Caseta & Zwave lighting via their hubs, and a zwave USB stick
  • Connected via USB to the PI is an Arduino Nano, which is hidden in the back of a B&O IR eye
    • This listens to B&O IR commands and translates them to serial comms to the PI via the Arduino's built-in USB port
    • A serial binding in openhab (bindings in openhab are modules to interface to different systems) will detect the incoming messages, and then invoke rules to process the messages. The rules are script based and enable limitless capabilities as you can have state, conditionals, timers etc.
    • A relay is connected to one of the GPIO & ground pins of the Pi to toggle a 5v supply to my 3x Beolab 6000's for L,R,C & 2x Beolab 4000 for surround to force them to be on when using multi-channel sources. This means they don't keep turning on and off when there is no surround effects for a while.

 

By pressing the TV + "Fire TV" selection on the BeoRemote One, it will turn on the FireTV, Receiver & TV, and set the FireTV as active source toggling the right inputs. All the remote buttons then work as expected.

This is also mapped to the DTV button on a Beo 4 (with Go button). As the remote signals have a source ID, both remotes use a different ID, which means I can map the Beo4 a bit differently. The Arrows + Go act as a direction rather than Play, FF, Rewind, so that it works well with the all the devices that now expect direction + select functionality.

I also have it mapped to control my Sonos & Hue lighting for respective modes on both remotes.

Most of the other buttons work as expected, including vol depending on source being used. Pressing the standby button will shut everything down as expected.

 Images: https://archivedforum2.beoworld.org/media/p/279066.aspx, https://archivedforum2.beoworld.org/media/p/279065.aspx

HDMI CEC binding for openhab2: link

Arduino IR receiver: link

I can share the openhab configuration and rules if anybody is interested. 

Hi and welcome to Beoworld :)


nice project, keep going! There are other members here on Beoworld with similar projects and such projects are a great contribution to the Bang & Olufsen world.

Maybe these threads will help you, too:

https://archivedforum2.beoworld.org/forums/t/11816.aspx

I'm very interested in this setup!

I wondered if this would fit my needs. Maybe some advice would be welcome.

I'd like a good 4K TV/screen, I'm currently only looking to use it as a screen without sound/apps/whatnot. The main source would be a computer (probably a mac mini, maybe something windows/linux based if that allows better integration) running a kodi application for watching series and movies. In the future, I may start using Netflix too, but for now, I'm ok with my own personal content on the computer.

I want a 5.0/5.1 setup, using at least active speakers for the fronts (looking out for some used beolab 9s) and maybe also some lab 3s for the rears. (Currenly using an old amp and some Bose cubes. Replacing the rears would require upgraded cabling and power supply to be added in the ceiling.)
The speakers should be used for watching movies/series, but also for playing background music, preferably in sync with other airplay speakers in the house.

I currently have an older macbook pro running kodi and itunes, connected to my ancient LG tv. The computer is always on, and itunes is always running s.t. I can just press play on my iphone remote app for itunes. There is the old amp and the Bose speaker set. For watching series, I'm using 3 remotes (the horror!): power on the amp, power on the tv, and control the mac using an aluminium apple remote. For listening to music, I power on the amp and use the iphone to control the itunes on the macbook.
This setup works fine for now. Powering up an airplay speaker in the kitchen makes it automatically join the airplay music of the living room.

In the future (when a newer tv and a set of beolab 9s are joining the party), I'd like to get rid of all remotes but one, and if this one could be a beoremote one, that would be ideal!
I suppose I'll need a fancy amp/pre amp for connecting the speakers? Or can active speakers be connected to a mediacenter pc directly? (The main windows computer in the household has 5.1 3.5mm jack outputs for speakers... Or are beolabs not to be connected to such outputs?)

Now, would it be possible to have the beoremote one to control the kodi application on the computer, like: press TV on the remote and automatically power up the screen, (pre)amp+speakers, wake the computer and start the kodi app, after which arrows/play/pause/etc works on the kodi app?

Would it be possible to map a press on the MUSIC button to turn on the amp and speakers and start playing a specific playlist on itunes? Or, if the itunes part is impossible, simply just power up the amp and speakers s.t. I can press play (or choose different playlists) on my iphone remote app?
(Is there any way of choosing playlists on the remote, be it even as in selecting one of 3-4 sources which could correspond to my main 4 playlists? (i'm only ever using 4 specific lists and don't need their names on the remote, something simple like 'list1', 'list2' would already be enough!))

(Power everything off using the standby button on the remote should be possible I suppose?)

I guess most pre-amps nowadays have airplay support too, so the itunes computer could also be a separate unit that simply airplays to the (pre)amp and the other airplay speakers without intervention of the beoremote (but this would require speakers to be set to LINE IN, hence no automatic on/off trigger. Or maybe such a trigger can be engineered from a triggered output on the pre-amp?).

So, a lot of questions/advice needed. I am tech savvy (did computer science at uni), so a bit of programming is no problem. I have however no experience with raspberry pies or arduinos yet. 
What hardware would I need to get my ideal system working?

About your setup: How is the CEC working? You are using a receiver to relay the CEC controls from the PI to the respective devices? Speakers are connected to the receiver?

Thanks a lot for the info and your input! I've only just discovered your post and it finally looked possible to achieve my ideal setup.

Inline

crossbytje wrote:

I'm very interested in this setup!

I wondered if this would fit my needs. Maybe some advice would be welcome.

I'd like a good 4K TV/screen, I'm currently only looking to use it as a screen without sound/apps/whatnot. The main source would be a computer (probably a mac mini, maybe something windows/linux based if that allows better integration) running a kodi application for watching series and movies. In the future, I may start using Netflix too, but for now, I'm ok with my own personal content on the computer.

You can install Kodi on a Raspberry Pi, or alternatively install OpenHab on the PC. I'd think about using a separate device that will handle the 4k presentation and has all the services on it. Once you start wanting to watch netflix, amazon prime series etc having to go via a browser is a pain. Apple TV or a FireTV device would be better (unless the stick has changed in recent generations, you can't connect it via ethernet only wifi, so I'd suggest the cube instead).

I want a 5.0/5.1 setup, using at least active speakers for the fronts (looking out for some used beolab 9s) and maybe also some lab 3s for the rears. (Currenly using an old amp and some Bose cubes. Replacing the rears would require upgraded cabling and power supply to be added in the ceiling.)
The speakers should be used for watching movies/series, but also for playing background music, preferably in sync with other airplay speakers in the house.

I currently have an older macbook pro running kodi and itunes, connected to my ancient LG tv. The computer is always on, and itunes is always running s.t. I can just press play on my iphone remote app for itunes. There is the old amp and the Bose speaker set. For watching series, I'm using 3 remotes (the horror!): power on the amp, power on the tv, and control the mac using an aluminium apple remote. For listening to music, I power on the amp and use the iphone to control the itunes on the macbook.
This setup works fine for now. Powering up an airplay speaker in the kitchen makes it automatically join the airplay music of the living room.

The key here is to ensure that there are Bindings for the devices you want to control, or you can hack it together via REST calls etc. Apple doesn't tend to be very open, so I'd check the openhab forum for help there. If openhab can control it, then my part of the solution enables it from a B&O remote.

In the future (when a newer tv and a set of beolab 9s are joining the party), I'd like to get rid of all remotes but one, and if this one could be a beoremote one, that would be ideal!

I suppose I'll need a fancy amp/pre amp for connecting the speakers? Or can active speakers be connected to a mediacenter pc directly? (The main windows computer in the household has 5.1 3.5mm jack outputs for speakers... Or are beolabs not to be connected to such outputs?)

The older beolab 4000, 6000 & 8000's that I use all have line-in sockets on the back. Sounds Heavenly will make cables for other devices. The problem with using a PC output directly is that its usually at a high level, and doesn't seem to run as well when volume is set to 10% etc.

Now, would it be possible to have the beoremote one to control the kodi application on the computer, like: press TV on the remote and automatically power up the screen, (pre)amp+speakers, wake the computer and start the kodi app, after which arrows/play/pause/etc works on the kodi app?

Would it be possible to map a press on the MUSIC button to turn on the amp and speakers and start playing a specific playlist on itunes? Or, if the itunes part is impossible, simply just power up the amp and speakers s.t. I can press play (or choose different playlists) on my iphone remote app?
(Is there any way of choosing playlists on the remote, be it even as in selecting one of 3-4 sources which could correspond to my main 4 playlists? (i'm only ever using 4 specific lists and don't need their names on the remote, something simple like 'list1', 'list2' would already be enough!))

(Power everything off using the standby button on the remote should be possible I suppose?)

The TV & Amp are easy. The harder part is the apps that you want to use. It depends on the integration between your control software and the apps. For this reason using a device may be easier. For example with FireTV, if you enable adb debugging, then you can send any sequence of keys, or start apps as required. Its insecure though in that any device on the LAN could send those messages.

I guess most pre-amps nowadays have airplay support too, so the itunes computer could also be a separate unit that simply airplays to the (pre)amp and the other airplay speakers without intervention of the beoremote (but this would require speakers to be set to LINE IN, hence no automatic on/off trigger. Or maybe such a trigger can be engineered from a triggered output on the pre-amp?).

So, a lot of questions/advice needed. I am tech savvy (did computer science at uni), so a bit of programming is no problem. I have however no experience with raspberry pies or arduinos yet. 
What hardware would I need to get my ideal system working?

 

Unless you are wedded to a beoremote one, I'd start with a logitech harmony. There are some good deals on the remote+hub combo for the remote that doesn't have light switch buttons. They have done the hard work for most device support.

If you need beoremote support, you'll need a Raspberry Pi, a B&O IR eye and an arduino.

About your setup: How is the CEC working? You are using a receiver to relay the CEC controls from the PI to the respective devices? Speakers are connected to the receiver?

Thanks a lot for the info and your input! I've only just discovered your post and it finally looked possible to achieve my ideal setup.

I have my speakers connected via line-in to the reciever's pre-outs. I have HDMI devices connected to the TV directly and the receiver. It works as well as the devices can over CEC (device support is spotty). Devices are connected directly to the TV so that 4k content works - I haven't upgraded the receiver yet, and am reluctant as they'll change the standards as soon as I do.

I also have the 8pin din hooked up to a USB power supply via a relay controlled by an I/O pin on the pi. This is so I can keep the surrounds & L/R powered on when watching TV. While they can detect a signal, there is a small delay, and if the audio is primarily the center channel then it they can time out (with a click) and detect again going through a series of on/off cycles.

Alright! This already clears some things up for me.

I looked a bit deeper into the openHAB and it seems a very powerful tool. I guess that once configuration is done, it is a matter of defining a set of actions/rules to be called when certain remote functions are pressed?

I'll see if I can manage to program a testcase, currently without the remote part, just running on a networked computer. If I can get the kodi and itunes control working, then I suppose the remote side of the deal should not be too hard either (probably using a bit of your help on hardware and integration). Updating tv and speaker hardware will then probably also be a matter of adding a couple of lines of code to the system?

I'm still wondering though, how controllable is the beoremote itself? Can you easily edit the list items on the screen? What about the mybuttons?
Is it the same for a Beo4? I may be able to get my hands on an older Beo4 to test the IR part of the solution later on.

Good news!

I got my openHAB installation up and running and am already able to control the Kodi application running on the 'mediacenter' mac. The itunes control was a bit of a pain, but I finally got it to work. I can start playlists from within the openHAB sitemap and airplay control looks within reach too.

That all on separate macs in my network (currently the openHAB is running on my main laptop, kodi and itunes on the older mac connected to my tv).

I think I'm ready for a beoremote connection. Therefore I will need a more technical how-to I suppose on the components and connections. 
Is any B&O IR eye found on ebay suitable, or should I look out for a specific type/model. I just googled 'TSOP7000' and this is a really cheap IR receiver. Is this as good as a B&O eye?

What about the Arduino? There is no 'mini' type on their site. How to assemble these together? Does this need a lot of configuring?

 

As I'm going through the beoremote one manuals, it looks possible to add several music sources to the remote, if these can be renamed, I would be able to select playlists directly through the remote then. I guess the openHAB is able to receive and interpret these commands s.t. different actions can be taken.

 

As I'm thinking about it now, would all this work over bluetooth too? This way the IR receiver would not be needed. Possible problem I see here is that the remote would know it's not somewhere in its own B&O ecosystem, and maybe it refuses to work? I did read here somewhere a while back that a BR1BT can be paired to a mac and it can control volume and tracks in itunes. Not sure if other buttons on the remote could be interpreted using openHAB, or if selecting different sources on the remote would indeed trigger different events...

I found the TSOP works, but doesn't have great range. The B&O eye is amazingly sensitive - that's what gives the remote the ability to bounce off 6 walls and still work. You don't need to point in any direction. 

I also have the I2C on the EYE working so the buttons get sent as specific address/button codes by the arduino.

I have the "ELEGOO for Arduino Nano V3.0" from amazon as my arduino. If you can find one with a micro USB connector that may be better. With a bit of carving away at a usb mini cable's plastic sleeving, i have the arduino fitting in the back of the eye's case. The usb then connects to a Pi (or PC/mac) in your case and acts as a serial port.

I think I shared the code for the arduino, but will send it to you. It sends back a string of A:BBB:CCC, where A=link 0/1, BBB=Address of device from remote, and CCC is the button code. That can then be directly read from a serial binding and translated into actions in OpenHab scripts. I will send you my script as an example. I have a tweaked version of the serial binding that listens for /n, so is faster at getting messages.

Yes you can rename any of the sources from the remote. They will then map to addresses and button codes. The nice thing is the BR1 has a different address from beo4 so you can special case the dpad from the "go" version of the beo4 and have the buttons do what you want.

I have not gotten bluetooth pairing to work to the PI. if you can get it working over bluez, I'd love the info. Over IR it works well enough for same room usage.

I will send the files via PM when I get home tonight.

My buttons can be set to map to specific sources. So under TV i have FireTV, PS4, TV and BlueRay, but have the nearest mybutton mapped to the FireTV action.

The combo of renaming inputs + Openhab scripts is really powerful, and gives the ability to go beyond what B&O does, and have a really flexible system, that would be simple enough for family members to use (Partner Acceptance Factor).

Eg, I use the color buttons to toggle on/off different Sonos ZP90's connected to beolabs in other rooms when music is playing.

Great!

I've looked into the Bluetooth part for a couple of hours now, but there seems to be very little support for bluetooth devices in het openHAB community and it mainly focusses on presence detection. Rather strange.

I tried to see if I could get readings from a connected bluetooth headphone, but wasn't able to with the standard bluetooth binding. I guess IR will be the way to go, although it feels like a workaround.

I'll start gathering the necessary hardware. Any B&O IR eye will do? (Or maybe I should try and open up my beolit12 to get the IR eye from there... I read here somewhere that someone succeeded in doing this.)

Exciting times!

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.