Kodi/XBMC Integration Help for non-developer

I’m really struggling with integrating my Kodi Windows based system with SmartThings.

I have absolutely no development background, but throw me in the basement with a box of hardware, hose me off once a week and I am perfectly happy.

I’ve read through every thread relating to XBMC/Kodi here, and I’m still lost on how to get this working.

What my goal is:

When I start a movie, do the obvious thing and dim the lights in the living room down, or give me the option to turn them off entirely.

I also want to be able to dim or turn off any number of other items in the house when this happens.
My dining room and kitchen lights all shine directly into the living room when on.
If I can shut these off when the movie starts, and have them turn back on when I pause, or the movie ends that would be amazing.

Can anyone help me figure out what I need to do to make this work the way I want?

PS: I tried the REST endpoint tutorial and I failed due to my lack of development knowledge.

You may want to ask in this tread for more verbose instructions


Thank you for the link.
I actually got this thing working today after revisiting the REST tutorial without being as frustrated as I was before.

It’s cobbled together, but I have the URL for each device I want to control being hit by wget for Windows.

Basically, On Playback/Resume in XBMC, the XBMC.Callbacks2 addon runs a cmd file in the background.
The cmd file runs a wget command that opens a txt file.
Inside that txt file are all of the URLs for the devices that I want to turn off with the appropriate OAuth token, etc.

On Pause/Stop, the same thing happens, only it calls a different txt file with the on commands for various lights throughout the house.

I now need to figure out how to modify the OAuth PHP file example to support dimming so I can get the URLs for my dimmers with the appropriate commands for dim levels.
Anyone have advice on that?

Holy thread revival but maybe try creating a virtual switch first that goes to a set dim level, then have the script point to that. I will be trying that shortly.

Heh, what a great day to revive this thread! I was revisiting my XBMC integration today, AND it is my birthday. Yay me.

I never did get the setLevel part of this working.

The example PHP file in the tutorial only includes On/Off function.
It does not have anything to include the ability to setLevel on a switch.
Note: This is the PHP file that you use in the example in order to authorize devices AND control them from the web interface that is generated.

Once the web page is generated as part of the example, you can simply right click on the on or off button for the device on the page and then select Copy Shortcut in order to get the device URL with the appropriate command.

While this is a hackish way of controlling a device, it works very well for XBMC/Kodi for turning devices on and off.
I’d rather have my living room lights set level to a lower value than turn off. This is where I’m lost. :frowning:

Create a virtual switch though the api. Then have the virtual switch use the Smart Lighting app. The app allows you to turn on one or more bulbs at a set dim level. When this new virtual switch is told to turn on via XBMC, it will turn on at the desired dim level.

Ie: when movie is started, turn on virtual switch, this will have the light be dim.

BTW, Happy Birthday!

1 Like


you may be interested in my smartapp for Kodi.

please have look here: