Skip to content

Instantly share code, notes, and snippets.

@Peter2hhw Peter2hhw/README.md
Last active Feb 11, 2019

Embed
What would you like to do?
Webradio internetradio node red raspberry pi 3

This is a simple example of a web radio. Without using coding. It uses MPD. Music Player Daemon. Configure your mpd.conf file and make a playlist dir.

sudo nano /etc/mpd.conf

playlist_directory "/home/pi/webradio"

sudo mkdir /home/pi/webradio

Create a file with the name radio.m3u

.....( Or create your own playlist. You will notice that the first line does not work. This is because the playlist starts at zero and not at one. So the first line is fake for MPD. The command play 1 is radio10 in the second line. You will now receive station 1 instead of station zero ).....

Place the following in the file radio.m3u and save it.

http://icecast.omroep.nl
http://20043.live.streamtheworld.com/RADIO10.mp3
http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_32.aac
http://icecast.omroep.nl/radio1-bb-aac
http://icecast.omroep.nl/radio2-bb-aac
http://icecast.omroep.nl/3fm-bb-aac
http://icecast.omroep.nl/3fm-alternative-aac
http://icecast.omroep.nl/3fm-serioustalent-aac
http://icecast.omroep.nl/radio4-bb-aac
http://icecast.omroep.nl/radio4-eigentijds-aac
http://icecast.omroep.nl/radio5-bb-aac
http://icecast.omroep.nl/radio6-bb-aac
http://18973.live.streamtheworld.com/RADIO538.mp3
http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_qlmb_64.aac
http://radio.wildhitradio.nl/wildfm.mp3
http://17873.live.streamtheworld.com/100PNL_MP3_SC?
http://18973.live.streamtheworld.com/WEB03_MP3_SC?
http://streaming206.radionomy.com:80/-Pophits
http://streaming206.radionomy.com:80/101SMOOTHJAZZ
http://streaming206.radionomy.com:80/ABC-Lounge
http://streaming14.tdiradio.com:8000/hit
http://streaming206.radionomy.com:80/-TOP20-Radio
http://playerservices.streamtheworld.com/api/livestream-redirect/SKYRADIOAAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR01AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR02AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR03AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR04AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR05AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR06AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR19AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR07AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR15AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR16AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR20AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR08AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR17AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR21AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR22AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR23AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR24AAC.aac
http://playerservices.streamtheworld.com/api/livestream-redirect/SRGSTR28AAC.aac

