[OBSOLETE] Kodi for SmartThings BETA

I’m having a similar issue to @User42 except without the momentary pairing – for me, discovery process goes on without discovering any of my Kodi devices (I have 3 android devices).

@User42 were you able to solve your issue?


Have you made your kodi device discoverable be enabling allow remote control via upnp, enabling the web server and also allow remote control by programs on other systems? Those are in kodi settings.

Thanks. I know I’ve got at least the first two of three but maybe not the last. Will check this evening. Much appreciated!

Hey @joshua_lyon just checking in to see if you’ve seen the issue that has been reported on your github in regards to kodi not updating from android devices. If you need more info or anything please let me know I’ll gladly pull whatever I can for you on this.

Thanks @TheFuzz4 - I responded on GitHub. I haven’t dug into in detail as it seems to be limited to Android TV based installations. It works fine on normal Android installations (see the posts in this thread from ~Feb 15) and I could have sworn it used to work fine on Fire TV boxes - maybe a recent OS update changed things?

Yeah I have some MXQ boxes and 1 of these http://a.co/iJgDt5B which btw blow those MXQ’s out of the water.

But I have the same experience with ST and Kodi across the board with all 5 android boxes that I have in my house so it is a little more spread out than just a few devices I don’t think that its related directly to the box itself I do think its something to do with Kodi on Android. My MXQ boxes are on I think either 5.0 or 4.4 android and the N35 is on 6.1 i think ( I dunno it got an update first thing after I plugged it in) but anyways thats my thoughts on this :slight_smile:

1 Like

Thanks for the additional details - it’s interesting to hear that it doesn’t work on any of your Android boxes on so many variants of the OS. I’ll have to see if I still have the Android VM that I tested this on and may have to spin up some new VMs to test. I’m curious what changed as this was working with at least some variant of Kodi on Android at one point.

Yes, I have the uPNP enabled, as well as the remote / HTTP stuff. Neither the Windows 10 PC nor Android (Ouya) passes discovery.

(I can control and interact with Kodi on the Ouya using Yatse, FWIW)

I just deleted all my Kodi devices and went through the discovery process through the SmartApp and noticed the same thing was happening to me as well. I would hazard a guess that something changed with a recent SmartThings platform or mobile app update. I was able to create the devices by checking the boxes for the desired devices, then tapping Done and then immediately tapping Done again before the next discovery cycle occurred.

The alternative is to manually create your devices using the SmartThings IDE, then manually configure the IP address in the device’s settings.
http://graph.api.smartthings.com → My Devices → New Device → Type: Kodi Media Center → [Create]

Note: Also enter in a name for the device (eg. Kodi Main), a network ID (eg. KODI_MAIN), and select your Location and Hub.

Since you are already in the IDE, you can edit the device preferences… or you can edit the device preferences in the mobile app by selecting the device from the Things list and then tapping the cog icon to edit the device preferences.

1 Like

Ok, looks like rapidly hitting done twice managed to get them added, and I’m able to use the remote control on both devices now! Thanks for the tip.

(Any idea if it will also interface with amazon’s Alexa somehow? I can directly control my z-wave light switches through the Samsung smartthings app using voice commands through Alexa on the the Amazon Echo Dot)

I was looking to control lighting based on the type of media being played (i.e., I only want to dim the lights when playing a movie but not a TV show). I’m not sure if this was this was the best method, but it did appear to be least change-heavy way. I guess it’s also possible there’s already something in the code that I would be able to leverage, but I wasn’t able to find anything. I added a new attribute called “trackType” and set the attribute to the value held in itemClass when the metadata comes in on a changed state. Then in CoRE, I only trigger when the value is “object.item.videoItem.movie”. TV Shows appear to be “object.item.videoItem.videoBroadcast”. Thoughts on this method?

A couple of related issues of note. I also use the MythTV PVR plugin with Kodi, but unfortunately it appears that it doesn’t send over a video type in the itemClass, and instead just uses a generic “object.item.videoItem”. Kodi has access to this type of metada in the guide info, so it should be relatively easy to forward that out over the UPnP messages, so I might ping someone over on that side for that. I’m also running the latest beta for Krypton on one of my Kodi boxes, and it appears that when a movie is launched from one of the “Smart” groups (recently added, in progress, unwatched, etc) the metadata comes across blank in the UPnP message. Again, not something that can be fixed on this end, but something to be aware of.

Need to install this instead [Release] Kodi Manager - playing status and control
Harder to install but well worth it as its kodi telling smartthings something has happened. Then create these in CoRE

1 Like

I use this smart app and none other to do something kind of similar. The tv in my bedroom resumes it’s state after losing power so I leave it on and use a smart plug to turn it on and off. With the use of this smart app I can get the state of kodi from OSMC on a raspberry pi 2 and with CoRE (you have to set it as a music player for it to work) I have programmed the tv to turn off after 5 minutes of changing to paused or stopped. For those nights my fiance falls asleep watching TV, and by those nights I mean every night lol.

This can help as a template to do what you need.

1 Like

This app is also Kodi telling smartthings that something has happened, but in a much cleaner fashion. Smartthings is subscribing to Kodi events via UPnP, and when an event is registered, Kodi sends a message to Smartthings. I’m actually quite happy with the way Kodi for SmartThings is working, especially because it only relies on the native features already in Kodi and doesn’t require an add-on. Your response doesn’t address what I was looking to do- differentiating between types of media being played such that they are handled differently. I have already implemented this by making a very small change to the Kodi for SmartThings code, and was just looking for a peer review if that change was appropriate.


It sounds like a reasonable approach to me. videoItem.movie should be a Movie and videoItem.videoBroadcast should be a TV show per UPnP specs. If you’ve already made the code changes, feel free to submit a PR.

Unfortunately, UPnP isn’t always treated as a first-class citizen by Kodi, so we end up with issues like the ones you mentioned. :expressionless:

1 Like

Just submitted the PR. Do you have a link for the document you pulled that from? I was poking around a little to find the spec but came up empty-handed.

PR has been merged. Thanks!

I was looking at the UPnP ContentDirectory service document (Appendix C, 7.2).

1 Like

Love github integration in ST updated without issue.

I’m also curious to see what this does with my kodi st issues with android. Would be interesting if it fixes it

are you referring to uPNP not working and sending events?

Yeah I figured it probably has nothing to do with this but its worth a hope :slight_smile: