Posts: 131
Joined: May 2010
Reputation:
0
welshboy, I have had my best results using the raw TCP Socket. You enable that I believe in system/network "allow external control". The TCP port is 9090. you send to the port a simple sequence that looks like :
"POST /jsonrpc\r\n\r\n"+ the JSON object you wish to transmit as in
"POST /jsonrpc\r\n\r\n"+"{\"jsonrpc\": \"2.0\", \"method\": \"JSONRPC.Version\", \"id\": 1}"
This will return the version of JSON that is running. Took me a few days to figure it out so I empathize. I am not sure if the blank line between the "Prefix" and the JSON object is needed. You may be able to get away with a prefix of "POST /jsonrpc\r\n" or "POST /jsonrpc ". The above is all javascript syntax
Posts: 66
Joined: Jul 2010
Reputation:
0
JSONRPC.Introspect and digging through the c++ jsonrpc code in the xbmc svn (Everything's easy to read even if c++ is new to you).
JSON-RPC interface is still in beta and under heavy development I don't think it's fair to expect all documentation to be 100% accurate and up to date.
Posts: 131
Joined: May 2010
Reputation:
0
Thanks for the simplification. It will make things simpler and a trivial change since most of the code I wrote is table driven for flexibility!!
Posts: 315
Joined: Dec 2008
Reputation:
0
2010-10-15, 07:14
(This post was last modified: 2010-10-15, 07:21 by Ilia.)
Found it, by digging though cpp, if anyone is intrested:
"sort":{"method":"videorating","order":"descending"} <- make sure u have no spaces between the ""
other methods: date, size, file, drivetype, track, duration, title, artists, album, genre, year, videorating, programcount, playlist, episode, title (video), sorttitle (without "the") productioncode, songrating, mpaarating, videoruntime, studio, fullpath, lastplayer, unsorted, max
all available to see in xbmc/lib/libjsonrpc/FileItemHandler.cpp
Current setup:
Amlogic M3/MX + Linux + BOXiK Skin + Pioneer vsx520 + Dali Lektor 6
Previous setup:
Revo 3700 + flirc + OpenElec nightlies + Quartz + Pioneer vsx520 + Dali Lektor 6
atv1 + Crystalbuntu + XBMC nightly + xperience1080
Posts: 5,184
Joined: Jan 2009
Reputation:
131
Hey guys
As Soundgraph has released a first API to access their LCDs and VFDs from 3rd party applications I started writing a tool (with C#) which uses the JSON-RPC service XBMC provides with Dharma to display information about currently playing items on the LCD/VFD. I found the xbmc-json library developped by dstruktiv and think it's quite useful. But I am lacking the possibility of receiving announcements (I absolutely don't want to poll the status of the players every second or so).
Could someone please provide me some detailed information on how to catch those announcements? As far as I found out these are broadcasted over TCP on port 9090. Is that correct and is that port fixed or do I need to configure it somewhere?
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.
Posts: 3,077
Joined: Jun 2009
After some tests i can confirm that System.GetInfoLabels is good for getting currently informations even with empty playlist :p
Even permit to send one less request for getting the seekposition
See
http://wiki.xbmc.org/?title=InfoLabels for list
Just a little question not json related but since it have the same effect perhaps topfs have a solution
The info label : System.KernelVersion always send busy on the first request need to wait for 300 or 400 ms to retry and get the data (same with httpapi)
Not very important but since i use this to check if Yatse connects to the correct machine it's annoying to add delays for nothing