[{"id":"26933f73.86c2c","type":"mpd out","z":"4a0bc462.460fbc","name":"","topic":"","server":"92e9470d.a78b78","x":1181,"y":424,"wires":[[]]},{"id":"4a88f2cb.b0e12c","type":"ui_button","z":"4a0bc462.460fbc","name":"play","group":"777e876f.e945c8","order":5,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"fa-play","payload":"play","payloadType":"str","topic":"","x":1070,"y":660,"wires":[["26933f73.86c2c"]]},{"id":"e0c88383.bf13e","type":"ui_button","z":"4a0bc462.460fbc","name":"stop","group":"777e876f.e945c8","order":7,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"fa-stop","payload":"stop","payloadType":"str","topic":"","x":1070,"y":700,"wires":[["26933f73.86c2c"]]},{"id":"bfa4804c.81aff","type":"ui_button","z":"4a0bc462.460fbc","name":"previous","group":"777e876f.e945c8","order":4,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"fa-backward","payload":"previous","payloadType":"str","topic":"","x":1080,"y":580,"wires":[["26933f73.86c2c"]]},{"id":"eadca919.eef158","type":"ui_button","z":"4a0bc462.460fbc","name":"next","group":"777e876f.e945c8","order":8,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"fa-forward","payload":"next","payloadType":"str","topic":"","x":1070,"y":740,"wires":[["26933f73.86c2c"]]},{"id":"293c2579.54ffba","type":"inject","z":"4a0bc462.460fbc","name":"Stop playing","topic":"","payload":"stop","payloadType":"str","repeat":"","crontab":"","once":false,"x":666,"y":31,"wires":[["26933f73.86c2c"]]},{"id":"393856e9.39b3ca","type":"ui_button","z":"4a0bc462.460fbc","name":"pause","group":"777e876f.e945c8","order":6,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"fa-pause","payload":"pause","payloadType":"str","topic":"","x":1070,"y":620,"wires":[["26933f73.86c2c"]]},{"id":"c2392149.cc06e","type":"inject","z":"4a0bc462.460fbc","name":"","topic":"","payload":"setvol 100","payloadType":"str","repeat":"","crontab":"","once":false,"x":1259,"y":649,"wires":[["26933f73.86c2c"]]},{"id":"97a7c96.6e9bd38","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":1,"width":"4","height":"1","passthru":false,"label":"Radio 10","color":"","bgcolor":"","icon":"","payload":"play 1","payloadType":"str","topic":"","x":93,"y":112,"wires":[["26933f73.86c2c"]]},{"id":"bedcf127.2b405","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":2,"width":"4","height":"1","passthru":false,"label":"Q-music","color":"","bgcolor":"","icon":"","payload":"play 2","payloadType":"str","topic":"","x":92,"y":149,"wires":[["26933f73.86c2c"]]},{"id":"ecd5d21a.20a9f","type":"debug","z":"4a0bc462.460fbc","name":"","active":true,"console":"false","complete":"false","x":430,"y":30,"wires":[]},{"id":"cb14f2de.8ca3b","type":"ui_template","z":"4a0bc462.460fbc","group":"777e876f.e945c8","name":"","order":1,"width":"8","height":"3","format":"<!DOCTYPE html> \n<div>\n <h3>{{msg.payload.status.state}} met\n {{msg.payload.currentsong.Pos}}\n {{msg.payload.currentsong.Name}}</h3>\n <p></p>\n <h4>{{msg.payload.currentsong.Title}}</h4>\n</div>\n","storeOutMessages":false,"fwdInMessages":true,"templateScope":"local","x":252,"y":30,"wires":[["ecd5d21a.20a9f"]]},{"id":"cda9a8a7.d05348","type":"ui_button","z":"4a0bc462.460fbc","name":"volume up","group":"777e876f.e945c8","order":3,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"fa-volume-up","payload":"volume +2","payloadType":"str","topic":"","x":1250,"y":690,"wires":[["26933f73.86c2c"]]},{"id":"d6650a59.235b98","type":"ui_button","z":"4a0bc462.460fbc","name":"volume down","group":"777e876f.e945c8","order":2,"width":"1","height":"1","passthru":false,"label":"","color":"","bgcolor":"","icon":"fa-volume-down","payload":"volume -2","payloadType":"str","topic":"","x":1250,"y":733,"wires":[["26933f73.86c2c"]]},{"id":"14e8b5.d404d74b","type":"ui_template","z":"4a0bc462.460fbc","group":"a59ede57.e14cd","name":"volume","order":1,"width":"8","height":"1","format":"<!DOCTYPE html> \n<div>\n <h4>Volume staat op {{msg.payload.status.volume}}%</h4>\n</div>","storeOutMessages":false,"fwdInMessages":true,"templateScope":"local","x":252,"y":73,"wires":[[]]},{"id":"68c6805d.75459","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":3,"width":"4","height":"1","passthru":false,"label":"Radio 1","color":"","bgcolor":"","icon":"","payload":"play 3","payloadType":"str","topic":"","x":92,"y":186,"wires":[["26933f73.86c2c"]]},{"id":"911c63fc.5b5e3","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":4,"width":"4","height":"1","passthru":false,"label":"Radio 2","color":"","bgcolor":"","icon":"","payload":"play 4","payloadType":"str","topic":"","x":91,"y":223,"wires":[["26933f73.86c2c"]]},{"id":"f14f06a4.7b2a38","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":5,"width":"4","height":"1","passthru":false,"label":"3fm","color":"","bgcolor":"","icon":"","payload":"play 5","payloadType":"str","topic":"","x":82,"y":261,"wires":[["26933f73.86c2c"]]},{"id":"bb6e5ecf.be961","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":6,"width":"4","height":"1","passthru":false,"label":"3fm alternative","color":"","bgcolor":"","icon":"","payload":"play 6","payloadType":"str","topic":"","x":111,"y":298,"wires":[["26933f73.86c2c"]]},{"id":"85c9678a.c6f0b8","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":7,"width":"4","height":"1","passthru":false,"label":"3fm talent","color":"","bgcolor":"","icon":"","payload":"play 7","payloadType":"str","topic":"","x":93,"y":334,"wires":[["26933f73.86c2c"]]},{"id":"d6e2d41c.ee06d8","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":8,"width":"4","height":"1","passthru":false,"label":"Radio 4","color":"","bgcolor":"","icon":"","payload":"play 8","payloadType":"str","topic":"","x":92,"y":371,"wires":[["26933f73.86c2c"]]},{"id":"9aba3980.b42db8","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":9,"width":"4","height":"1","passthru":false,"label":"Radio 4 eigentijds","color":"","bgcolor":"","icon":"","payload":"play 9","payloadType":"str","topic":"","x":122,"y":407,"wires":[["26933f73.86c2c"]]},{"id":"8a9734bb.b3b158","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":10,"width":"4","height":"1","passthru":false,"label":"Radio 5","color":"","bgcolor":"","icon":"","payload":"play 10","payloadType":"str","topic":"","x":91,"y":444,"wires":[["26933f73.86c2c"]]},{"id":"62cc3715.44f328","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":11,"width":"4","height":"1","passthru":false,"label":"Radio 6","color":"","bgcolor":"","icon":"","payload":"play 11","payloadType":"str","topic":"","x":91,"y":481,"wires":[["26933f73.86c2c"]]},{"id":"196ca582.dbabfa","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":12,"width":"4","height":"1","passthru":false,"label":"Radio 538","color":"","bgcolor":"","icon":"","payload":"play 12","payloadType":"str","topic":"","x":100,"y":518,"wires":[["26933f73.86c2c"]]},{"id":"2f3094fe.03f1dc","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":13,"width":"4","height":"1","passthru":false,"label":"Q-music Limburg","color":"","bgcolor":"","icon":"","payload":"play 13","payloadType":"str","topic":"","x":125,"y":554,"wires":[["26933f73.86c2c"]]},{"id":"7661ca9c.146af4","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Wild radio","color":"","bgcolor":"","icon":"","payload":"play 14","payloadType":"str","topic":"","x":94,"y":591,"wires":[["26933f73.86c2c"]]},{"id":"528f0f06.bf566","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"100% NL","color":"","bgcolor":"","icon":"","payload":"play 15","payloadType":"str","topic":"","x":92,"y":627,"wires":[["26933f73.86c2c"]]},{"id":"4fab2060.09c1b","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"#Pophits","color":"","bgcolor":"","icon":"","payload":"play 16","payloadType":"str","topic":"","x":92,"y":664,"wires":[["26933f73.86c2c"]]},{"id":"3ae4cf1b.e9a05","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"101 Smooth Jazz","color":"","bgcolor":"","icon":"","payload":"play 17","payloadType":"str","topic":"","x":122,"y":701,"wires":[["26933f73.86c2c"]]},{"id":"487a7248.fc07ac","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"ABC Lounge","color":"","bgcolor":"","icon":"","payload":"play 18","payloadType":"str","topic":"","x":104,"y":736,"wires":[["26933f73.86c2c"]]},{"id":"8b7f32e2.39669","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Hit radio","color":"","bgcolor":"","icon":"","payload":"play 20","payloadType":"str","topic":"","x":91,"y":772,"wires":[["26933f73.86c2c"]]},{"id":"9e329e6.e88ef6","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Top 20 radio","color":"","bgcolor":"","icon":"","payload":"play 21","payloadType":"str","topic":"","x":101,"y":807,"wires":[["26933f73.86c2c"]]},{"id":"903e4209.fa1a2","type":"comment","z":"4a0bc462.460fbc","name":"<<< -------- KLIK hier links om de database te resetten ----------","info":"","x":1117,"y":84,"wires":[]},{"id":"d1efb9dc.f600c8","type":"inject","z":"4a0bc462.460fbc","name":"leeg database","topic":"","payload":"clear","payloadType":"str","repeat":"","crontab":"","once":false,"x":666,"y":65,"wires":[["26933f73.86c2c"]]},{"id":"22d846f9.9f3d8a","type":"inject","z":"4a0bc462.460fbc","name":"load radio","topic":"","payload":"load radio","payloadType":"str","repeat":"","crontab":"","once":false,"x":655,"y":99,"wires":[["26933f73.86c2c"]]},{"id":"5d90974.a718368","type":"inject","z":"4a0bc462.460fbc","name":"play radio 10","topic":"","payload":"play 1","payloadType":"str","repeat":"","crontab":"","once":false,"x":665,"y":133,"wires":[["26933f73.86c2c"]]},{"id":"6d16350f.e5567c","type":"comment","z":"4a0bc462.460fbc","name":"<<< - 1 -","info":"","x":830,"y":31,"wires":[]},{"id":"8959e96a.be52d8","type":"comment","z":"4a0bc462.460fbc","name":"<<< - 2 -","info":"","x":831,"y":65,"wires":[]},{"id":"fabdaebe.58103","type":"comment","z":"4a0bc462.460fbc","name":"<<< - 3 -","info":"","x":831,"y":99,"wires":[]},{"id":"245338b8.ea7f88","type":"comment","z":"4a0bc462.460fbc","name":"<<< - 4 -","info":"","x":831,"y":133,"wires":[]},{"id":"d47f9f56.6f644","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio FM","color":"","bgcolor":"","icon":"","payload":"play 22","payloadType":"str","topic":"","x":351,"y":182,"wires":[["26933f73.86c2c"]]},{"id":"4df7f039.8c3f8","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio hits","color":"","bgcolor":"","icon":"","payload":"play 23","payloadType":"str","topic":"","x":360,"y":218,"wires":[["26933f73.86c2c"]]},{"id":"7672159e.c5c0fc","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio summer hits","color":"","bgcolor":"","icon":"","payload":"play 24","payloadType":"str","topic":"","x":380,"y":252,"wires":[["26933f73.86c2c"]]},{"id":"d630101.e8da2f","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio love songs","color":"","bgcolor":"","icon":"","payload":"play 25","payloadType":"str","topic":"","x":379,"y":286,"wires":[["26933f73.86c2c"]]},{"id":"5bc07729.5f1cc8","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio 80s hits","color":"","bgcolor":"","icon":"","payload":"play 26","payloadType":"str","topic":"","x":369,"y":320,"wires":[["26933f73.86c2c"]]},{"id":"7f976ad.69a4394","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio 90s hits","color":"","bgcolor":"","icon":"","payload":"play 27","payloadType":"str","topic":"","x":367,"y":354,"wires":[["26933f73.86c2c"]]},{"id":"84f92205.35d5","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio 2000s hits","color":"","bgcolor":"","icon":"","payload":"play 28","payloadType":"str","topic":"","x":375,"y":388,"wires":[["26933f73.86c2c"]]},{"id":"113f0af.efa54f5","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio 10s hits","color":"","bgcolor":"","icon":"","payload":"play 29","payloadType":"str","topic":"","x":366,"y":422,"wires":[["26933f73.86c2c"]]},{"id":"19966aaa.8afe55","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio lounge","color":"","bgcolor":"","icon":"","payload":"play 30","payloadType":"str","topic":"","x":365,"y":456,"wires":[["26933f73.86c2c"]]},{"id":"2e4cbd4d.401502","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio smooth hits","color":"","bgcolor":"","icon":"","payload":"play 31","payloadType":"str","topic":"","x":375,"y":490,"wires":[["26933f73.86c2c"]]},{"id":"a327ac18.d43de","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio songwriter","color":"","bgcolor":"","icon":"","payload":"play 32","payloadType":"str","topic":"","x":374,"y":524,"wires":[["26933f73.86c2c"]]},{"id":"3f839657.37c1fa","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio feel good hits","color":"","bgcolor":"","icon":"","payload":"play 33","payloadType":"str","topic":"","x":383,"y":559,"wires":[["26933f73.86c2c"]]},{"id":"71176a7a.f5b7b4","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio christmas","color":"","bgcolor":"","icon":"","payload":"play 34","payloadType":"str","topic":"","x":362,"y":594,"wires":[["26933f73.86c2c"]]},{"id":"c860362c.8017d8","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio bootcamp","color":"","bgcolor":"","icon":"","payload":"play 35","payloadType":"str","topic":"","x":372,"y":628,"wires":[["26933f73.86c2c"]]},{"id":"163a6e92.285f31","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio hits starter","color":"","bgcolor":"","icon":"","payload":"play 36","payloadType":"str","topic":"","x":370,"y":662,"wires":[["26933f73.86c2c"]]},{"id":"97a36bc9.f6d678","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio hits gevorderd","color":"","bgcolor":"","icon":"","payload":"play 37","payloadType":"str","topic":"","x":380,"y":696,"wires":[["26933f73.86c2c"]]},{"id":"9fac50af.e007e","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio hits expert","color":"","bgcolor":"","icon":"","payload":"play 38","payloadType":"str","topic":"","x":369,"y":731,"wires":[["26933f73.86c2c"]]},{"id":"4f10aa21.54db04","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio stretch & relax","color":"","bgcolor":"","icon":"","payload":"play 39","payloadType":"str","topic":"","x":378,"y":767,"wires":[["26933f73.86c2c"]]},{"id":"937fb2d6.d613","type":"ui_button","z":"4a0bc462.460fbc","name":"","group":"5bf2985a.3914d8","order":14,"width":"4","height":"1","passthru":false,"label":"Sky radio pop-up","color":"","bgcolor":"","icon":"","payload":"play 40","payloadType":"str","topic":"","x":359,"y":802,"wires":[["26933f73.86c2c"]]},{"id":"d1f94165.36e02","type":"mpd in","z":"4a0bc462.460fbc","name":"","topic":"","server":"92e9470d.a78b78","x":90,"y":60,"wires":[["cb14f2de.8ca3b","14e8b5.d404d74b"]]},{"id":"92e9470d.a78b78","type":"mpd-server","z":"","host":"localhost","port":"6600"},{"id":"777e876f.e945c8","type":"ui_group","z":"","name":"Control","tab":"242620e3.6b5e6","order":1,"disp":false,"width":"8"},{"id":"5bf2985a.3914d8","type":"ui_group","z":"","name":"Zenderkeuze","tab":"242620e3.6b5e6","order":3,"disp":false,"width":"8"},{"id":"a59ede57.e14cd","type":"ui_group","z":"","name":"Radio","tab":"242620e3.6b5e6","order":2,"disp":false,"width":"8"},{"id":"242620e3.6b5e6","type":"ui_tab","z":"","name":"Web Radio","icon":"dashboard","order":1}]
@janvda

