![]() |
JSON RPC API - Remote Video Playback - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Video Support (https://forum.kodi.tv/forumdisplay.php?fid=264) +--- Thread: JSON RPC API - Remote Video Playback (/showthread.php?tid=370950) |
JSON RPC API - Remote Video Playback - rtavakko - 2022-12-26 Hi all, I have a raspberry PI 4 set up with LibreElec and my goal is to play a file using the remote API. Remote control from other machines is enabled. I'm having no luck playing a file using the following method (using POST):
Response is:
This GET request works:
With the response:
I've come across various posts and examples asking this question but I can't seem to find a working solution. Any tips would be very much appreciated. Cheers! RE: JSON RPC API - Remote Video Playback - rtavakko - 2023-01-06 Hello? Echo... RE: JSON RPC API - Remote Video Playback - User 476552 - 2023-01-06 I'm using JSONRPC in to start playback on Kodi but not exactly the way you are. I'm using library id so mine is.
The only thing I can recommend to you is that I don't see a path in your RPC call so try it with a full path, library path or plugin path (that is videodb:// plugin:// smb:// or /local/ or C:\ etc) RE: JSON RPC API - Remote Video Playback - enen92 - 2023-01-07 Your post should be done to http://192.168.0.23:8080/jsonrpc with the following post payload: {"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"file":"[email protected]"}}} I.e., the data you post should not be passed as a query argument in the url. RE: JSON RPC API - Remote Video Playback - rtavakko - 2023-01-15 Thank you for your reply! I'm a bit new to this, can you please tell me what the correct format would be? RE: JSON RPC API - Remote Video Playback - rtavakko - 2023-01-22 Any thoughts? I'm not sure how to resolve this RE: JSON RPC API - Remote Video Playback - izprtxqkft - 2023-01-22 i think what youre lacking is that the rpc needs to be sent as a POST request with data instead of a GET request with url parameters i wrote up a quickie to help you, i dont do this for everyone
just change the variable procedure to a quoted json payload for the command you wish to send, if you enable authentication in the kodi web interface you can use the second code set and it will perform the request with a Basic HTTP Authentication, double check the base64 stuff please it was just a quick write up and it could be incorrect for the current kodi version |