Custom command - HTTP POST not working

Hi folks,

I’m trying to create a custom command with HTTP POST, but I don’t get it to work.

What I got working is to create a JSON-RPC command like this:
JSON-RPC method : Player.PlayPause
JSON-RPC params : {“playerid”:0}

I create a HTTP Custom Command like this:

Name : NewName
Command Type : HTTP POST
Server:Port : 192.168.178.108:8080
Path : (no specific url)
Post data : {“jsonrpc”:“2.0”,“method”:“Player.PlayPause”,“params”:{“playerid”:0},“id”:1}
Login : (my login)
Password : (my password)
Timeout : 10 (by default)
Content Type : application/json
Do not show errors : no
Show response : yes (translated this from german)

Under “Content-Type” there are 4 feelds with “name” and “value”. I don’t know what to type in there and left it empty. Is that right?

When I click the command I get a longer html script as response, but the command doesn’t work. So the login is working, but the script is not.

Do you have any idea how to get it to work? Or do you have an example thats working?

Thanks for your help!

As always logs please :slight_smile:

But in all cases path should be jsonrpc

And why use http and not the easy ones?

Thanks a lot, Tolriq!

“/jsonrpc” solved my problem :wink:

Why I want http: I have a older setup of Kodi on a RaspberryPi that is controlling my ambilight. I changed my system to a MediaPC but the Ambilight is still on the Raspberry (so far). As the MediaPC can’t controll the TV by CEC my Idea was to send this comand with the Rapberry. So far this is working, but I habve to change the Yatse Host from the MediaPC to the Raspberry everytime I want to do turn the TV on/off and back. So with HTTP I can directly adress the comand to the Raspberry by IP.

Also controlling different presets of the ambilight should be possible. I will try this soon :wink:

So thanks again. (Next time I’ll post the logs O:-) )