[RELEASE] Kodi for SmartThings BETA

smartapp_av
kodi
dth_av

(Jeffrey) #303

I haven’t played with this stuff in years as I really don’t use it but I think you may want to look at this version

This uses the callbacks to get instant status updates. That’s really the only way this is going to work I assume.


(Adam E) #304

Just a note as the original author of that link: It may be two years old, but still works fine - I use it all the time =)


(Gene Clark) #305

Guess I don’t fully understand what they are but what do you use callbacks for? I saw something on Kodi about callbacks but it had a warning saying they’re could be issues if you set them up incorrectly.


(Jeffrey) #306

When setup correctly the callbacks report back to smarthings instantly as you hit play/pause etc. The problem with the other integrations is if you do it outside of Kodi it takes a while for the status update. The callback is instant.


(Gene Clark) #307

Do the callbacks trigger SmartThings actions or does SmartThings trigger Kodi actions?


(Joshua Lyon (SharpTools.io Dashboard)) #308

The version in this thread is instant too. It uses the native UPnP eventing within Kodi. That’s why it requires UPnP to be set up and working properly within Kodi in order to get status updates.

If you can’t get UPnP working, you can install the callbacks plug in and use the call back version of the DTH that was just linked to a few posts above.


(Jeffrey) #309

See how rusty I am - it’s been years since I played with this.

My apologies!

So I guess back to the original question - @GRClark - what isn’t working? Is it just the piston or do you get proper statuses in the devices?


(Gene Clark) #310

Control of Kodi works from SmartThings device created by smartapp, Kodi receives SmartThings notifications sent via webCoRE piston. What I can’t seem to get working is status of Kodi to show in SmartThings device. My next project was to create webCoRE pistons based on Kodi status.


(Jeffrey) #311

Ah well maybe @joshua_lyon can lend some pointers but likely something with upnp I am sure. Can certainly create a second device and try the callbacks options. Ive had both going at once before


(Joshua Lyon (SharpTools.io Dashboard)) #312

Primarily the stuff from the first post. As mentioned before though, it seems some Android based devices (incl. some Fire TVs) appear to block UPnP completely in which case it might be easier to use the callbacks version too.

If UPnP is enabled, you can try tapping refresh in the SmartThings device screen which should attempt to (re)setup the UPnP eventing.

Edit: if I remember correctly, the UPnP eventing is also dependent on the device having been found and setup via the discovery SmartApp as it sets some state variables which are required for making the initial UPnP subscription calls.


(Adam Laakso) #313

I have the same issue. I have an Android box and the solution currently is to manually hit refresh at the bottom right of your Kodi thing after I start a movie. Seems to function until you turn off the android device.


(Gene Clark) #314

So I have all the settings in Koi setup correctly (I think).

Are there certain addon that do and do not work for you or does that trick work everywhere? Like what if I play music in a music addon?


(Joshua Lyon (SharpTools.io Dashboard)) #315

I’m not certain, but if the eventing is working and the media is playing through Kodi, you should at least get playing/paused status… additional things like track data and other metadata would be up to the plug-in developer.

You might also try the callbacks version linked above if you can’t get the UPnP eventing working.


(Steve ) #316

Something changed in the last version of Kodi that stopped it reporting correctly with android.
I read about it on the Yatse blog somewhere (the android app)
Loads of people were struggling to do the setup automatically so had to switch to manual.
So similar to this app I couldn’t get it to update but soon as I entered my IP and port into the IP overide section it then worked.


(Gene Clark) #317

Great advice - That trick worked! Wondering one other thing: is there a way to see Kodi play status in SmartThings? Thinking about setting up webCoRE piston so when Kodi is playing it sets stereo to source and volume plus maybe when paused muted stereo.


(Steve ) #318

Yeah I think it’s just called "playing"
You can tell by playing something and then going onto the recently tab and it will show you what the actions called.
So then in WebCore do something like…
If
Kodi status is
Playing
Then
Change source Etc Etc


(DJAC) #319

hey there. Is there a problem with the smartapp? Device just stopped working. Didn’t touch a thing. Got it to pwgtgtmm routines if movie starts and worked fine. Now it Lautner nothing. Nest I constantly open the smartapp before playing the movie?


(Joshua Lyon (SharpTools.io Dashboard)) #320

Nothing has changed with the SmartApp or Device Type Handler. Some logs showing the error would be one of the first steps in helping troubleshoot.

If it’s an automation that stopped working, have you tried manually controlling the device? It maybe something specific with the automation and not the Device Handler itself.


(DJAC) #321

I will check asap and post logs


(DJAC) #322

does anyone know how or why I pause a movie and that’s fine but when I resume, nothing happens.
Is it not ‘resumed’ and ‘stopped’