[RELEASE] Kodi for SmartThings BETA

smartapp_av
kodi
dth_av

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

What troubleshooting have you done so far?

The device status is set in one of two ways:

  1. When the UPnP event comes in reflecting the updated status. [Reference]
    Note: This requires that UPnP eventing is setup properly, but this is the primary and preferred way of maintaining the status.
  2. In the JSON response if you manually control Kodi via SmartThings [Reference]

(DJAC) #324

Thank you… But I’m just struggling with the resume.
I can see Kodi is playing and when it stopped.
But pause works excellently but resume does not.
From the hit hub, I actually don’t see resumed, so how does Kodi distinguish between movie started and resumed… ?


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

Started and Resumed are both just a status of ‘playing’.


(DJAC) #326

thank you. I thought we could be more specific so that when a movie pauses, i switch on a few lights and on resuming, i switch them back on


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

Playing, Paused, Stopped are the currently monitored status events (from UPnP). Keep in mind there are a number of other attributes the device type exposes as documented here:

Using just the status attribute, you would still be able to do something like:

  1. Dim the lights to 0% when you start playing something
  2. Dim the lights to 50% when you pause something
  3. Dim the lights to 0% when you resume playback (eg. toggle play/pause)
  4. Dim the lights to 100% when you stop playback

Again, the “playing” and “resumed” in this case are both just “playing” statuses… if you wanted to get more fancy than that you would need to use something else to help tie in some additional logic. Maybe consider the last status, or trackDescription, trackData, trackType, currentWindowID, or currentActivity when the status changes to “playing”.


(Gene Clark) #328

I’ve since noticed the execute addon command I’m wondering if anyone can offer tips on finding out what ID of addons would be? It appears to be just the directory of the addon, correct?


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

@GRClark If I remember correctly, some Kodi skins used to show the add-on ID when viewing its settings. I don’t know if it would always be the directory of the add-on, but the add-on ID should be available in the add-on’s XML file (among other places).


(Gene Clark) #330

Another question: how can I get past this without having to remove device? I’ve checked and re-checked to make sure credentials are correct but this error won’t go away.


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

The username and password should only get used in commands if the username is set (the cog in the top-right).

I haven’t used Kodi for a long time now, so it’s possible that something changed with their authentication approach if you are using a newer Kodi version?


(Gene Clark) #332

Excuse me for being dense, but capabilities include being music player so I’m wondering is there a way to specify a URL of MP3 and have it played on Kodi? Or can you not send media to Kodi that way?


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

I noticed you liked the capabilities doc a few posts up - not sure if you found your answer in there but there are options for playing files (even from the web).

The music capability is primarily in there for allowing people to select the device in various rule engines and SmartApps but many of the methods map to other media player methods (this is also documented in the capabilities doc).

playFile(filename) - starts playing a file (can be a local or HTTP streamed file!)