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

@Antongiulio_la_cort1 just the device handler I think.

Are you manually pasting in or linked to the IDE? In fact either way you shouldn’t need to update the callback links. The smartapp finger print remains the same.

Manually pasting. I’ll give it a try as soon as I get back home. Thanks.

Ahh ok. Still you shouldn’t need to update the URL’s as the smartapp signature stays the same.

Although its much easier to link the IDE. You can add mine, without removing any you have. Then can just update the setting between beta and master when needed and update smartapp and device handler.

Up to you - it just seems a lot easier to me :slight_smile:

Is this working with kodi v17. And how easy would this be to get working with alexa? just for pause/resume support.

@alkiax yeah it will work with kodi v1.7 (tested on AFTVS)

As for Alexa… Yes. This is assuming you use CoRE and Ask Alexa… Should be easy enough to set up a Do piston for what you want and trigger it with a voice macro.

Play/Pause should be easy, but the idea of what I built is you can do anything. Would take a bit of config in your piston, as you would need to know how many times to go left/right select etc to get what you want playing… but definitely doable…

Give it a try (I’d use the Beta - will be pushing that to release soon). Anything you can do with the remote you can do through a CoRE piston (and more).

I’d appreciate any feedback and let us know here how you get on Would be good for other users to see real use cases here. Hoping to build a bit of a Smartthings/Kodi automation community… :smile:

Tonight the beta version is not loading the icons. Weird.

@Antongiulio_la_cort1 ahh that was me, sorry!

I was sorting out all the resources for some dev, but forgot to push the file location change updates to beta. Done that now, should be fixed.

Ooops!

Hi There. I’m New to ST and I have a Google Home. Is there a simple way (or tutorial) to get Google Home to work with simple functions for your app?

So far, I have installed the app and got it working within the smartthings app. I have downloaded CoRE and Google Home Helper but that is where I am stuck as I am unsure how to get it so I can say a command to google home, then have it activate a CoRE command to play/pause for example.

Any help (as detailed/stepwise as possible) would be great and much appreciated. Thanks!

2 Likes

@north3221 I am looking to leverage your smartapp for lighting control with Kodi. When a movie/show starts playing, I want to dim the lights. When it pauses I wwant them to go to 50% and when it stops, to 100%.

To do this, I have installed the Device Handler and Smart App via GitHub. Do I understand this correctly that when I get here:

Client Name = Smartapp and Assign a name = Device Handler

Am I actually setting the Client name to “Smartapp” and Assign a name to “Device Handler”? Or do I create custom names?

Thanks!

Hi, This is absoloutely great - got it running via the stable channel for the app and device handler.

@Jnick, you can set these names to something preferred (i.e. a custom name)
@north3221, just a quick heads up that the icons aren’t loading for me (ios) - the buttons work as expected, just not the image to support

General question to anyone here - how do the callbacks get set-up in Kodi? I have installed the callback service, i have located the URLs from within the smart-app, unsure how to set-up the task and event type.

I assume in task: set http request = url found in the system
events: link task url to appropriate event

My confusion, which is the appropriate event for: play, pause, stop, resume, shutdown, startup

I am assuming:
play = ??? (on Playback Started)
pause = on Playback Paused
stop = on Playback Ended
resume = on Playback Resumed
shutdown = on Shutdown
startup = on Startup

Hope this is clear.

1 Like

@north3221, I took the beta code and the visuals are working correctly.

Love the way this works. Fantastic Job!
The only thing I have noticed, that I can’t seem to fix, is that when I “shutdown” Kodi my lights dim to the same settings that I have set for “play”. The smartapp doesn’t address the “shutdown” configuration. I recreated the light set up using CoRE and got the same result. Any suggestions? I have tried both the Beta and the Stable versions.
Running Kodi Jarvis on a Minix Neo U1 Android box.

Hi all - sorry for the delay… Been busy with a new baby…

