Openhab volume control

Hi guys, I´m having problem with controling audio volume level on my RPi 2 from openhab. I´m using openhab´s function playStream to play internet radio which is working like a charm. But, one thing I´m missing so much is control volume level. Is there any way to control audio output volume level from OpenHAB while still playing stream ? I have tried it with “execute commandLine” in rules but it´s not woking properly…
here is commandline text :
sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')+5]%

had the same and only a fresh linux helped…

Jessie ? Got it now…

Have you tried the built in audio actions?

Yeah, but it gives me error, something like that “cannot detemine master volume level”

Got it working just right now.
code looks like this :
rule "Volume control" when Item RadVol received command then executeCommandLine("sudo amixer sset PCM,0 "+RadVol.state as DecimalType+"%") end

1 Like

I have read that there is a playstream action command but is there an opposite stop stream or stop action?

Not to my knowledge.

Hi, thank you for your last reply.

Do you know if you can use playStream(String url) to play an .mp3 hosted on a webiste like. www.websitename.com/track1.p3?

Thanks

sudo shouldn’t be necessary, as long as the openhab user is member of unix group audio