Kodi Community Forum
Application.SetVolume help - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Web Interfaces (https://forum.kodi.tv/forumdisplay.php?fid=156)
+---- Thread: Application.SetVolume help (/showthread.php?tid=150261)



Application.SetVolume help - Latz - 2013-01-01

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





RE: Application.SetVolume help - ronie - 2013-01-01

try the InputAction method, with volumeup / volumedown params.
http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Input.Action


RE: Application.SetVolume help - Latz - 2013-01-01

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."



RE: Application.SetVolume help - ronie - 2013-01-01

Input.Action is indeed not available on Eden.


RE: Application.SetVolume help - Mizaki - 2013-01-01

There is no "increment" in Eden. Works as your second example in Frodo though.


RE: Application.SetVolume help - Latz - 2013-01-02

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.


RE: Application.SetVolume help - ronie - 2013-01-02

(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.


RE: Application.SetVolume help - Latz - 2013-01-03

That's a shame, I'll be able to do it in Frodo so I'll wait for that. Thanks for everyone's help!