•   
  • 1
  • 9
  • 10
  • 11
  • 12
  • 13(current)
Working JSON RPC API Examples
(2019-11-16, 08:00)IT007 Wrote: Thanks, looks a bit cleaner that what I came up with. I use logitech harmony and needed this for the power off command to stop kodi playback before exiting.
No problem.  I also use a Logitech Harmony for controlling Kodi, etc.
Reply
(2018-09-23, 19:48)iophobia Wrote: Don't know where to put this but hope somebody can help.

As of Kodi 17 I used to invoke Alexa --> IFTTT --> Kodi JSON-RPC to change PVR channels in Kodi via HTTP GET and "http://URL/jsonrpc?request={ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "channelid": 5} }, "id": 3 }" which worked liked a charme. I understand that the API changes in v18 don't allow for "GET" but I simply have no idea how a working example for the v18 API would look like for my case.

Thanks in advance.
Anybody managed to get Player.Open to work via IFTTT in Kodi 18? I don't wanna mess around with (my)OpenHAB implementations or such if it can be done in an easier way that already worked in v17.
Reply
(2019-12-18, 15:41)iophobia Wrote:
(2018-09-23, 19:48)iophobia Wrote: Don't know where to put this but hope somebody can help.

As of Kodi 17 I used to invoke Alexa --> IFTTT --> Kodi JSON-RPC to change PVR channels in Kodi via HTTP GET and "http://URL/jsonrpc?request={ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "channelid": 5} }, "id": 3 }" which worked liked a charme. I understand that the API changes in v18 don't allow for "GET" but I simply have no idea how a working example for the v18 API would look like for my case.

Thanks in advance.
Anybody managed to get Player.Open to work via IFTTT in Kodi 18? I don't wanna mess around with (my)OpenHAB implementations or such if it can be done in an easier way that already worked in v17. 

I also have the same exact issue.  It's one of the reasons why I haven't upgraded to Kodi 18.  I use Cortana --> IFTTT --> EventGhost --> Kodi JSON-RPC on Kodi 17.6 (DSPlayer build).  If you (or anyone) figures it out, PLEASE post here.  I will also do the same.
Reply
how to shutdown kodi using request from external server?
when was a normal version of kodi I used this url
Quote:getURL('http://192.168.1.12:8080/jsonrpc?request={"jsonrpc":"2.0","method":"System.Shutdown","id":1}');
Reply
Can anyone give me a working example of subscribing to notifications?

When I pass this:
{"jsonrpc": "2.0", "method": "Configuration.Notifications", "id": 1}

I get this:
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}
Reply
(2020-05-22, 05:20)madkat Wrote: Can anyone give me a working example of subscribing to notifications?

When I pass this:
{"jsonrpc": "2.0", "method": "Configuration.Notifications", "id": 1}

I get this:
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}
Scratch that, I'm getting somewhere now:

{"jsonrpc": "2.0", "method": "JSONRPC.SetConfiguration", "params": {"Configuration.Notifications": { "PVR": true, "Player": true }}, "id": 1}
Reply
(2020-05-22, 05:25)madkat Wrote:
(2020-05-22, 05:20)madkat Wrote: Can anyone give me a working example of subscribing to notifications?

When I pass this:
{"jsonrpc": "2.0", "method": "Configuration.Notifications", "id": 1}

I get this:
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}
Scratch that, I'm getting somewhere now:

{"jsonrpc": "2.0", "method": "JSONRPC.SetConfiguration", "params": {"Configuration.Notifications": { "PVR": true, "Player": true }}, "id": 1}
 
I'm not seeing any notifications though...? (Connected via TCP)
Reply
(2020-05-22, 14:24)madkat Wrote:
(2020-05-22, 05:25)madkat Wrote:
(2020-05-22, 05:20)madkat Wrote: Can anyone give me a working example of subscribing to notifications?

When I pass this:
{"jsonrpc": "2.0", "method": "Configuration.Notifications", "id": 1}

I get this:
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}
Scratch that, I'm getting somewhere now:

{"jsonrpc": "2.0", "method": "JSONRPC.SetConfiguration", "params": {"Configuration.Notifications": { "PVR": true, "Player": true }}, "id": 1}
 
I'm not seeing any notifications though...? (Connected via TCP) 

I am seeing notifications - e.g. play/pause.

New problem with Live TV: I pass this method invocation:
{"jsonrpc": "2.0", "method": "Player.GetProperties", "params":{"playerid":1,"properties":["totaltime","time"]}, "id": 1}

And I get back a perfectly sensible reply:
{"id":1,"jsonrpc":"2.0","result":{"time":{"hours":0,"milliseconds":0,"minutes":40,"seconds":11},"totaltime":{"hours":1,"milliseconds":
0,"minutes":0,"seconds":0}}}

However, the "time" is the time of the stream, not the time of the playing programme - if I pause, the "time" returned continues to increase. Do I need to do something with the PVR to get the state information I'm looking for?
Reply
  •   
  • 1
  • 9
  • 10
  • 11
  • 12
  • 13(current)
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Working JSON RPC API Examples00
This forum uses Lukasz Tkacz MyBB addons.