2014-04-17, 11:36
Hi all,
I read in this thread thats its possible to change audio outputs via json-rpc and I have been able to do so with the following command:
However, trying something similar with audiooutput.channels or audiooutput.passthrough (options I found here) I get errors and there is no change in xbmc.
Debug log of this error. Ive tried a whole lot of variations with no success. So Im curious if its possible to change other audio settings via json-rpc, and if so, can anyone point me in the direction of the correct syntax to use?
Thanks in advance.
I read in this thread thats its possible to change audio outputs via json-rpc and I have been able to do so with the following command:
Code:
curl -v -H "Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.audiodevice","value":"ALSA:hdmi:CARD=NVidia,DEV=1"},"id":1}' http://localhost:9191/jsonrpc
However, trying something similar with audiooutput.channels or audiooutput.passthrough (options I found here) I get errors and there is no change in xbmc.
Code:
$ curl -v -H "Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.channels","value":"3"},"id":1}' http://localhost:9191/jsonrpc * Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9191 (#0)
> POST /jsonrpc HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:9191
> Accept: */*
> Content-type: application/json
> Content-Length: 117
>
* upload completely sent off: 117 out of 117 bytes
< HTTP/1.1 200 OK
< Content-Length: 76
< Content-Type: application/json
< Date: Thu, 17 Apr 2014 09:28:09 GMT
<
* Connection #0 to host localhost left intact
{"error":{"code":-32602,"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}xbmc","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.channels","value":"3"},"id":1}' http://localhost:9191/jsonrpc * Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9191 (#0)
> POST /jsonrpc HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:9191
> Accept: */*
> Content-type: application/json
> Content-Length: 117
>
* upload completely sent off: 117 out of 117 bytes
< HTTP/1.1 200 OK
< Content-Length: 76
< Content-Type: application/json
< Date: Thu, 17 Apr 2014 09:32:01 GMT
<
* Connection #0 to host localhost left intact
{"error":{"code":-32602,"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}
Debug log of this error. Ive tried a whole lot of variations with no success. So Im curious if its possible to change other audio settings via json-rpc, and if so, can anyone point me in the direction of the correct syntax to use?
Thanks in advance.