Using a raspberry Pi as a DIY equivalent to Logitech Harmony

54 replies

I got to experiment a bit further with my remote and the openhab server, and I'm impressed with what I got so far.

It was a bit of searching and getting into details setting up the IR receiver part, but using Sam's help and code, it all came together. Once the openhab server can receive commands, it's all a matter of 'programming' the right actions to follow. The openhab system is very powerful, and allows much more than simply executing commands based on received codes. In the future, I might see what else I'll build into the system. (There's e.g. easy presence detection possible based on whether or not your smartphone is in the neighborhood, which could also trigger stuff to happen in your house.)

I currently have my BeoRemote One control both itunes and kodi on an older mac. I even have the state of the system relayed back to the arduino, so the leds on the B&O IR eye are showing an active source, or blinking when signals are received.

My music sources map to different playlists on itunes, and the kodi app is present as a TV source. I have a playstation too, which could also be mapped as a TV source. It all integrates nicely into the BeoRemote, with the right names and the right options.

So far, I'm still using my old receiver/amp, which is too old to control with anything else than its own IR remote. The same holds for my TV. So I'm still bound to their remotes, but I'll have them upgraded later this year I guess.
I did get rid of my itunes remote app on the iphone. The BeoRemote nicely controls tracks, playlists, and volume of both the main zone and the airplay speakers separately. If my beolit 12 is plugged into the mains, I can even power it up using the 'oldskool' beo4IR function of the BeoRemote.

I'm happy with what I've got so far, and will be even more pleased once I get rid of the old equipment. The Holy Grail of one stylish remote to 'control them all' is finally here! 

crossbytje wrote:

So far, I'm still using my old receiver/amp, which is too old to control with anything else than its own IR remote. The same holds for my TV. So I'm still bound to their remotes, but I'll have them upgraded later this year I guess.

if you are using a raspberry pi, then you could use an IR board to send the signals to your TV and amp. The Lirc binding in openhab enables you to send individual IR codes. Each remote configured in Lirc becomes a device you can call from openhab. The Lirc database is massive - 

No pi for the moment. My openhab is running on the mac which is always on anyways. Surely, a pi would consume less energy, so in the long run I might 'upgrade'.

But is the arduino not capable of sending such IR signals too? I may look into this. In my setup however, the tv is the only visible thing and all gear is placed in a cupboard with a semitransparent mirrored front. sending IR signals from within this cupboard to the receiver is no problem, but the tv is out of reach, unless I wire a diode to its receiving eye.

I'm still deciding which devices to use for 4K content when such a TV arrives. Not sure whether the 2011 MacBook Pro will suffice, but we'll see then.
For the audio part, I'm thinking about a Marantz SR5013, as it has both pre amp and amp connections for combining active B&O speakers with passive rears. I'll need a source for sending the power ON/OFF signal to the B&O speakers too, but maybe the arduino could do this too. Is that a simple 5V signal? (If so, the code would be the same as for the LEDs on the IR eye.)

crossbytje wrote:

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?

The only reason I connect the 4k sources directly to the TV is that my receiver is only 1080p, but the TV is 4k. I'm being cheap and not replacing the receiver as it has the pre-out connectors i need for the Beolabs, and newer receivers don't have that unless you step up to the $1000 range. So its an economical decision that doesn't really compromise functionality. 

 

crossbytje wrote:

It was a bit of searching and getting into details setting up the IR receiver part, but using Sam's help and code, it all came together. Once the openhab server can receive commands, it's all a matter of 'programming' the right actions to follow. The openhab system is very powerful, and allows much more than simply executing commands based on received codes. In the future, I might see what else I'll build into the system. (There's e.g. easy presence detection possible based on whether or not your smartphone is in the neighborhood, which could also trigger stuff to happen in your house.)

The real power in the openhab scripts is this ability to listen to events and trigger scripts. It doesn't just have to be remote codes. In my house there are different ways to control some of the sources. For example, I have a Sonos connect in the living room connected via optical sp/dif to my receiver. The Sonos can be activated by its own app, or other systems. As it needs the receiver to be on and switched to the right source to be heard, I have a rule listening to the play state of the sonos. When it starts playing, the rule will turn on the receiver and set the input and correct volume. It will also set a state variable in the openhab configuration so it knows what activity is running. The rules for the B&O remote use that to direct the button actions to the right source. The remote(s) are (mostly) stateless, and will control whatever the current source is. 

Another example, is that if the B&O remote is used to turn on the sonos in the living room, it looks to see if either of the other sonos in the house are playing - if so it joins those groups, if not resumes what it was playing last.

 

My newest discovery is the Lutron Binding in openhab. In conjunction with the Caseta Pro hub (needs to be the Pro version), it enables control of Caseta, RA2 etc devices, but also listening to Pico remotes.

Pico remotes are sized to go in a Decora switch plate, or be used as a wireless remote. So if you want the clean home automation feel, you can mount them on the wall, either as part of a gang of switches, or fake up your own gang with them.

Each button on the remote becomes its own switch in openhab, so you can have them do what ever you want via the rules. If you want a button to switch audio to a specific track, dim the lights, close the blinds, and lock the door you can do that.

The labels on the buttons of the Pico remotes in this case are just labels, they don't affect what you can do with them. You can rub the labels off with a plastic spludger if you want. You can also order custom printed remotes direct from Lutron.

If you want that crestron-like functionality and have some coding skills, you can do it without having to take out a second mortgage. 

 

Thanks god i found this post, i was about to spend a fortune in another solution that i think at the end it will be even less optimal than this one.

Could you please send to me also the files samsp? it will be highly appreciate it.

 

One question, how do you connect the B&O IR eye to the nano board? could you share a picture of that?

Thanks a lot!

 

B&O IR eye receiver and Nano board V.3 on the way already  :)

Hi,

 

I sent you a bunch of files that should get you on your way. Part of the solution is the arduino board that receives the IR signals, the other part is the openhab server that interprets codes and executes appropriate rules controlling your devices.

A bit of programming experience will help a lot.

 

Enjoy! 

Did the files that crossbyte sent help.

The essence of the solution is to use a raspberry pi (rpi) with openhab as the brains of the system. Openhab is a framework for writing home automation systems. you define a set of bindings/things/items which represent the devices and state/commands for those devices.

Beo remote signals can be intercepted and used a set of state data that can trigger rules. the rules can interpret the data from the remote signal, and then send commands to devices such as switch input, play or key left.

B&O remotes use their own frequency, because they are b&o who have to be different. It also uses a pulse width system which needs real-time processing system. Rather than trying to do that with the RPI, my solution uses a small arduino to process the signal, using a b&o eye as the receiver. the arduino is small enough to squeeze in the back of the eye’s case. it then connects to the RPI over usb, which can supply the power, and appears as a serial port. the arduino can handle the IR, and the i2c used by the buttons on older versions of the eye.

Thank you very much guys for all your help, I didn't have time to check the files yet but quite sure it will help me a lot, most probably until next month I won't be able to play with it and start testing.

I got already in my hands the raspberry pi, the Arduino Nano V3, and the B&O IR eye same as samsp has, so hopefully I will make it work. The only difference with samsp is I won't have connect the raspberry through HDMI, the intent is to send through network all the comands received from the beo4 to my fire TV stick and to my Sonos mainly, in a later stage I will try to control also my Fibaro home automation with the remote, so let's see how it goes, I will keep you updated.
Once again, thanks!!
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.