Subject: Cannot start Web Radio via REST API (Volumio 3.832 on PC x86/x64)

Hello,

I’m having a problem with starting a web radio stream via the REST API on Volumio version 3.832. The system is installed on a USB drive and running on a Lenovo T420 PC.

The Issue: The web radio stream will not start when added and played via the command line (using curl).

Summary of Tests:

  • Manual Control: When I start the radio from the Volumio web UI (My Web Radios), it works without any issues.
  • API Commands: All the API commands I tested returned a successful response (HTTP/1.1 200 OK and {"response":"success"}), but playback did not start.

Failing Commands: The following commands were tested for Radio Vlna (stream URL: http://stream.radiovlna.sk:443/vlna-hi.mp3). Despite the successful API response, playback did not begin.

Bash# Attempt to add to queue and play curl -i -X POST -H "Content-Type: application/json" -d "{\"uri\":\"http://stream.radiovlna.sk:443/vlna-hi.mp3\",\"title\":\"Rádio Vlna\"}" http://192.168.10.132/api/v1/addToQueue curl "http://192.168.10.132/api/v1/commands/?cmd=play"

Working Command: The only command that successfully started playback was one that explicitly defined the type and service of the stream as a “webradio.”

Bash# Working command curl -X POST -H "Content-Type: application/json" -d "{\"service\":\"webradio\",\"type\":\"webradio\",\"title\":\"Rádio Vlna\",\"uri\":\"http://stream.radiovlna.sk:443/vlna-hi.mp3\"}" http://192.168.10.132/api/v1/replaceandplay

Conclusion and Question: It seems the API requires the specific parameters "service":"webradio" and "type":"webradio" for correct playback initialization, while the addToQueue and play commands do not work without them, even when the API returns “success.”

Is this the expected behavior of the API, or is this a bug in this version of Volumio?

Thank you for your help.

Hey @Miroslav_Lasut,

Thanks for bringing this up - your testing already uncovered the key point: when you send a request to the Volumio REST API, the backend needs to know which plugin or handler is supposed to manage the playback. If you only give it a bare URI, Volumio assumes it is a local file, and playback silently fails if that is not the case. That is why your simple addToQueue call succeeded at the HTTP level but never actually started the radio stream.

Why this happens

  • The REST API always returns {"response":"success"} to confirm the command was accepted, not that playback actually began.
  • Volumio supports multiple sources: local library, Webradios, UPnP/DLNA servers, Spotify, etc. Each has its own handler.
  • The UI (Web interface) automatically tags each source with the correct service and type when you click play. With raw API calls you must provide them explicitly.

Practical examples

  • Webradio
    This is the case you already discovered:
curl -X POST -H "Content-Type: application/json" \
-d '{"service":"webradio","type":"webradio","title":"Radio Vlna","uri":"http://stream.radiovlna.sk:443/vlna-hi.mp3"}' \
http://<volumio-ip>/api/v1/replaceandplay
  • UPnP / DLNA track
    Tell Volumio to hand off to the UPnP client:
curl -X POST -H "Content-Type: application/json" \
-d '{"service":"upnp","type":"track","title":"Sample Track","uri":"http://<upnp-server-ip>:<port>/<path-to-file>.flac"}' \
http://<volumio-ip>/api/v1/replaceandplay
  • Spotify (via plugin)
    Only works if the Spotify plugin is installed and logged in:
curl -X POST -H "Content-Type: application/json" \
-d '{"service":"spop","type":"song","title":"Example Song","uri":"spotify:track:3n3Ppam7vgaVa1iaRUc9Lp"}' \
http://<volumio-ip>/api/v1/replaceandplay
  • Local file (default)
    This is the only case where leaving out service and type usually works, because the default handler is mpd:
curl -X POST -H "Content-Type: application/json" \
-d '{"service":"mpd","type":"song","title":"Local Song","uri":"music-library/NAS/Music/track.flac"}' \
http://<volumio-ip>/api/v1/replaceandplay

Key takeaway

Whenever you interact with the API directly, think of service as the plugin (mpd, webradio, upnp, spop, etc.) and type as the content category (song, track, webradio, album, playlist). Without these, Volumio defaults to local-file playback and ignores everything else.

So your observation is correct - it is expected behavior in Volumio 3.x, not a bug. The UI hides this detail for convenience, but the raw API requires you to specify it.

If you ever run into trouble even with correct service/type, please send us a log link from http://<volumio-ip>/dev so we can verify.

Kind Regards,