How do I set kodi username and password in openhab 2?

Hi all

I’m busy migrating from openhab 1 to 2 and still getting used to the new notations.
I just installed the Kodi binding. My Kodi installation uses a username and password, I’m not sure how I can define that now.

Tried it in the things file
kodi:kodi:osmc [ipAddress=“192.168.1.137”,port=“9090”,username=“myusername”,password=“mypassword”]
but that doesn’t seem to work. The Thing in PaperUI is still listed as “offline”.

The documentation doesn’t mention how to do it either.

Thanks for any help

The new Kodi binding uses the websocket API. This API does not require user id and password. But you have to enable remote control within Kodi.
The easiest method to setup the Kodi connection is to remove the things file and let the Kodi add-on perform everything automatically. Normally the add-on is detects all active Kodi instances within your network automatically and shows the in Paper UI in the “Inbox”. From there you can add the Kodi instance(s) as things.

Thanks for your reply! I checked the settings again and tried to activate all possible “remote control” features I found (including zeroconf, upnp…). I now removed the things file, but the Kodi instance is not found.
Do you have any other idea? Otherwise I’ll try to remove / add the binding again.

Did you restart openHAB after removing the things file? Or maybe the problem is caused by a firewall that blocks Port 9090 resp. Upnp (this method is used by the add-on to find the Kodi instances).

Oh, apparently I had to restart kodi itself! Now I have the Kodi instance in the inbox, will test further.
I want to configure it manually after that though.

But:
In openhab2 log, I see the following warning:
2017-02-05 13:49:47.411 [WARN ] [hab.binding.kodi.handler.KodiHandler] - Exception in check connection to @ws://192.168:9090/jsonrpc. Cause: Could not update status, because callback is missing

Hmmm, haven’t seen this message before. Which Kodie version are you using?

Maybe @pail_frank23 can help with it.

I’m running the latest stable osmc, think it uses Kodi 16.1. Thanks anyway!

Was able to fix it. These errors filled up my openhab.log even after uninstalling the Kodi binding! So I restarted openhab, installed the binding and now everything works. Was able to manually define a kodi.things. :grinning: