v18 Volume slider for Node-red Dashboard
#1
Lightbulb 
Hello, 

I am very new here and I have just registered to solve my problem. I want to use Node-RED in order to control Kodi. I am able to control play-pause with this code: {"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 1 }, "id": 1}

I am doing well with this code: { "jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": "increment" }, "id": 1 } However, obviously, it is always increasing even my slider decreasing.

I want to use a slider to increase or decrease volume, but I couldn't find any solution, and I stuck! Can anyone help me?
Reply
#2
If you can get the position of the slider then you can use that as the value for the volume.

{ "jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": '$VALUE' }, "id": 1 }
Learning Linux the hard way !!
Reply
#3
Hello black_eagle,

Thanks for your quick reply but I don't know what should I put for "$VALUE" I know it should be slider value but I could not be successful to put the slider value in this part of the code. Is there any slider controlled example for kodi / Node-Red?
Reply
#4
The value for the slider will be 0 to 100.  if you enter 50, it will take you to the halfway mark.  I haven't played around with Node-Red but most of those types of software will allow you to set a range for a slider.  So you would set it 0 to 100.  Then as you move the slider it will give you a variable that you can enter into the code you where given above.
Reply

Logout Mark Read Team Forum Stats Members Help
Volume slider for Node-red Dashboard0