openHARMONIE - A proof of concept for controlling devices via IR from openHAB

Hi all,

since the days of (I guess) openHAB 2 I’m a user of openHAB and I’ve been reading so many useful information in this community.
Now it’s time to give something back :slight_smile:

openHARMONIE - OPEN source Home Automation ReMote cONtrol Infrared Emitter

In the last months, I tried to set up a replacement for the Logitech Harmony. It’s currently still a proof of concept, but works quite good for my needs.

The setup consists of openHAB connected to a Raspberry Pi Zero W which is sending out the IR commands. Communication from openHAB to the Pi Zero W is done with MQTT. All the logic when to send which command to which device is done in openHAB. The Pi Zero is just the “sender” component.

It’s possible to control the devices with a physical remote (i.e. the “openHARMONIE remote control”), with the smartphone (openHAB sitemap) or with Alexa voice commands.

Every activity (watch TV, watch Fire TV, watch a Film, …) is started with different phases:

  • an exit phase to end the current activity
  • then change power states of necessary devices for new activity
  • change input states
  • an enter phase where additional commands can be done which are always neccesary for the activity
  • and a finish phase where dynamic commands can be added, e.g. to start a favorite TV channel or a streaming app on the Fire TV

That’s how you can directly start an app on the Fire TV or a TV channel with one single button press or voice command.
Additionally you can use each button press on the “openHARMONIE remote control” for anything in openHAB.

I still need to figure out how to control devices via Bluetooth.

It was the first time that I used files to create items/things, until now I always did this from the UI.
I learned a lot during this project, especially regarding all the IR stuff related to the Linux kernel. This was also the most complicated part.

The brand new buttongrid feature was a lucky coincidence to create the virtual remote controls with the sitemap :slight_smile:

Everything is documented here:

I hope you like it and can use it as inspiration for your own projects!

7 Likes

Thanks for sharing and creating this. Be sure to post it around on other home automation forums so they are aware of it and then you can get multiple people contributing to the one project moving it forwards.

Cool idea I have nearly the same implemented but instead of the raspberry pi I am using this one

Or you can use this one already in a housing

RE flash them and you are good to go

2 Likes

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.