[OBSOLETE] Kodi for SmartThings BETA

When you are editing a piston at the top right of your screen select options and enable “show restrictions”

image

Thanks, I don’t see the “with” under my “only when” section - i see

2018-01-10 18_15_45-webCoRE Dashboard

Also I am unable to get this to work when a movie is played, if I remove the tracktype line and only use execute when playing this dims the lights. but if i add tracktype object.item.videoItem.movie back nothing seems to happen and the piston remains at false

Sorry for all this :slight_smile:

It looks like maybe you have an extra if/then/else statement nested in your else statement? I whipped up a piston with the code used in the screen shot earlier so you can just import it using the import code below and modify as needed.

In regards to your tracktype condition not working in the ST app look at your recently tab for the kodi device and when you play a movie look for something that says “[your kodi device] track type is object.item.videoitem.???”. What you find in place of the question marks is what you will want to use as your condition in webcore.

image

Thanks again, got that imported. In the smartapp I see object.item.videoItem for all video types and nothing after it so looks like this where the problem lies. I am running Kodi 17.4 on Windows 10 and don’t leave the PC on 24/7, not sure if that will make a difference?

Ah yeah sounds like an issue with kodi, wish I could help there but I dont know much about Kodi. Not leaving it on 24/7 shouldnt be an issue, if your using a custom skin in kodi maybe that could mess with the metadata maybe?

Thanks for help anyway with this, I am using a custom skin but when switching back to the default I still see the same.
I will continue playing around with this but for now I think I have got as far as I can on this one.

Does this do notifications? I’m looking for a way to display SmartThings notifications while in Kodi.

Yes, it has the capability to send notifications to Kodi. You can use something like WebCoRE to translate ST events into Kodi notifications.

Ahh there you are - just posted in Facebook asking for your help. Followed all these instructions and smartapp doesn’t find Kodi on my Fire tv. Any advice?

Never mind I guess patience truly is a virtue. My only question is whether entering Kodi user name and password is necessary and what additional benefit it adds to enter that information if it’s not necessary.

1 Like

Also is it the shownotification() command in webCoRE? I can’t seem to get it working.

The Kodi username and password is required if you have a username and password set in the Kodi HTTP server. Without it, you’ll get status updated via UPnP but won’t be able to control anything over HTTP.

You need both a title and a message:

showNotification("Title", "Message")

Take a look starting at the second post I linked above. Or starting somewhere around here: [RELEASE] Kodi for SmartThings BETA

2 Likes

Mr. Lyon you are a genius! That did the trick! Thanks so much!!!

1 Like

Do you know where I can find a list of Kodi activities? I’m trying to use kodi to trigger events in webCoRE such as playing movie would turn off all lights.

Did you see the post just a few posts earlier where @David_Van had an example for when movies play? [RELEASE] Kodi for SmartThings BETA

Ahh that makes sense! I see where you can find out status information. There’s no track type info and freaky not sure when you’d see that anyway. Also don’t see activity type information either. But maybe both of those two require playing my own files instead of streaming…? I’m new to Kodi and not sure, but at least now I’ve got a starting point. Thanks again - your helpfulness is really appreciated!

Yeah I think that depends on the person who’s hosting the file or even the add-on to correctly list what type or genre etc it is.
I think possibly turn on the debug log on Kodi and that would display what’s being played.
I have got a piston for adjusting my lamp but it got on my nerves as i realised I didn’t want it every time so it’s paused now lol

2 Likes

How did you turn on debugging in Kodi? Here’s the device settings in SmartThings app and don’t see anything.

image

I’d wondered too if pistons may get annoying and be nothing more than novelty just the same as when first connecting speakers to SmartThings with verbal notifications everywhere - gets irritating after a while.

The Kodi debug is on Kodi itself nothing to do with SmartThings.
You need to go into the settings on Kodi and turn on debugging.
Are you the same guy I’ve been talking to on Facebook with the freeboard setup lol