HTTP call in response to a trigger?


Um… I don’t think I’m using WebCoRE yet - just regular CoRE - maybe I need to switch? But…

Need some basic guidance: How can I make an HTTP call in response to a trigger?

I’d like to make an http call with a temperature update whenever a temperature changes. Something like

    Temp Changes (I can create this trigger)
    Send HTTP://adress.php/[static text][Temp][static text]

Can I do that in a Piston? Do I need WebCoRE?


definitely. :slight_smile: more powerful and easier to build pistons in a full size browser window than in a smartapp.

if you already know how to do the trigger in webcore, then you should be able to do a http request pretty easily as well. under the then:

  1. click add a new statement
  2. click add an action
  3. click add a task
  4. from the please select a command drop down select make a web request

once you are there the url/params should be familiar if you are used to html coding. if not, just ask.

the pistons are also called pistons in webcore, just easier to build and maintain. :slight_smile:

How do I Make a "Get" request

Boy were you right! webCoRE rocks!


Ok, I am jumping into deep water here. I am slowly learning webcore. I use webcore to interface with Kodi, my audio player. I can Play Track and supply the URL for the song and Kodi will play it. I want to do the same for a playlist. But as far as I know, webcore does not have a Play Playlist. So I was thinking about trying a Make A Web Request and pass the name of the playlist to Kodi to play. If that is possible, I would love some assistance with the code.


If you can call the play list via a URL from a browser or curl then it might be possible to do it via webcore.

Got an example URL?


The URL is : \OSMC\osmc.kodi\userdata\playlists\music\Vocal Trance.xsp

It gives me the following response from my browser :

Of course, it is in the Smart Playlist format used by Kodi. If I can somehow pass the playlist name, Vocal Trance.xsp, to the Kodi slot AudioPlaylist, then Kodi SHOULD play it with a Play command.


I think there is something out there that already works with kodi or an ST integration that someone created… can’t place it at the moment but let me do some searching so we don’t have to reinvent the wheel lol


I admit, I do not know much about how to pass a playlist file name from webcore to kodi.

I did find this. I thought this might help…


So I finally figured out how to use JSON RPC to interface with Kodi to pass a playlist name :{“jsonrpc”:“2.0”,“id”:“1”,“method”:“Player.Open”,“params”:{“item”:{“file”:“special://profile/playlists/music/Christian.xsp”}}}

It took me a while to realize that the URI for files within OSMC use “profile” in the path. Especially since I was sure my path was :


Now I have to figure out how to code that JSON into webcore…