[RELEASE] Kodi for SmartThings BETA

smartapp_av
kodi
dth_av

(Jason Hamilton) #121

@MINUS_Stl you might want to talk to @ady624 in the CoRE thread and see if he has any thoughts on this.


(Travis) #122

So according to @ady624, it seems the Kodi DTH isn’t syncing with Kodi running on my Nexus Player. Logs show the CoRE piston firing when I use the controls in the ST app, but nothing shows up in the logs when I use my Harmony Remote.


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

Have you watched the SmartThings Live Logs to confirm the the Kodi Device Type Handler (DTH) is receiving the events?

https://graph.api.smartthings.com/ide/logs

If Kodi isn’t being left on full-time (eg. it is getting backgrounded/killed by Android), I would start by tapping Refresh icon on the Kodi device page in the ST app before starting – this will make sure the event subscriptions are synced up.

Just as a bit of background on how this all works… the Kodi SmartApp discovers your Kodi instances using SSDP (UPnP) and subscribes to events using UPnP – this is why you have to have UPnP enabled on your Kodi instance. This is a really critical part for your setup as the UPnP events are what enables the Kodi DTH to be able to respond to changes made by external sources - like your Harmony remote or Yatse.

The Kodi control through the SmartThings app runs through the Kodi Web Server which is why you have to have the Web Server enabled in Kodi. The difference here is that even if UPnP eventing isn’t working, the Kodi DTH can still parse the response that it receives from Kodi when it makes the web request. This would explain why the events/lights react through direct control through the SmartThings app.

So what it seems like is happening in your case is the Web Server functionality is configured and working as expected, but something about the UPnP eventing isn’t working as expected. The first step, which you may have already taken, is to verify that UPnP is still enabled in Kodi. The second step is to watch the Live Logs while you take a few actions.

  1. Tap Refresh in the ST app and make sure the UPnP subscriptions get setup as expected
  2. Start playing some media from your Harmony remote to see if the Kodi DTH receives the UPnP events
  3. Play/Pause the media from your Harmony to see if the Kodi DTH receives the UPnP events

And I’ll re-iterate again that with a transient instance of Kodi, you may have to manually tap Refresh in the DTH after Kodi is started to sync up the UPnP eventing – otherwise you may have to wait up to 20 minutes for the automatic refresh to occur. UPnP subscriptions expire after some period of time, so the Kodi SmartApp tries to keep those subscriptions up to date by refreshing them every so often. But if the Kodi instance is not available, such as if the Kodi instance is backgrounded/killed by Android, then the subscriptions won’t be able to stay fresh. And if the subscriptions don’t stay fresh, then when you next start Kodi and try to control it with your Harmony remote the events won’t be pushed to SmartThings automatically.


(Travis) #124

After starting Kodi, tapping refresh in the ST app returns this in the Live Log:

> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Current Window: Home
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Received GUI Properties
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Last Command: GUI.GetProperties
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug [id:1, result:[currentwindow:[id:10000, label:Home]], jsonrpc:2.0]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug HEADER: [content-length:79, http/1.1 200 ok:null, cache-control:private, max-age=0, no-cache, connection:Keep-Alive, accept-ranges:none, content-type:application/json, date:Sun, 12 Jun 2016 16:45:49 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug HEADER: [content-length:0, http/1.1 412 precondition failed:null, server:UPnP/1.0 DLNADOC/1.50 Kodi, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Sending command: GUI.GetProperties
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Executing 'getCurrentActivity'
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Last Command: Application.GetProperties
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug [id:1, result:[currentwindow:[id:10000, label:Home]], jsonrpc:2.0]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug HEADER: [content-length:79, http/1.1 200 ok:null, cache-control:private, max-age=0, no-cache, connection:Keep-Alive, accept-ranges:none, content-type:application/json, date:Sun, 12 Jun 2016 16:45:49 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug The subscription will expire at 1465751749228
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug The time now is 1465749949228
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Event Subscription Timeout: 1800
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Event SID: 68298a16-2c03-342e-b90d-a115252cb136
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Current Event Subscriptions: [e0a1029e-a48b-bca6-3185-299dada439be:1465751462242, ac6dce5a-6047-7862-fd41-e5596960f57a:1465751748909, 24e546d2-e8cf-f0ea-75c9-6dd1e1e87df2:1465751462393]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug HEADER: [content-length:0, sid:uuid:68298a16-2c03-342e-b90d-a115252cb136, timeout:Second-1800, http/1.1 200 ok:null, server:UPnP/1.0 DLNADOC/1.50 Kodi, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Sending command: GUI.GetProperties
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Executing 'getCurrentActivity'
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug Last Command: Application.GetProperties
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug [id:1, result:[muted:false, name:Kodi, volume:100, version:[revision:2016-04-24-eaa012d, minor:1, tag:stable, major:16]], jsonrpc:2.0]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug HEADER: [content-length:156, http/1.1 200 ok:null, cache-control:private, max-age=0, no-cache, connection:Keep-Alive, accept-ranges:none, content-type:application/json, date:Sun, 12 Jun 2016 16:45:49 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: debug HEADER: [content-length:0, http/1.1 200 ok:null, server:UPnP/1.0 DLNADOC/1.50 Kodi, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:49 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Sending command: Application.GetProperties
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace NO PLAYERS Active
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug Last Command: Player.GetActivePlayers
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug [id:1, result:[], jsonrpc:2.0]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug HEADER: [content-length:36, http/1.1 200 ok:null, cache-control:private, max-age=0, no-cache, connection:Keep-Alive, accept-ranges:none, content-type:application/json, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug The subscription will expire at 1465751748909
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug The time now is 1465749948909
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug Event Subscription Timeout: 1800
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug Event SID: ac6dce5a-6047-7862-fd41-e5596960f57a
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug Current Event Subscriptions: [e0a1029e-a48b-bca6-3185-299dada439be:1465751462242, ac6dce5a-6047-7862-fd41-e5596960f57a:1465751306134, 24e546d2-e8cf-f0ea-75c9-6dd1e1e87df2:1465751462393]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug HEADER: [content-length:0, sid:uuid:ac6dce5a-6047-7862-fd41-e5596960f57a, timeout:Second-1800, http/1.1 200 ok:null, server:UPnP/1.0 DLNADOC/1.50 Kodi, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug HEADER: [content-length:0, http/1.1 412 precondition failed:null, server:UPnP/1.0 DLNADOC/1.50 Kodi, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug HEADER: [content-length:0, http/1.1 412 precondition failed:null, server:UPnP/1.0 DLNADOC/1.50 Kodi, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug HEADER: [content-length:0, http/1.1 412 precondition failed:null, server:UPnP/1.0 DLNADOC/1.50 Kodi, date:Sun, 12 Jun 2016 16:45:48 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Sending command: Player.GetActivePlayers
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace SUBSCRIBE 192.168.29.251:2044 to /AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace subscribe(/AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml, )
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace UNSUBSCRIBE FROM 192.168.29.251:2044 at /AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace unsubscribeAction(/AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml, 24e546d2-e8cf-f0ea-75c9-6dd1e1e87df2)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace UNSUBSCRIBE FROM 192.168.29.251:2044 at /AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace unsubscribeAction(/AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml, ac6dce5a-6047-7862-fd41-e5596960f57a)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace UNSUBSCRIBE FROM 192.168.29.251:2044 at /AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace unsubscribeAction(/AVTransport/ac6dce5a-6047-7862-fd41-e5596960f57a/event.xml, e0a1029e-a48b-bca6-3185-299dada439be)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: trace Clearing existing event subscriptions and getting a new subscription.
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug Getting status from 192.168.29.251:8080
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  11:45:48 AM: debug Executing 'refresh'

Starting media from the Harmony remote and pausing/resuming media from the Harmony remote doesn’t give anything in the logs.

Starting media from the ST app gives me this in the log (but lights don’t turn off):

> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:05:40 PM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:05:40 PM: debug Last Command: Input.Select
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:05:40 PM: debug [id:1, result:OK, jsonrpc:2.0]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:05:40 PM: debug HEADER: [content-length:38, http/1.1 200 ok:null, cache-control:private, max-age=0, no-cache, connection:Keep-Alive, accept-ranges:none, content-type:application/json, date:Sun, 12 Jun 2016 17:05:40 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:05:40 PM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:05:40 PM: trace Sending command: Input.Select

Hitting Play in the ST app (even though media is already playing) gives me this in the log:

> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: trace ╔═══ Task processing took 172ms
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: trace ║░░░ Removing any existing ST safety nets
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: info ║░░░ Executing command: [GE Link Table Lamp].setLevel([25]) (28ms)
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: info ║░░░ Executing command: [GE Link Floor Lamp].setLevel([25]) (28ms)
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: trace ║░░░ Installing ST safety net
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: trace ║░░░ Rescheduling time triggers
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: trace ╚═══ Processing tasks (v0.0.089.20160612)
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: trace ╔═══ Event processing took 71ms
> 7e3ab3a9-7cf1-44a8-8562-eb3a48e3adb4  12:08:01 PM: trace ╚═══ Processing event status for device Kodi - LR with id 47b25fca-e6d1-4e60-8859-f7372f2bd9f1, value paused, generated on Sun Jun 12 17:08:01 UTC 2016, about 56ms ago (v0.0.089.20160612)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: debug running todos
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: trace Player Status is: paused
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: trace speed: 0
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: debug Last Command: Player.PlayPause
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: debug [id:1, result:[speed:0], jsonrpc:2.0]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: debug HEADER: [content-length:45, http/1.1 200 ok:null, cache-control:private, max-age=0, no-cache, connection:Keep-Alive, accept-ranges:none, content-type:application/json, date:Sun, 12 Jun 2016 17:08:01 GMT]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: trace Response Received (with Headers and Body)
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: trace Sending command: Player.PlayPause
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: debug params: [playerid:1]
> 47b25fca-e6d1-4e60-8859-f7372f2bd9f1  12:08:01 PM: debug Executing 'play'

As you can see, the CoRE piston finally fires and my lights go to a dimmed state (paused status). Hitting Play in the ST app again resumes playback and my lights turn off. However, hitting play on the Harmony remote returns nothing in the log, nor changes my lights. Even after hitting refresh in the ST app, controls from the Harmony remote do not return anything in the logs.


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

Thanks for the logs. Have you tried disabling then re-enabling "Allow remote control via UPnP" in Kodi? And have you tried removing and re-adding the Kodi device in SmartThings? There’s something weird with the subscriptions going on, but I can’t quite tell what it is. The three old subscriptions are failing to unsubscribe and even though it looks like you are getting a new UPnP event subscription, that subscription doesn’t seem to be getting any events.

In the second block, when you start the media, you are getting a confirmation from the Kodi Web Server that it received your Input.Select command, but it’s never getting the UPnP event showing which media started.

And in the third block, you are getting the confirmation from the Kodi Web Server that the Play/Pause command was received and specifically that the Player is currently paused (speed:0), but again the UPnP event showing that the media is paused is not coming across.


(Travis) #126

I’ll try disabling/re-enabling control via UPnp as well as removing/re-adding the Kodi device later today.


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

I just setup Kodi on my Nexus Player and tried the integration and it seems to be broken for me too. I’m not sure why the UPnP integration wouldn’t work on the Nexus Player as it works fine on other Kodi installations including Android installations.


(Travis) #128

Now that’s just odd.


(kojak) #129

I am new to SmartThings, and I am trying to figure this out. I was able to get the Kodi manager device to work and control my Kodi. However I am not able to get the smart app to work. I am using the latest version of smartThings app on my Android phone. The instructions say to go to smart apps on the mobile device, scroll to the bottom find my smart apps. I don’t have any category on my ST app that says My apps. Also the Kodi manager smart app is supposed to be in a category called “fun & social” but I can’t find that category on my phone. I would love to be able to assign a smart app to the Kodi device so I can link lights to the play and stop commands, but none of the smart apps listed will allow that. Sorry if this is a noob question, and thanks in advance.


(kojak) #130

Ok I figured it out. I logged out of the app and back in and now I see my apps. I was able to get the smart app to work in that it found my kodi. However it won’t let me link any other things to it. Is there a way to link lights so they dim when something is played? Or is there another app thatthat will allow me to do this that I can use with kodi.


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

You’ll need something like CoRE (or even SharpTools/IFTTT) to be able to react to events.


(Jason Hamilton) #132

@kojak35 see my post above [RELEASE] Kodi for SmartThings BETA with the pic of my piston from CORE that tells you how I react to the events.


(kojak) #133

This may be a noob question, but I don’t understand why kodi for smartThings does not update the Kodi status instantly when the status changes, but when I have the Yatse app open on my phone as soon as I press play on my harmony remote the app updates status to show what is playing. How can the yatse app update instantly when open on the phone, but not the ST thing for Kodi? I would think whatever is happening to cause the Yatse app to show the correct status of Kodi could be used in ST. I have been able to use CoRE to link my lights to Kodi but it will only trigger if I use Kodi in ST. The ultimate goal is to have it work no matter what remote I use to start, pause or stop playing in Kodi.


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

What type of device are you running Kodi on in your scenario? The Kodi DTH will update status immediately even if you use your Harmony remote as long as the UPnP eventing is working.


(kojak) #135

I am using it on an android box called GBOX Midnight. I was able to get it working by using the CInema Vision Addon for Kodi, just not when I play movies back normally when not using Cinema Vision.


(Timberjoegithub) #136

So I am having an issue that I have not seen others have and that is with device discovery. I show it finding unverified devices (lots) and then starting to verify them and stopping after one or two. No error, but clearly not going through the list or ever getting to the actual kodi devices. Right now it seems to die when trying to verify an Xbox One… and not processing the rest of the list


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

Interesting. Are you seeing this series of events happening by watching the SmartThings logs? (eg. the discovery coming back with a large list, then the validation getting stuck after the Xbox one?)

I don’t have direct access to my devices for testing at the moment, but if you have manually installed the code, you might consider adding some logging to the deviceDiscovery(), verifyDevices(), verifyDevice(), and parseDESC() methods to see if anything odd shows up.

In theory, after the devices are discovered in deviceDiscovery(), the SmartApp should occasionally call verifyDevices() which will loop through the unverified devices and call verifyDevice() for each unverified device which sends out the HTTP call to the Kodi devices to grab their SSDP discovery XML file. When the device responds with its XML file, it will hit parseDESC() which looks to see if it is a Kodi device before adding it to the validated devices. In theory, the verifyDevice calls should happen in parallel, so a failed validation (eg. Xbox) shouldn’t stop things, but maybe it’s throwing an exception that’s causing the deviceDiscovery to fail.


(Alex) #138

@joshua_lyon

I’m receiving the following error log when adding Kodi to the app:

error: physicalgraph.app.exception.UnknownDeviceTypeException: Device type ‘Kodi Media Center’ in namespace ‘boshdirect’ not found. @ line 231

Any idea why?


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

Can you confirm that you loaded the SmartApp as a SmartApp and the Device Type as a Device Type?


(Alex) #140

Yep figured it out! I forgot to publish the Device Type in IDE.

It is now working properly.