[OBSOLETE] [V 1.2] Kodi Manager - integrate and control Kodi with Smartthings

@north3221 I’ve got a couple questions about this setup - what are these settings for in the device? Do they do anything?

Also what commands do I use in webCoRE? Am I actually using the commands for pause, play, etc.?

Couple things - this does two way communication? So like I could use a callback to trigger a SmartThings action? If so how do I do that? Say for example playing Kodi dims all lights. I’ve got it working only one way now - from SmartThings to Kodi via virtua momentary buttons but not sure I’m taking full advantage of the callbacks feature.

Also what does this button do?

For those interested in controlling Kodi with webCoRE. You can control many things within Kodi with webCoRE. For instance, Play Track works very well. I was wanting to pass a playlist name from webCoRE to Kodi and play it. There is NOT a Play Playlist command in webCoRE. I had to learn to use JSON RPC and access the Kodi API to do that. The setup is a bit tricky. But it took literally two lines of webCoRE code to do it. See here for the details.

Ultimately I wish there was a way to use Alexa to control Kodi without having to setup all the code in WS and Lambda. I’ve seen these but never set them up and unsure how well they work or what the difference between them is since they’re made by the same guy.

It looks like “on playback started” does not trigger properly anymore on Kodi 18.
This is also being discussed on the Callback Kodi forum…
Any solution/alternatives/ideas?
Thanks!

I use Kanzi and it is fantastic. And I have been writing Webcore pistons to interact with Kanzi for specific tasks.

Same for me on Kodi 18. This was working great on 17. I’m using this in conjunction with CoRE to control two different sets of lights based on Kodi events. I’m running Kodi on an nvidia shield and it upgraded to 18 all on its own (even though I have autoupdate turned off). It still seems to recognize playback paused and resumed, but the playback started function is broken. If this doesn’t get fixed or another solution doesn’t present itself, I’ll have to go back to 17 as painful of a process as that is. It was a little cumbersome to set this up, but it works great on 17.

1 Like

is this project still being worked on?

1 Like

There is something wrong with the callback script for Kodi 18, but you can easily fix it by changing “except KeyError:” on line 269 in player.py to “except (KeyError, IndexError):”

Restart Kodi after the change (or you can download the zip with the fixed line here and installed it)

For me the playback states works correct after fixing that line.

Is anyone still using this? I realize this is turning into an ancient bit of code which means I might have to find something else. I recently tried to add a new Kodi client to this using the smartthings app but the app throws an error after tapping “done”: “We’re having trouble connecting. Check your network connection and try again.”

It doesn’t matter what network I’m on (tried multiple wifi and lte).

The livelog in the smartthings IDE showed this error:
“java.lang.NullPointerException: Cannot get property ‘id’ on null object @line 278 (checkKodi)”

Does anyone know that this means?

Thanks!