Author Topic: Possible to use vox with http api? XBMC  (Read 19420 times)

0 Members and 1 Guest are viewing this topic.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possible to use vox with http api? XBMC
« Reply #15 on: April 02, 2011, 04:08:27 PM »
that's weird because I thought 9090 was for "raw tcp" but 8080 was for http access.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possible to use vox with http api? XBMC
« Reply #16 on: April 02, 2011, 04:22:39 PM »
I just upgraded to XBMC version 11 and it still only works for me if I use port 8080.

If I try to use port 9090 it just says "Processing..."  and stays like that forever

Is it possible you changed your web server port to 9090 for some reason?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possible to use vox with http api? XBMC
« Reply #17 on: April 02, 2011, 04:26:40 PM »
meanwhile, it accepts the command:

 {"jsonrpc": "2.0", "method": "AudioPlayer.Play"}

but it doesn't actually do anything.  It does not play.  Wanilton, does it actually play for you?

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #18 on: April 02, 2011, 04:28:46 PM »
Yes, worked fine play and stop command for me, using method posted for me before,
URL: http://127.0.0.1:9090/jsonrpc
Method: POST
Headers:
Data: {"jsonrpc": "2.0", "method": "AudioPlayer.Play"}

For stop player

URL: http://127.0.0.1:9090/jsonrpc
Method: POST
Headers:
Data: {"jsonrpc": "2.0", "method": "AudioPlayer.Stop"}

Press send, stop the audio player ok.

Alert:
Remember I am using XBMC 11, the last release 04/02/2011
http://mirrors.xbmc.org/nightlies/win32/XBMCSetup-20110402-0c66478-master.exe

Version 11 is not compatible with aeon.skinmq.2 in version 2.7.1, version 11 only work in new version 2.8.0, in mode lite (new mode).
Skin aeonmq.2 version 2.8.0 no released for public yet, under development, expected to release in 3 weeks..
« Last Edit: April 02, 2011, 04:51:14 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possible to use vox with http api? XBMC
« Reply #19 on: April 02, 2011, 05:44:42 PM »
I am using the same version of XBMC and it only works on port 8080.

WTF?

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #20 on: April 02, 2011, 09:06:00 PM »
In port 8080, this error message for me
Status:200 OK

Headers:

