Help needed with JSON commands
#1
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"}}
Win10 64-bit
Kodi 20.1 / Mimic-LR
Reply
#2
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?
Win10 64-bit
Kodi 20.1 / Mimic-LR
Reply
#3
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"
  • jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videodb://movies/titles/"},"id":"1"}}
  • jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"musicdb://albums/"},"id":"1"}}

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.
Win10 64-bit
Kodi 20.1 / Mimic-LR
Reply
#4
(2021-05-04, 04:37)dshorrosh Wrote: 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"
  • jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videodb://movies/titles/"},"id":"1"}}
  • jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"musicdb://albums/"},"id":"1"}}

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.

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.
Reply
#5
(2021-05-04, 18:56)Sidewinder_2011 Wrote:
(2021-05-04, 04:37)dshorrosh Wrote: 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"
  • jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videodb://movies/titles/"},"id":"1"}}
  • jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"musicdb://albums/"},"id":"1"}}

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.

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.
Thank you for the reply!  I'll try it out this evening and report back.
Win10 64-bit
Kodi 20.1 / Mimic-LR
Reply
#6
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!
Win10 64-bit
Kodi 20.1 / Mimic-LR
Reply
#7
(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.

Unfortunately the weather button is still a no-go, along with the record command, so I'll keep digging.

Thanks again!

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
Reply
#8
(2021-05-05, 00:51)Sidewinder_2011 Wrote:
(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.

Unfortunately the weather button is still a no-go, along with the record command, so I'll keep digging.

Thanks again!

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
Welp, another fat-finger - corrected the braces and now Weather works, my bad.  Another point for you, demerit for me.

'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"
Win10 64-bit
Kodi 20.1 / Mimic-LR
Reply
#9
(2021-05-05, 02:00)dshorrosh Wrote:
(2021-05-05, 00:51)Sidewinder_2011 Wrote:
(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.

Unfortunately the weather button is still a no-go, along with the record command, so I'll keep digging.

Thanks again!

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
Welp, another fat-finger - corrected the braces and now Weather works, my bad.  Another point for you, demerit for me.

'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"
hiya , try this Smile
 {"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.
Reply
#10
(2021-05-05, 20:46)Sidewinder_2011 Wrote:
(2021-05-05, 02:00)dshorrosh Wrote:
(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 one
Welp, another fat-finger - corrected the braces and now Weather works, my bad.  Another point for you, demerit for me.

'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"
hiya , try this Smile
 {"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.
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.

Life is just that way.  Thanks for your help!
Win10 64-bit
Kodi 20.1 / Mimic-LR
Reply

Logout Mark Read Team Forum Stats Members Help
Help needed with JSON commands0