Volumio and Rainmeter -- Action to play webradios

@gvolt @balbuze @ashthespy hi i’m trying to call a radio station from the command line
does any one know how ?
all i could find is this:
volumio.local/api/v1/browse?uri=radio ( missing how to do this…)

I think @ashthespy has described how to do it here.

@ashthespy @gvolt i’m looking for away to paste it in a browser this isn’t working if i paste it in a browser curl won’t work…
it had to look like this : http://volumio.local/api/v1/replaceAndPlay?uri=radio/tunein/local and then sum…

No clue, I would imagine if you might have a way to do it using the developer tools of your browser… Your favourite search engine would be your best friend here…

i can play my playlists of youtube… but can’t find any info how to start a radio stream…
with the commandline (only bash script) … it is that volumio is hiding all getting nuts of it …

I don’t follow – the example of the curl request is linked above. That can be called directly from the command line, or in a wrapper bash script, or a shortcut, or keyboard hotkeys or many other ways!
It is the simplest way if you ask me.
But, if you want to make life harder and use only your browser directly, it might of-course be possible, but this is then searching you would have to do…

That will not work, the API endpoint expects valid JSON as the parameter. Not just the uri parameter. Please have a look at the linked example, I thought it was quite clear what needed to be done?

oke i will not build a skin in rainmeter on my pc with radio.
all other controles i can speak to normal…
don’t understand where the bash script had to be and how to call the bash scripting.
it’s not there so can’t do it like that… and i’m not a programmer
your saying here is flower and water … go make bread… without saying where the oven sits…

Hahah! This is a nice one I will keep it for further use! :smiley:

But, now that you have explained what you want to do maybe you should try something like this…

[changeWebRadio]
Measure=Plugin
Plugin=RunCommand
Parameter=curl --header "Content-Type: application/json" --request POST --data  '{
  "service": "webradio",
  "type": "webradio",
  "title": "Nova%20La%20Nuit",
  "uri": "http://nova-ln.ice.infomaniak.ch/nova-ln-128",
  "albumart": "https://www.nova.fr/sites/default/files/2020-06/Nova%20la%20Nuit_1.jpg"
}' http://volumio.local/api/v1/replaceAndPlay
State=Show
DynamicVariables=1

PS: In the spirit of showing you where the oven is :wink:

This is the steps I followed:

  1. Search for “Rainmeter + POST Request”
  2. https://forum.rainmeter.net/viewtopic.php?t=35197
  3. Adapt the snippet to what seems logical for me (with no experience with Rainmeter)

But all that being said, you can also use Rainmeter to directly call a shell script (example Bash on linux, or Powershell on windows) Please try searching for some examples on that topic and see if it makes sense…

PS: I am editing the title of this post

i gave the guy who wrote it… tnx on the forum hehehhe and thx again ash your a great help!
now i can start writing a lot of code again and now with radio’s all otherthings i already have http://volumio.local:3000/api/v1/commands/?cmd=volume&volume=-10
http://volumio.local:3000/api/v1/commands/?cmd=volume&volume=+10
http://volumio.local:3000/api/v1/commands/?cmd=play
http://volumio.local:3000/api/v1/commands/?cmd=toggle
http://volumio.local:3000/api/v1/commands/?cmd=pause
http://volumio.local:3000/api/v1/commands/?cmd=repeat
http://volumio.local:3000/api/v1/commands/?cmd=next
http://volumio.local:3000/api/v1/commands/?cmd=prev
http://volumio.local:3000/api/v1/commands/?cmd=random
http://volumio.local:3000/api/v1/getstate
http://volumio.local:3000/api/v1/commands/?cmd=seek&position=1
http://volumio.local:3000/api/v1/commands/?cmd=playplaylist&name=reggea

@ashthespy are you running rainmeter? otherwise i have already some working script.

Nope, sorry I don’t use it… but please feel free to share it with the community :slight_smile:

i will after adding a lot more the basics are running a few more buttons to make
some presets so you can pick some radio’s and playlists…
had to do it all by myself nobody @rainmeter could help me with it …cause they don’t have one