[SOLVED] Kodi 18: binding broken?

kodi
binding
Tags: #<Tag:0x00007fe057f65da8> #<Tag:0x00007fe057f65bc8>

(Michael) #1

Since the upgrade of my Kodi instance from version 17.6 to current Kodi 18 “Leia” last week, my openHAB installation does not communicate with it anymore. So far, I had successfully used a setup as described in this post including light control. In my setup I have used a Kodi thing installed via Paper UI but it seems to have stopped working after the Kodi upgrade.

My setup:

  • openHAB 2.4
  • Raspberry Pi 3 Model B+
  • current openHABian
  • Amazon FireTV 1st generation

What I did to solve it:

  • Uninstalled and reinstalled Kodi binding => no success
  • Deleted and recreated Kodi thing via Paper UI => no success
  • Uninstalled Kodi thing and defined a Kodi thing in a .things file according to the binding documentation => no success

The events log keeps reporting a communication error. Now my fear is that the upgrade of Kodi itself broke the setup, i.e. the current binding does not work with Kodi v18. Are there any experiences with this issue out there?


(Christian W) #2

Looks like there was indeed a change in the Kodi API

from https://forum.kodi.tv/showthread.php?tid=329317

I don't know very much at all about this area of Kodi, but since no one else has replied yet, I'll feedback on what I been led to believe is the situation.

If you want to use the JSON API for read commands then you can still use either GET or POST.

If you need to use the JSON API for an action, write command, or anything else that will modify the state of Kodi then you must use POST.

So HTTP commands will still be accepted however the type of request will determine whether GET can be use.

Kodi Wiki v18 API Changes (but currently incomplete)

JSON Methods


(Michael) #3

Thank you, Christian!

There is information about 2 different API versions:

Hopefully, somebody is able to find out what has substantially changed there and broke the binding.


(Michael) #4

@cweitkamp Hey Christoph, just to make sure that you are involved. Maybe you have also upgraded your Kodi instance?


(Michael) #5

OMG… Seems like the binding is NOT broken. I have double-checked the instructions from the binding documentation

In order to allow control of Kodi by this binding, you need to enable the Kodi application remote control feature. Please enable “Allow remote control from applications on this/other systems” in the Kodi settings menu under:

Settings ➔ Services ➔ Control ➔
    Allow remote control from applications on this systems
    Allow remote control from applications on other systems

To make use of the auto-discovery feature, you additionally need to enable “Allow control of Kodi via UPnP” in the Kodi settings menu.

Settings ➔ Services ➔ UPnP / DLNA ➔ Allow remote control via UPnP

and found out that the upgrade reset all those settings to their default, i.e. they all were wrong. Once I have set the correct settings again (which I actually did a year ago or so!) everything is working now!

I am very sorry for the inconvenience I have caused.


(Christoph Weitkamp) #6

Hi Michael,

I am. Thanks. My Kodi runs with 18 since alpha for months. Everything works like a charm. Can you please check your settings according to the docs. Credentials, port, etc.?

The binding itself uses a websocket connection. No HTTP communication involved …

I think I can stop typing … Just saw your answer …


(Michael) #7

Thank you, Christoph! :blush:

My upgrade has been a total mess. Kodi 18 lost almost all settings from version 17.6 including sources, keymaps, and so on. This was the very first time it happened to me with Kodi. Unfortunately, I have thought of checking those preparation settings far too late. I was quite sure I had set them right. But this won’t happen again as there is a safe backup of all Kodi settings now. :wink:


(Christoph Weitkamp) #8

Alright. I am glad you got it working again. :+1:


(Ward) #9

I also saw a strange behavior. The binding itselves works fine, but every 5 minutes I see this in the log:

2019-02-11 21:10:03.870 [hingStatusInfoChangedEvent] - 'kodi:kodi:libreelec' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No connection established
2019-02-11 21:10:04.134 [hingStatusInfoChangedEvent] - 'kodi:kodi:libreelec' changed from OFFLINE (COMMUNICATION_ERROR): No connection established to OFFLINE (COMMUNICATION_ERROR): Connection could not be established
2019-02-11 21:10:04.146 [hingStatusInfoChangedEvent] - 'kodi:kodi:libreelec' changed from OFFLINE (COMMUNICATION_ERROR): Connection could not be established to ONLINE