Websocket & REST API: setVolume fails for webradio streams

Hi,

just tested Volumio 2.522 - so far, so great.

As I want to do some integration into my modernized tube radio, I started playing with the websocket API and the REST API.
Everyting (setting tracks, getting status, etc.) is working but I disovered that setting the volume doesn’t seem to work for webradio streams.

If I play a track from NAS a call like

curl localhost:3000/api/v1/commands/?cmd=volume&volume=25

will change the volume to 25 (web interface and getstatus confirm this).

If I do the same when a webradio is playing, the web interface shows NaN (not a number) and getstatus reports a null value for volume.

curl localhost:3000/api/v1/getstate {"status":"play","position":1,"title":"","artist":"Absolut Radio Relax","album":null,"albumart":"https://radio-directory.firebaseapp.com/volumio/src/images/radio-thumbnails/Absolut Relax.jpg","uri":"http://stream.absolutradio.de/relax/mp3-160/radioplayer/","trackType":"webradio","seek":744829,"duration":0,"samplerate":"","bitdepth":"","channels":2,"random":null,"repeat":null,"repeatSingle":false,"consume":true,"volume":null,"mute":false,"disableVolumeControl":false,"stream":true,"updatedb":false,"volatile":false,"service":"webradio"}

Am I doing something wrong or is this a bug in volumio?

Kind regards

Stephan

Hi,

just installed the new version - the problem persists.
Also doing a clean setup on a new board (same config: Rasberry Pi 3+, HifiBerry MiniAmp) leads to the same results.

Could someone test if this is only happening in this combo?

Just open a ssh session and do

curl localhost:3000/api/v1/commands/?cmd=volume&volume=10

Result should be:

{"time":1547314384504,"response":"volume Success"}

But the web interface shows NaN or 0 and there is no more sound…

A query for the state

curl localhost:3000/api/v1/getstate

then shows that volume is "null.

Using websockets (with python) shows the same results…

Any ideas? Am I doing it wrong or is this a bug?

Kind regards

Stephan

…this seems to be a bug: I just checked in the x86 image…

If I do a

curl localhost:3000/api/v1/commands/?cmd=volume&volume=25

the volume is also null and the GUI shows NaN…