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.py
flask
flask-bootstrap4
flask_restful
flask_cors
Listenable 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/getAllStation
Returns the current volume.
192.168.1.50:5000/api/getVolume
Increases the volume by 15%. To decrease, enter the argument -15.
192.168.1.50:5000/api/setVolume/+15
Sets volume to 40.
192.168.1.50:5000/api/setVolume/40
Sets the station being played back to RNS. List of available stations in the file radio.py.
192.168.1.50:5000/api/Play/RNS
Stop playing a station.
192.168.1.50:5000/api/Stop
Speaker 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/