I’m trying to extend my Volumio set-up using the REST API to remote control various bits. So far I’ve got the basics in place, but web radio is eluding me.
At the moment I’ve got toggling play/pause working via http://192.168.0.220/api/v1/commands/?cmd=toggle plus various other of the commands listed in the API page.
However I’m struggling a bit with web radio stations. I’ve got a few set up and working fine in my web radio via the web GUI, but I’d like to be able to remotely switch between them. I’m presuming the command I want is http://192.168.0.220/api/v1/replaceAndPlay but I’m not sure what the relevant payload would be and how to add that to the command.
At the moment I’m sending the commands using either a simple batch file (using curl) or via a Python3 script. It’s working fine for the toggle commands, but can someone give me an example of what the correct command for replaceAndPlay would be (or if there’s a better way of doing this)?