Raspbian Web Radio is a web application created in Flask technology using mpc player (minimalist command line interface to MPD). Originally run on the rasbian system on the rasberry platform.
git clone https://github.com/paneee/RaspbianWebRadio.git
cd RaspbianWebRadio
python3 app.pyflask
flask-bootstrap4
flask_restful
flask_corsListenable radio stations are in the model.py file in the WebRadio dictionary variable, you can add more... In the example the server runs on a raspberry pi 3. (ip 192.168.1.50 port 5000)
Returns all possible stations.
192.168.1.50:5000/api/getAllStationReturns the current volume.
192.168.1.50:5000/api/getVolumeIncreases the volume by 15%. To decrease, enter the argument -15.
192.168.1.50:5000/api/setVolume/+15Sets volume to 40.
192.168.1.50:5000/api/setVolume/40Sets the station being played back to RNS. List of available stations in the file radio.py.
192.168.1.50:5000/api/Play/RNSStop playing a station.
192.168.1.50:5000/api/StopSpeaker On / Off.
192.168.1.50:5000/api/speakerOnOff/Speaker volume UP.
192.168.1.50:5000/api/speakerVolumeUP/Speaker volume DOWN.
192.168.1.50:5000/api/speakerVolumeDOWN/