Kodi Community Forum

Full Version: Application.SetVolume help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all Big Grin

I'm trying to get the volume to go up/down via JSONRPC but I can't seem to get it work.

Code:
{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": 95}, "id": 1}

Using the above code sets the volume to a fixed amount. No problem there. But what I would like is a button to adjust the volume in increments of 5 (don't care if it's dB or %, just an example) So I tried:

Code:
{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": "increment"}, "id": 1}

..but that doesn't appear to do anything. I'm using REST on Chrome to test my code.

Hope someone can help, I've read a lot of threads and the XBMC Wiki but can't seem to get the right answer Sad


try the InputAction method, with volumeup / volumedown params.
http://wiki.xbmc.org/index.php?title=JSO...put.Action
Thanks for the reply and happy new year to you. I'm a bit confused with the Input.Action method. Did a search on the link provided but can't see a 'volumeup' parameter? Sorry I should have said I am using EDEN, my mistake for not saying that!

I tried:

Code:
{"jsonrpc": "2.0", "method": "Input.Action", "params": { "volumeup" : "2"}, "id": 1}

..but that comes back with a:

Quote: "error": {
"code": -32601,
"message": "Method not found."
Input.Action is indeed not available on Eden.
There is no "increment" in Eden. Works as your second example in Frodo though.
Thanks for the replies. In that case, how do I increase the volume in increments via JSONRPC in Eden? When I say increase, I mean increase the volume 2dB at a time or 2% at a time.

I'm using OpenRemote and wanted to code a button for volume up and volume down in increments.
(2013-01-02, 03:49)Latz Wrote: [ -> ]Thanks for the replies. In that case, how do I increase the volume in increments via JSONRPC in Eden? When I say increase, I mean increase the volume 2dB at a time or 2% at a time.

I'm using OpenRemote and wanted to code a button for volume up and volume down in increments.

you probably can't...
unless you're writing some sort of script that retrieves the current volume,
adds 2% to the value and then set the volume to the new value.
That's a shame, I'll be able to do it in Frodo so I'll wait for that. Thanks for everyone's help!