Data:
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}{e":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
Copyright © 2010 Jeremy Selier - Source code licensed under the Apache License - icon by Jason Rayner

I observe when I set port 9090, worked,.
« Last Edit: April 02, 2011, 09:30:55 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #21 on: April 02, 2011, 09:10:39 PM »
James,

I reboot the computer, and now work too in port 8080, great...i don´t change anything...no more error send command in port 8080..

For PLAY music in Audioplaylist I use this
{"jsonrpc":"2.0","method":"Audioplaylist.Play"}

And work ok

Play Next Music, worked fine too
{ "jsonrpc": "2.0", "method": "AudioPlayer.SkipNext"}

Other commando ok, it´s work fine
{"jsonrpc": "2.0", "method": "XBMC.Quit"}

When I send This Command
{ "jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": { "fields": ["album", "lyrics", "duration", "rating"], "end": 002 }, "id": 1 }

Return this Data:
{"id":1,"jsonrpc":"2.0","result":{"albums":[{"album":"One Cell In the Sea","albumid":1,"duration":0,"label":"One Cell In the Sea","rating":48,"thumbnail":"special://masterprofile/Thumbnails/Music/9/9293979f.tbn"},{"album":"Black Ice","albumid":2,"duration":0,"label":"Black Ice","rating":48,"thumbnail":"special://masterprofile/Thumbnails/Music/b/b325aa78.tbn"}],"end":2,"start":0,"total":205}}

Wanilton
« Last Edit: April 03, 2011, 02:48:00 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possible to use vox with http api? XBMC
« Reply #22 on: April 03, 2011, 01:14:45 PM »
as far as I can tell the JSON in this version:
http://mirrors.xbmc.org/nightlies/win32/XBMCSetup-20110402-0c66478-master.exe

is broken

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #23 on: April 03, 2011, 02:49:30 PM »
James, for me it´s ok, in port 8080...stop command and others.....I Update my XBMC every day, with new releases, i am using  04/03/2011 version XBMC.

What´s command is broken for you??
« Last Edit: April 03, 2011, 09:31:47 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possible to use vox with http api? XBMC
« Reply #24 on: April 03, 2011, 03:09:48 PM »
all of them return results in the wrong format.

but in particular, commands with optional field parameters like this:

{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "start": 0, "end": 100, "sortorder":"ascending", "fields": ["genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "showtitle", "firstaired", "duration", "season", "episode", "runtime", "year", "playcount", "rating"] }, "id": 1}

it doesn't matter what you put in the fields, it always return all fields.

but it doesn't matter since the JSON commands are of absolutely no value to us.  They don't do anything that we can't already do (much less actually), so I am waiting to see if they add any new features.  I am told that there will be some changes *soon*. I do not have very high hopes though.  I am just hoping that the http api will not be removed because I don't think XBMC JSON will ever be able to offer us what we need.  The whole situation is very sad.

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #25 on: April 05, 2011, 09:00:17 AM »
James, Look this post, In this release launched today has important changes in Json Implementation in XBMC Eden.

http://mirrors.xbmc.org/nightlies/win32/XBMCSetup-20110405-774b886-master.exe

Read this post for info about changes:

http://forum.xbmc.org/showthread.php?p=767487


« Last Edit: April 05, 2011, 09:02:52 AM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Possible to use vox with http api? XBMC
« Reply #26 on: April 05, 2011, 10:22:26 AM »
:'(

I guess they aren't adding any useful commands.  If they actually try to remove the http api from Eden, there will surely be a mass uprising of the people!

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #27 on: April 05, 2011, 12:36:08 PM »
In this version of Eden I do not think anything will change in http API, perhaps in next year's version will do remove, but a lot can happen until then.
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #28 on: April 24, 2011, 09:11:57 PM »
all of them return results in the wrong format.

but in particular, commands with optional field parameters like this:

{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "start": 0, "end": 100, "sortorder":"ascending", "fields": ["genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "showtitle", "firstaired", "duration", "season", "episode", "runtime", "year", "playcount", "rating"] }, "id": 1}

it doesn't matter what you put in the fields, it always return all fields.

but it doesn't matter since the JSON commands are of absolutely no value to us.  They don't do anything that we can't already do (much less actually), so I am waiting to see if they add any new features.  I am told that there will be some changes *soon*. I do not have very high hopes though.  I am just hoping that the http api will not be removed because I don't think XBMC JSON will ever be able to offer us what we need.  The whole situation is very sad.

Hello James, today I try again, and work ok, I Used the last version nightly, release today 04/24:
http://mirrors.xbmc.org/nightlies/win32/XBMCSetup-20110423-36be7fb-master.exe

http://127.0.0.1:8080/jsonrpc

I use this commands
{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": {"fields": ["title","year"],"sort":{"method":"label","order":"ascending"}},"id": 1}

Return this Data:
{"id":1,"jsonrpc":"2.0","result":{"limits":{"end":336,"start":0,"total":336},"movies":[{"label":"007 - A Serviço Secreto de Sua Majestade","movieid":383,"title":"007 - A Serviço Secreto de Sua Majestade","year":1969},{"label":"007 - Contra o Foguete da Morte","movieid":486,"title":"007 - Contra o Foguete da Morte","year":1979},{"label":"007 - Contra o Homem com a Pistola de Ouro","movieid":589,"title":"007 - Contra o Homem com a Pistola de Ouro","year":1974},{"label":"007 - Marcado Para a Morte","movieid":585,"title":"007 - Marcado Para a Morte","year":1987}

Conclusion: The filter work now, return only fields I request.

Read this post, with news changes in Json
http://forum.xbmc.org/showthread.php?t=98551 in special:
Added a new namespace Input containing the following methods to navigate in the XBMC GUI:
Up
Down
Left
Right
Select
Back
Home

Wanilton
« Last Edit: April 24, 2011, 09:15:18 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Possible to use vox with http api? XBMC
« Reply #29 on: March 27, 2012, 03:03:40 PM »
Hello James,

Montelesse Add support for WebSockets in XBMC, Websoctkets are accessible using the port of the TCP server (by default 9090) and using version 8 (draft) or 13 (final) of the websocket specification. So the URL to access the websocket would be e.g.
 
ws://localhost:9090/jsonrpc
 For now websockets are only available for JSON-RPC and support the same features as the TCP Server (i.e. notifications but no file download).

And here comes the first (rather big) update for JSON-RPC API v5:

 •added System.EjectOpticalDrive and a new permission ControlSystem
 •added GUI namespace with the methods ShowNotification, SetFullscreen and GetProperties (current properties are "currentwindow", "currentcontrol", "fullscreen" and "skin")
 •added AudioLibrary.GetRecentlyPlayedAlbums and AudioLibrary.GetRecentlyPlayedSongs
 •added properties "size", "lastmodified" and "mimetype" to Files.GetDirectory
 •added properties "season" and "watchedepisodes" to VideoLibrary.GetTvShows and "watchedepisodes" to VideoLibrary.GetSeasons
 •added notification Application.OnVolumeChanged
 •extended Application.SetVolume to support "increment" and "decrement"
 •added optional "play" parameter to Player.PlayPause
 •added optional "enable" parameter to Player.SetSubtitle
 •added optional "directory" parameter to (Audio|Video)Library.Scan
 •added optional "options" parameter to Player.Open which can have the properties "shuffled", "repeat" and "resume"
 •improved properties returned by Player.GetItem for non-library media being played
 •added sort methods "country", "dateadded", "listeners" and "bitrate


I am uploading a latest version xbmc eden installer, this websockets help us with vox ??

Thanks.


www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me