2019-04-06, 01:06 PM
I might be the only one using openplotter as an onboard music centre with a hifiberry amp board, but it's just great! And now instead of streaming web radio using chrome, which is a bit of a resource hog I've got it streaming web radio using MPD. https://mpd.fandom.com/wiki/Music_Player_Daemon_Wiki
Node red with some dropdown nodes sends the streaming URL to a tiny bash script through an exec node>
Click on that and it will give you the request URL which goes into a dropdown node.
Then an exec node pointing bash to the little script>
The flow <
Works great so far, much less resources required than through chromium
Any favourite web radio stations?
Node red with some dropdown nodes sends the streaming URL to a tiny bash script through an exec node>
Quote:#!/bin/bashThe URL you can get by playing the web radio in chrome then right click>inspect. Select the network tab and look for the busy entry . Probably need to hit ctrl-r to restart the site
mpc stop
mpc clear
mpc add $1
mpc play
Click on that and it will give you the request URL which goes into a dropdown node.
Then an exec node pointing bash to the little script>
Quote:bash ~/bash_scripts/mpc_radio_ssh_commands/radio4.sh
The flow <
Code:
[
{
"id": "f7eaa8bf.96f418",
"type": "ui_button",
"z": "346f9605.5900aa",
"name": "",
"group": "4b551f9e.88056",
"order": 1,
"width": "12",
"height": "1",
"passthru": false,
"label": "Turn Off",
"color": "",
"bgcolor": "",
"icon": "",
"payload": "mpc stop",
"payloadType": "str",
"topic": "",
"x": 100,
"y": 60,
"wires": [
[
"5e551062.b8a4c"
]
]
},
{
"id": "5e551062.b8a4c",
"type": "exec",
"z": "346f9605.5900aa",
"command": "mpc stop",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "",
"x": 270,
"y": 60,
"wires": [
[],
[],
[]
]
},
{
"id": "a2a03f7.2913ec",
"type": "exec",
"z": "346f9605.5900aa",
"command": "bash ~/bash_scripts/mpc_radio_ssh_commands/radio4.sh",
"addpay": true,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "",
"x": 550,
"y": 120,
"wires": [
[],
[
"3cc1db20.1463e4"
],
[]
]
},
{
"id": "1c8ac35d.689cdd",
"type": "ui_slider",
"z": "346f9605.5900aa",
"name": "",
"label": "Volume",
"group": "4b551f9e.88056",
"order": 7,
"width": "12",
"height": "1",
"passthru": true,
"outs": "all",
"topic": "",
"min": "60",
"max": "207",
"step": 1,
"x": 100,
"y": 420,
"wires": [
[
"f9176d59.fa6b2"
]
]
},
{
"id": "f9176d59.fa6b2",
"type": "exec",
"z": "346f9605.5900aa",
"command": " amixer -c 1 cset numid=1",
"addpay": true,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "",
"x": 290,
"y": 420,
"wires": [
[],
[],
[]
]
},
{
"id": "43834785.976608",
"type": "ui_dropdown",
"z": "346f9605.5900aa",
"name": "",
"label": "BBC radio",
"place": "Select option",
"group": "4b551f9e.88056",
"order": 2,
"width": "6",
"height": "1",
"passthru": true,
"options": [
{
"label": "Radio 1",
"value": "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p",
"type": "str"
},
{
"label": "Radio 2",
"value": "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p",
"type": "str"
},
{
"label": "Radio 3",
"value": "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio3_mf_p",
"type": "str"
},
{
"label": "Radio 4",
"value": "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p",
"type": "str"
},
{
"label": "BBC 6",
"value": "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_6music_mf_p",
"type": "str"
}
],
"payload": "",
"topic": "",
"x": 110,
"y": 120,
"wires": [
[
"a2a03f7.2913ec"
]
]
},
{
"id": "ee830b84.891cd8",
"type": "ui_dropdown",
"z": "346f9605.5900aa",
"name": "",
"label": "Blues",
"place": "Select option",
"group": "4b551f9e.88056",
"order": 2,
"width": "6",
"height": "1",
"passthru": true,
"options": [
{
"label": "Blues @",
"value": "http://212.83.136.31:8000/_c",
"type": "str"
},
{
"label": "",
"value": "tt",
"type": "str"
}
],
"payload": "",
"topic": "",
"x": 90,
"y": 160,
"wires": [
[
"a2a03f7.2913ec"
]
]
},
{
"id": "30b81447.8203bc",
"type": "ui_dropdown",
"z": "346f9605.5900aa",
"name": "",
"label": "Misc",
"place": "Select option",
"group": "4b551f9e.88056",
"order": 2,
"width": "6",
"height": "1",
"passthru": true,
"options": [
{
"label": "LEDJAM",
"value": "http://www.djamradio.com/sound",
"type": "str"
},
{
"label": "KCRW",
"value": "https://kcrw.streamguys1.com/kcrw_192k_mp3_on_air",
"type": "str"
},
{
"label": "KUTX 2 Austin Uni",
"value": "https://kut2.streamguys1.com/kut2",
"type": "str"
},
{
"label": "WFMU",
"value": "http://stream0.wfmu.org/freeform-128k.mp3",
"type": "str"
},
{
"label": "Film/TV scores",
"value": "http://158.69.38.195:20082///;",
"type": "str"
},
{
"label": "KUSV San Fran",
"value": "http://104.236.145.45:8000/stream",
"type": "str"
}
],
"payload": "",
"topic": "",
"x": 90,
"y": 200,
"wires": [
[
"a2a03f7.2913ec"
]
]
},
{
"id": "c48fd8a6.fffe58",
"type": "ui_dropdown",
"z": "346f9605.5900aa",
"name": "",
"label": "Classical",
"place": "Select option",
"group": "4b551f9e.88056",
"order": 2,
"width": "6",
"height": "1",
"passthru": true,
"options": [
{
"label": "Classic FM",
"value": "http://media-ice.musicradio.com/ClassicFMMP3",
"type": "str"
},
{
"label": "vv",
"value": "",
"type": "str"
}
],
"payload": "",
"topic": "",
"x": 100,
"y": 240,
"wires": [
[
"a2a03f7.2913ec"
]
]
},
{
"id": "b4690d83.f322a",
"type": "ui_dropdown",
"z": "346f9605.5900aa",
"name": "",
"label": "Jazz",
"place": "Select option",
"group": "4b551f9e.88056",
"order": 2,
"width": "6",
"height": "1",
"passthru": true,
"options": [
{
"label": "Jazz FM (Ronnie Scotts)",
"value": "http://edge-ads-02-gos1.sharp-stream.com/jazzfmmobile.mp3",
"type": "str"
},
{
"label": "Capital Jazz",
"value": "http://stream.radio.co/s7c1ea5960/listen",
"type": "str"
},
{
"label": "1rad.mk",
"value": "http://ams-2.1radio.mk/1radio_smoothjazz_128",
"type": "str"
},
{
"label": "QFM Canarias",
"value": "http://51.255.235.165:5092/",
"type": "str"
}
],
"payload": "",
"topic": "",
"x": 90,
"y": 280,
"wires": [
[
"a2a03f7.2913ec"
]
]
},
{
"id": "10bd579e.7572e8",
"type": "ui_dropdown",
"z": "346f9605.5900aa",
"name": "",
"label": "World",
"place": "Take your pick..",
"group": "4b551f9e.88056",
"order": 2,
"width": "6",
"height": "1",
"passthru": true,
"options": [
{
"label": "Tomorrowland One",
"value": "http://streamingp.shoutcast.com/TomorrowlandOneWorldRadio",
"type": "str"
},
{
"label": "World Revolutions",
"value": "http://192.99.8.192:3276/stream",
"type": "str"
},
{
"label": "Rua PT",
"value": "http://centova.radio.com.pt:9536/;",
"type": "str"
}
],
"payload": "",
"topic": "",
"x": 90,
"y": 320,
"wires": [
[
"a2a03f7.2913ec"
]
]
},
{
"id": "4b551f9e.88056",
"type": "ui_group",
"z": "",
"name": "Internet Streaming Radio Stations",
"tab": "e93ef2b0.f7b94",
"disp": true,
"width": "12",
"collapse": true
},
{
"id": "e93ef2b0.f7b94",
"type": "ui_tab",
"z": "",
"name": "Web Radio",
"icon": "dashboard",
"order": 1
}
]
Any favourite web radio stations?