[OBSOLETE] Kodi for SmartThings BETA

looks like I didnt. I thought the github integration did both.

The GitHub integration supports both, but the user has to explicitly install the SmartApp (and publish it) and the Device Type Handler (and publish it). :stuck_out_tongue_winking_eye:

1 Like

excuse my noobness, just got the hub yesterday.

You are off to a fast start if you are already playing around in the IDE and installing SmartApps and Device Types! I’ll add it to the FAQ in the second post – thanks for sharing the logs,

1 Like

Hello!

First Joshua, thank for this really nice work! I’m looking for some ideas how to use this in my home. So far this is the ideas I got

-When we start a movie on Kodi, mode change to Television;
-Pause Kodi when we go to the table for dinner. Useful so the children will come to eat!
-When phone is ringing, pause the movie;
-Start a playlist based on rules in RM;

Anything else? :slightly_smiling:

1 Like

Those are great ideas! And I’m sure the community has their own thoughts on how this device type can be used…

  • Dim the lights up when a movie is paused or back down when a movie is playing
  • Change the color of your Hue bulbs whenever your favorite TV show or album is playing
  • Tap a widget on your phone to start your favorite music playlist
  • When the doorbell is rung or someone knocks on the door, pause the playback (and soon, show a notification in Kodi)
  • When motion is detected, play an audio clip (local or from the web)
  • Flip your phone on its face to pause (or mute), and then flip the phone to its back to resume playing
  • Shake your phone to skip to the next song

Note: most of the phone related examples require Tasker and another app I developed called SharpTools.

1 Like

Wow! That will be very nice! Thank you for all the suggestions! Too bad I don’t have an android…

1 Like

Hi

Do you have any plans to add loading and starting Playlist to the smartapp? Can that be done?

Thanks

As in the events so you can react to them?

I have implemented a few playlist commands if that’s what you are looking for:

  • playPlaylist(playlistid) - starts playing the specified playlist (by ID) (0: Music, 1: Video, 2: Pictures)
  • clearPlaylist(playlistid) - clears the specified playlist (by ID)
  • addToPlaylist(playlistid, filename) - adds a file to the specified playlist (0: Music, 1: Video, 2: Pictures)

https://github.com/iamcanadian2222/ST-Kodi/blob/master/CAPABILITIES.md#commands

Guess I missed this… very cool!!

Thanks again!!

I still seem to be having issues… always the problem child. Sorry. I made sure i had the newest version of Rule Machine but I don’t see Kodi in the list of advanced commands. I also updated your Kodi device type but when I tried to update the smartapp I get the error below. Sure it’s something I did…Let me know what I can try.

Thanks

groovy.lang.MissingMethodException: No signature of method: script1455991970903382135494.metadata() is applicable for argument types: (script1455991970903382135494$_run_closure1) values: [script1455991970903382135494$_run_closure1@8a6ced0]
Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure) @ line 21

Make sure you grabbed the right code if you are manually updating it. You need the SmartApp code loaded as a SmartApp and the Device code loaded in a Device Type Handler.

Yep… must have clicked the wrong link. Got that fixed but I still can’t seem to see the advanced commands in RM. I’m going into RM… clicking on the advanced commands at the bottom which opens the test page. When I click to select a device Kodi isn’t listed. Am I in the wrong place? Do I need to do something else first?

Thanks again

Make sure you have the newest version of Rule Machine… under “Custom Commands”, the first item used to be something like “Test Device” and now you should see “Select capability for test device”, then after selecting Music Player as the capability, you’ll get the option to select the device, and then all the custom commands should show up.

Rule Machine Version History
1.7.5: 21 Feb 2016 - Improved custom command selection

1 Like

Hello Joshua,

This is an idea for the notification with the doorbell/knock. You could also add a picture. I use this addon with Kodi.

LJ

Very cool. It looks like the addon for displaying the camera image is running in Kodi and the third party controller (Homeseer) is just triggering the addon with Execute Addon. I should be able to add the Execute Addon command fairly easily - is it something you would use or could test?

Sure thing! I used this addon last year and it was pretty easy and working great. I will see if it’s still working with Jarvis tonight and get back to you.

LJ

I added both methods in the latest commit to the Kodi Device Type Handler (41de067). Also added it to the capabilities documentation.

Send Notification
sendNotification(title, message, [image])

Example usage:
sendNotification("Front Door", "Someone is knocking!"))

Execute Addon
executeAddon(addonid)

Example usage:
executeAddon("script.globalsearch")

Anybody got any ideas on how to say if the door bell is rung use the addon for displaying the picture but tie it in with zoneminder?

EDIT: Sigh sometimes I should really think before I post something. ZM is just using a standard URL as well and since mine is internal only I don’t have any auth turned on for it so bingo :slight_smile: just use the URL from the feed and done.

1 Like

So what exactly is the “addonid” And where would one go about inside of Kodi to find said ID? Is it just the addon name or is it something more?