This comment has been minimized.

Copy link

commented May 9, 2018

It is working fine for me - nice flow - thanks a lot !!

@jwmeyer

This comment has been minimized.

Copy link

commented Aug 8, 2018

Here is a flow to add a mute toggle. One function stores a mute switch state and the current volume. Another function sets the volume to 0 or to the previous value. I placed the switch between volume up and down with a custom icon.
[{"id":"c05a3f5d.d685a","type":"function","z":"b9f70bf.f529af8","name":"","func":"vs = flow.get("volumeswitch")||false;\nif (vs===false){\n flow.set("volume", msg.payload.status.volume);\n}\nmsg.volume = flow.get("volume");\nmsg.vs = vs;\nreturn msg;","outputs":1,"noerr":0,"x":244,"y":343,"wires":[[]]},{"id":"8412630.13767a","type":"ui_switch","z":"b9f70bf.f529af8","name":"mute","label":"","group":"acff6a3f.194878","order":4,"width":"1","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"volume_off","oncolor":"red","offvalue":"false","offvalueType":"bool","officon":"volume_mute","offcolor":"blue","x":81,"y":548,"wires":[["baf55cf9.76065"]]},{"id":"baf55cf9.76065","type":"function","z":"b9f70bf.f529af8","name":"","func":"if (msg.payload) {\n flow.set("volumeswitch", true);\n msg.payload = "setvol 0";\n \n}else{\n flow.set("volumeswitch", false);\n msg.payload = "setvol "+flow.get("volume");\n}\n \nreturn msg;","outputs":1,"noerr":0,"x":299,"y":554,"wires":[["a8ed8293.8b4d4"]]},{"id":"acff6a3f.194878","type":"ui_group","z":"","name":"Control","tab":"ce057d29.c2959","order":1,"disp":false,"width":"8"},{"id":"ce057d29.c2959","type":"ui_tab","z":"","name":"Web Radio","icon":"dashboard","order":1}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.