• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 15
Working JSON RPC API Examples
#16
hi I put up some python code which will:
- read in an external playlist
- put it to music queue
- play it

it can be extended easily

http://forum.xbmc.org/showthread.php?tid...pid1454037

it do post the link in this thread because I think it can better be found under the above topic
Working JSON RPC API Examples
Smile
Reply
#17
Thanks Pghpunkid for your examples....the examples on the wiki are not as straightforward for the less technically minded!

Only problem is...when I tried them thorugh the web browser I get this message returned regardless to the example I use:

"JSONRPC active and working"

Any idea why it's returning this instead of what's been requesting? I've selected all the options in XBMC network-settings.
Reply
#18
You're version of XBMC is probably too old and doesn't support JSON-RPC requests using HTTP GET (only POST). Otherwise it should return the whole JSON schema API description if you just do a HTTP GET request to http://<ip>:<port>/jsonrpc.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#19
(2013-09-15, 15:04)Montellese Wrote: You're version of XBMC is probably too old and doesn't support JSON-RPC requests using HTTP GET (only POST). Otherwise it should return the whole JSON schema API description if you just do a HTTP GET request to http://<ip>:<port>/jsonrpc.

Thank you...you're absolutely correct. I've tried it on my Raspberry Pi which has the Frodo on and it works.
Reply
#20
hi, try to use with gotham alpha8 :

http://192.168.2.176/jsonrpc?request={"jsonrpc":"2.0","method":"Profiles.LoadProfile","params":{"profile":"Master user","password":{"value":"12345"}},"id":1}

and return me:

error: {
code: -32602,
message: "Invalid params."
},
id: 1,
jsonrpc: "2.0"

did I mistake something in syntax

thanks by advance
Reply
#21
There are several things that could have gone wrong:
  • Is the name of the profile right?
  • Did you MD5 encodeyour password? If not you either need to do that or set the optional "encryption" property of the "password" parameter to "none". For security reasons the default is to MD5-encode your password.

PS: This is not the right thread to ask about problems with requests.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#22
(2013-10-31, 16:18)Montellese Wrote: There are several things that could have gone wrong:
  • Is the name of the profile right?
  • Did you MD5 encodeyour password? If not you either need to do that or set the optional "encryption" property of the "password" parameter to "none". For security reasons the default is to MD5-encode your password.

PS: This is not the right thread to ask about problems with requests.

1/ Yes : I user right profile name because when I use http://192.168.2.176/jsonrpc?request={"jsonrpc":"2.0","method":"Profiles.LoadProfile","params":{"profile":"Master user"},"id":1} , it's working (when I remove password in profile from xbmc client).

2/ I tried already with http://192.168.2.176/jsonrpc?request={"jsonrpc":"2.0","method":"Profiles.LoadProfile","params":{"profile":"Master user","password":{"value":"12345","encryption":"none"}},"id":1} or http://192.168.2.176/jsonrpc?request={"jsonrpc":"2.0","method":"Profiles.LoadProfile","params":{"profile":"Master user","password":{"value":"12345","encryption":"md5"}},"id":1} , it's same issue Confused

PS: Sorry :/
Reply
#23
Did you actually MD5 encode your password or did you just add "encryption": "md5"?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#24
Oh need encode with tool like this : http://7thspace.com/webmaster_tools/onli...coder.html.

but why If I put http://192.168.2.176/jsonrpc?request={"jsonrpc":"2.0","method":"Profiles.LoadProfile","params":{"profile":"Master user","password":{"value":"12345","encryption":"none"}},"id":1} it doesn't work also ?
Reply
#25
It should but TBH I didn't write the code and I've never used XBMC profiles in my life so I'd have to take some time to look into it. Did it work with the encoded password?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#26
{"jsonrpc":"2.0","method":"Profiles.LoadProfile","params":{"profile":"Master%20user","password":{"value":"827ccb0eea8a706c4c34a16891f84e7b","encryption":"md5"}},"id":1}

same issue ://
Reply
#27
Please start a new thread..... This has nothing to do with examples anymore
(can a mod split this into a new one? )
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#28
sorry :/


thread for Profiles.Loadprofile:

http://forum.xbmc.org/showthread.php?tid=176988
Reply
#29
Can someone post an example for accessing entries in the Bookmarks table of the Database? I have a script that uses the old/deprecated executehttpapi method that obviously does not work anymore. I've been trying to find a way to read entries from Bookmarks using jsonrpc but I have not found anything yet. Here's a link to something that I did with the Bookmarks.
Thanks
Reply
#30
Example for turning off system?
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 15

Logout Mark Read Team Forum Stats Members Help
Working JSON RPC API Examples0