OpenHab Separate Server - How to integrate OSMC

Ok, I have multiple RPi3s around the house driving relays for lights etc… My main OpenHab Server is a standalone RPi3 with OpenHab, MQTT Broker and HomeBridge (for Siri integration).

I’ve been using XBMC (Kodi) for years and have them on a few TVs around the house also running on RPi3 (now). I had them on Mac Minis for years but what a waste of a good Mac. :(…

I was looking at OSMC as possibly a better solution to try and now integrate into OpenHab. I was hoping someone had already done the leg work and tried this. :slight_smile: So I guess my question is would I be better of with OSMC or Kodi to try and integrate into OpenHab?

I’m not sure you understand the difference when you ask the question this way. Frequently Asked Questions - General - OSMC

Did you use the forum search? Search results for 'Openhab' - OSMC Forums

It depends really what integration you want to do.

If you want to be able to control Kodi from OpenHAB then this is relatively straight forward and Kodi has a web interface and the ability to reapond to JSON packets in a pseudo API type structure. You can map events and triggers in OpenHab to call these to both check what Kodi is currently doing and to start content. There are plenty of examples of these commands in various guises on this forum and on the Kodi one. Search for JSON.

However, if you want to integrate the other way (ie to turn lights off when Kodi starts playing a movie or add controls for things on menus) things are a little more complicated. There are add-ons which will allow Kodi to make an API call when it does certain things (eg one called cinema experience which can make a call to HA to trigger lights) which you can then use in OpenHab to trigger whatever scene you want. Otherwise you can add menu items (depending on the skin) which you can set to trigger a script which you could then set to place an API call.

Unfortunately because Home Automation systems tend by their nature to be very bespoke, it is difficult to find a solution that suits everybody, but with a little ingenuity it is possible to get a lot of things working.

If you didn’t want to go down creating a bespoke solution then there is this option openHAB for Kodi - 3rd Party - openHAB Community but I’ve never used it and so can’t vouch for it directly. I use Node Red atm rather than OpenHab.