Application.SetVolume help
#1
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


Reply
#2
try the InputAction method, with volumeup / volumedown params.
http://wiki.xbmc.org/index.php?title=JSO...put.Action
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
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."
Reply
#4
Input.Action is indeed not available on Eden.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
There is no "increment" in Eden. Works as your second example in Frodo though.
Image
AWXi - Ajax web interface. Wiki
Reply
#6
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.
Reply
#7
(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.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
That's a shame, I'll be able to do it in Frodo so I'll wait for that. Thanks for everyone's help!
Reply

Logout Mark Read Team Forum Stats Members Help
Application.SetVolume help1