2012-06-03, 17:46
Dear Community
I have had a pretty good read of these posts and the changes.
I am a novice but I spent a bit of time writing a simple text based remote control to run on my Linux desktop, mainly so I didn't have to keep picking my phone up to skip tracks and so I could play internet radio steams et..
These are the commands I used per Eden, which worked well for my basic needs.
The http stuff obviously still works but needs to be rewritten when that channel is fully removed, but I am having issues updating my commands for the JSON-RPC API v4
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioLibrary.ScanForContent", "id": "1"}' http://192.168.0.50:8080/jsonrpc ;;
curl 'http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.updatelibrary(video)' ; sleep 5 ;;
curl "http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=%20PlayerControl%28Partymode%29" ;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.PlayPause", "id": "1"}' http://192.168.0.50:8080/jsonrpc ;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.Stop", "id": "1"}' http://192.168.0.50:8080/jsonrpc ;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.State", "id": 1}' http://192.168.0.50:8080/jsonrpc ; sleep 4;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.SkipNext", "id": 1}' http://192.168.0.50:8080/jsonrpc;;
curl "http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=getcurrentlyplaying" ; sleep 5;;
curl "http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=PlayFile%28smb://192.168.0.50/music/-0AdminTools/Future.m3u%29" ; sleep 4;;
I hoped it would be a simple change to the following
curl -i -X POST -d '{"jsonrpc":"2.0","method":"Player.PlayPause","params":{"playerid":1}}' http://192.168.0.50:8080/jsonrpc
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json
Date: Sun, 03 Jun 2012 15:13:04 GMT
OR
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 1 }, "id": 1}' http://192.168.0.50:8080/jsonrpc
HTTP/1.1 200 OK
Content-Length: 86
Content-Type: application/json
Date: Sun, 03 Jun 2012 15:39:08 GMT
{"error":{"code":-32100,"message":"Failed to execute method."},"id":1,"jsonrpc":"2.0"}
but neither of these appear to work, yet it also doesn't return any errors and I was really hoping for a pointer in the right direction.
XBMC Eden is running in standalone on Ubuntu 10.04 base
Many Thanks.
I have had a pretty good read of these posts and the changes.
I am a novice but I spent a bit of time writing a simple text based remote control to run on my Linux desktop, mainly so I didn't have to keep picking my phone up to skip tracks and so I could play internet radio steams et..
These are the commands I used per Eden, which worked well for my basic needs.
The http stuff obviously still works but needs to be rewritten when that channel is fully removed, but I am having issues updating my commands for the JSON-RPC API v4
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioLibrary.ScanForContent", "id": "1"}' http://192.168.0.50:8080/jsonrpc ;;
curl 'http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.updatelibrary(video)' ; sleep 5 ;;
curl "http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=%20PlayerControl%28Partymode%29" ;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.PlayPause", "id": "1"}' http://192.168.0.50:8080/jsonrpc ;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.Stop", "id": "1"}' http://192.168.0.50:8080/jsonrpc ;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.State", "id": 1}' http://192.168.0.50:8080/jsonrpc ; sleep 4;;
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlayer.SkipNext", "id": 1}' http://192.168.0.50:8080/jsonrpc;;
curl "http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=getcurrentlyplaying" ; sleep 5;;
curl "http://192.168.0.50:8080/xbmcCmds/xbmcHttp?command=PlayFile%28smb://192.168.0.50/music/-0AdminTools/Future.m3u%29" ; sleep 4;;
I hoped it would be a simple change to the following
curl -i -X POST -d '{"jsonrpc":"2.0","method":"Player.PlayPause","params":{"playerid":1}}' http://192.168.0.50:8080/jsonrpc
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json
Date: Sun, 03 Jun 2012 15:13:04 GMT
OR
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 1 }, "id": 1}' http://192.168.0.50:8080/jsonrpc
HTTP/1.1 200 OK
Content-Length: 86
Content-Type: application/json
Date: Sun, 03 Jun 2012 15:39:08 GMT
{"error":{"code":-32100,"message":"Failed to execute method."},"id":1,"jsonrpc":"2.0"}
but neither of these appear to work, yet it also doesn't return any errors and I was really hoping for a pointer in the right direction.
XBMC Eden is running in standalone on Ubuntu 10.04 base
Many Thanks.