Help needed with JSON commands - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: Help needed with JSON commands (/showthread.php?tid=362391) |
Help needed with JSON commands - dshorrosh - 2021-05-03 I am unable to use JSON commands for the following functions and would appreciate some guidance. Thanks in advance for your help! Here are the functions and JSON strings that I'm trying to use: 1 - Display thumbnails of all movies scanned to 3x separate logical drives (entire contents display fine when navigating via menu) - Computer / Movies1 ( D : ) / Movies, Computer / Movies2 ( J : ) / Movies, Computer / Movies3 ( H : ) / Movies, jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos,library://video/movies/titles/"},"id":"1"}} 2 - Display thumbnails of all albums scanned to Computer / Music ( F : ) / Music jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"library://music/music/,return"},"id":"1"}} 3 - Display thumbnails of all concert videos scanned to Computer / Concerts ( L : ) / Concerts jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos,library://video/concerts/titles/"},"id":"1"}} Also, the 'instant record' and 'weather' commands are no longer working after upgrading to Leia: 4 - jsonrpc?request={"jsonrpc":"2.0","method":"PVR.Record", "id":1} 5 - jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"weather"},"id":"1"}} RE: Help needed with JSON commands - dshorrosh - 2021-05-04 Update: the following JSON command executes properly - opens up the PVR channel guide: jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"tvchannels"},"id":"1"}} I tried using the exact same syntax for 'movies' and 'music albums', simply replacing "tvchannels" with "videodb://movies/titles/" or "MovieTitles" for movies, and "musicdb://albums/" or "Albums" for music. Nuthin. Any suggestions? RE: Help needed with JSON commands - dshorrosh - 2021-05-04 Update 2 - I turned on verbose logging for JSON, and found in the log: The 'movies' and 'music' commands did not result in an error but were immediately followed by "Value does not match any of the enum values in type window"
The 'weather' command resulted in an error "Failed to parse jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"weather"},"id":"1"}}" Hopefully this will help identify the problem or fix. Thanks in advance. RE: Help needed with JSON commands - Sidewinder_2011 - 2021-05-04 (2021-05-04, 04:37)dshorrosh Wrote: Update 2 - I turned on verbose logging for JSON, and found in the log: hiya you nearly had it right , you just left out the ,"parameters": try this eg {"jsonrpc":"2.0","method":"GUI.ActivateWindow","id":1,"params":{"window":"videos","parameters":["videodb://movies/titles"]}} {"jsonrpc":"2.0","method":"GUI.ActivateWindow","id":1,"params":{"window":"videos","parameters":["musicdb://albums/"]}} for the weather its {"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"weather"},"id":"1"} , you add too many } at the end. RE: Help needed with JSON commands - dshorrosh - 2021-05-04 (2021-05-04, 18:56)Sidewinder_2011 Wrote:Thank you for the reply! I'll try it out this evening and report back.(2021-05-04, 04:37)dshorrosh Wrote: Update 2 - I turned on verbose logging for JSON, and found in the log: RE: Help needed with JSON commands - dshorrosh - 2021-05-05 Thanks for your help - the movies and music commands work. I'm a little embarrassed - not very familiar with JSON syntax but as an IT guy I should have noticed the missing param in those. Unfortunately the weather button is still a no-go, along with the record command, so I'll keep digging. Thanks again! RE: Help needed with JSON commands - Sidewinder_2011 - 2021-05-05 (2021-05-05, 00:20)dshorrosh Wrote: Thanks for your help - the movies and music commands work. I'm a little embarrassed - not very familiar with JSON syntax but as an IT guy I should have noticed the missing param in those. Glad I was able to help, when I tried i weather one , it worked for me , might sound silly but do you have a weather addon , if so which one RE: Help needed with JSON commands - dshorrosh - 2021-05-05 (2021-05-05, 00:51)Sidewinder_2011 Wrote:Welp, another fat-finger - corrected the braces and now Weather works, my bad. Another point for you, demerit for me.(2021-05-05, 00:20)dshorrosh Wrote: Thanks for your help - the movies and music commands work. I'm a little embarrassed - not very familiar with JSON syntax but as an IT guy I should have noticed the missing param in those. 'Record' is the only remaining bug - and FWIW I can start a recording from the channel I'm watching with CTL+R using a Windows keyboard. Here is a cut from the log from the point of pressing the 'record' button on the remote, but nothing actually happens on the screen or the PVR Recordings library, so sumthin' is going on with the command syntax or the Kodi version I'm on: DEBUG: CWebServer[80]: request received for /jsonrpc?request=%7B%22jsonrpc%22:%222.0%22,%22method%22:%22PVR.Record%22,%22id%22:1%7D DEBUG: JSONRPC: Incoming request: {"jsonrpc":"2.0","method":"PVR.Record","id":1} DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "GetBufferTimes" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "GetBufferTimes" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|1" DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "StreamFileSize|0" RE: Help needed with JSON commands - Sidewinder_2011 - 2021-05-05 (2021-05-05, 02:00)dshorrosh Wrote:hiya , try this(2021-05-05, 00:51)Sidewinder_2011 Wrote:Welp, another fat-finger - corrected the braces and now Weather works, my bad. Another point for you, demerit for me.(2021-05-05, 00:20)dshorrosh Wrote: Thanks for your help - the movies and music commands work. I'm a little embarrassed - not very familiar with JSON syntax but as an IT guy I should have noticed the missing param in those. {"jsonrpc": "2.0", "method": "PVR.record", "params": {"record" : "toggle"}, "id": 1 } This will record what ever channel you are watching, took a while to get back as, i had to install my tv tuner and software etc. RE: Help needed with JSON commands - dshorrosh - 2021-05-06 (2021-05-05, 20:46)Sidewinder_2011 Wrote:No worries and thanks for the reply - unfortunately it still doesn't work. I think this is a Kodi thing, because the 'small back' and 'small forward' commands don't work for Live TV either (those last two just freeze the system). I would have been surprised if your suggestion worked since it would have been a command change from Krypton to Leia, which would have been pretty unusual since it would have meant a change to the JSON syntax.(2021-05-05, 02:00)dshorrosh Wrote:hiya , try this(2021-05-05, 00:51)Sidewinder_2011 Wrote: Glad I was able to help, when I tried i weather one , it worked for me , might sound silly but do you have a weather addon , if so which oneWelp, another fat-finger - corrected the braces and now Weather works, my bad. Another point for you, demerit for me. Life is just that way. Thanks for your help! |