Question: Change an Harmony Hub Activitiy via OpenHab and HTTP request

Dear community members,

I am new to OpenHAB and would like to ask you for help. I have successfully installed OpenHAB 2.3 and several bindings to control my Harmony Hub and my Philips Hue lights.

Let me explain where I would appreciate your help:

I use the media center software kodi on my htpc to play movies and I use a kodi add-on called CinemaVision (CV). CV plays trailers amongst others before a movie starts and it allows me to manage my Philips Hue light system prior to the movie (switch on, switch off etc.) via Logitech Harmony Hub. The lights are controlled by a http request which is saved in a CV action file (script).

Example line for direct Philips Hue control (don’t know actually how to do this with OpenHAB):

This switches/fades off the lights which I have defined in group 7 (name of a Philips Hue group).

The setting decribed above works perfect unless the content to be played is stored on the htpc. Lights go on and off while a trailer is played or the movie starts.

However, most of my content is on blu ray disks and is therefore played through a blu ray player and not with the htpc which doesn’t have a cd/dvd/bluray device. To watch this type of content I have to manually change the output channel on my AVR from htpc to bluray by starting another Harmony Activity on my Harmony remote. This is what I would like to automate.

In case I select a movie from the kodi database which is stored on a blu ray disk, kodi gives a hint to insert the blu ray disc (after the content defined in the CinemaVision script has been played).
What I would like to do is to change the Harmony Activity from „play htpc“ to „play blu ray“ automatically at the end oft he CinemaVision script.

As far as I know it’s not possible to change an Harmony Hub activity with a http request. But I read that it’s possible to do this with OpenHab.

Can you help and tell me what I have to do within Openhab and which line I have to add to the CinemaVision action file to change the Harmony Activity by via http request?

Thanks in advance and best, Helge

Install the REST API Documentation (under the Misc tab in PaperUI) which is an interactive documentation of the OH REST API. Look in the Item’s section and you will find how to send command to OH Items. Then configure your Kodi to send the right HTTP request to the OH Item that represents the Harmony Hub for that activity.

However, I will mention that most people who do this sort of thing make all the HTTP calls and light changes and such from OH rather than Kodi since the reason OH exists is to bridge between all of these techologies itself.