@eddycha Sorry I don’t have google home, but if you have it integrated with ST then it should work like any other device. Can Google Home control CoRE pistons? If so that will be nice and easy.

@Jnick looks like @mitchp88 already answered you - thanks @mitchp88

@mitchp88 The call backs you have it right. The icons, I must have broke the stable when I change everything round for the beta… Glad the beta works at least. I’ll push that to release as soon as I get chance, likely weekend.

@OrangeScuba that’s weird. Although I don’t propose using the smart app for the lights, I am going to remove that at some point. When you changed to CoRE did you remove the set up you had in the smart app? Otherwise, are you sure you have the call backs set up correctly, you might be triggering the play call back on shutdown.

Sorry its been a while - new baby is slowing me down.

Pushed v1.2 live. Feedback welcome guys.

Hi @north3221,

This addon is great.

Can I suggest if you can add the Callback parameters that need to be set for Task in Kodi? Event seems straight forward but I can’t get the task to work.

Some details would help a lot.

Cheers,
vikas

UPDATE:

Managed to get this working using HTTP GET with all other parameters as default.

I have the smart app and device handler installed. I setup the web service and installed the callbacks. Not really sure to set up the tasks and events to get it all work.

Hi all ,
I installed this last night and all seemed to install ok and I’ve tried adding a few different kodi’s now from my tablet and box etc but on the main screen it just says waiting and none of the functions work.
I’ve double checked the ip etc
Anyone had this before ?
Cheers

Same issue here. Using Kodi 17.3 on an Amazon Fire TV. Not too interested in the play, pause, etc. functions since I have a Harmony, but would be nice to use watching a movie, live tv, etc as a trigger in ST.

ive got it connecting now and playing and pausing but have not tried to used it is as a trigger.
not sure it will as the app doesn’t change state so when you play something it doesn’t show on the app as playing, but its still showing waiting on the main thing screen
ill have a look into it when i have some time

This is awesome! Thanks, @north3221!

Once I installed the SmartThings app, Device Handlers and Kodi add-ons, below is what I did to setup the tasks and events in “Kodi Callbacks.”

First, we need to get the URLs for Kodi to send updates:
 On Mobile Device:
  1) Navigate to SmartThings on your device
  2) Tap on “My Home” (at the bottom)
  3) Tap on “Things” (at the top)
  4) Navigate to and tap on your Kodi app
  5) Tap the “SmartApps” tab (at the top-right)
  6) Tap on “Device Handler”
  7) Scroll down towards the bottom to “View URLs” and tap “Click here to view URLs”
  8) Rather than typing out the entire URL, copy to a shareable document or e-mail one of the URLs for easy fetching
   * Notice that the URLs are all the same for most of the Path except for after the last ""

In Kodi:
  1) Navigate to “Kodi Callbacks” (System > Add-ons > My add-ons > Services > Kodi Callbacks)
  2) Click on “Configure”
  3) Under “Tasks,” Setup the 6 tasks with the following edits:
   Task : http
   HTTP string (without parameters) : (enter URL copied from SmartThings)
    *the URL will be followed by, for example, “\pause” or “\resume” etc
  4) Take note of the order of which tasks you specified as with Pause, Play, Resume, etc in the URL
  5) Under “Events” tab, select the event type corresponding to the task.
   For example, if “Task 1” (that we setup earlier) points to the URL,
   “https://graph-na02-useast1.api.smartthings.com:443/api/token//smartapps/installations//play”
   then you would setup the following:
    Event type : on Playback Started
    Task : Task 1

  As @mitchp88 pointed out,

   play = on Playback Started
   pause = on Playback Paused
  stop = on Playback Ended
  resume = on Playback Resumed
  shutdown = on Shutdown
  startup = on Startup

 6) Once you are done (and don’t forget to hit “OK”), you should be able to see the SmartThings app update immediately when you interact with Kodi.

Edit:
My “Tasks” for Kodi Callbacks - 1st image
My “Events” for Kodi Callbacks - 2nd image

5 Likes