# Nodered as internetradio

**URL:** https://discourse.nodered.org/t/nodered-as-internetradio/43134
**Category:** General
**Created:** [24 March 2021 17:27 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134 "2021-03-24T17:27:35Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![automati](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@automati](https://discourse.nodered.org/u/automati)
#### Post date: [24 March 2021 17:27 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/1 "2021-03-24T17:27:35Z")

</div>

Hello everyone, I'm new here and also brand new to the topic of node red. I have a shelly actuator at home which I want to use to turn my radio on and off. Do any of you have any ideas how I can do that? Maybe I can access a radio player with Nodered and then play it over the audio connection of my Raspberry? .. Thank you very much!

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [24 March 2021 20:14 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/2 "2021-03-24T20:14:47Z")

</div>

You Could access any internet radio station, and play them via the dashboard nodes.

```auto
[{"id":"d9bb6b2a.57929","type":"inject","z":"d375568c.144b28","name":"","props":[{"p":"options","v":"[{\"Stop\":\"\"},{\"Studio Brussel\":\"http://icecast.vrtcdn.be/stubru-high\"},{\"MNM Hits\":\"http://icecast.vrtcdn.be/mnm_hits-high\"},{\"Another station\":\"http://icecast.vrtcdn.be/radio1-high\"}]","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":180,"y":200,"wires":[["4cc267bc.aef7e"]]},{"id":"4cc267bc.aef7e","type":"ui_dropdown","z":"d375568c.144b28","name":"","label":"Radio","tooltip":"Kies de gewenste radio","place":"Kies een radio","group":"165e1e1a.e752fa","order":4,"width":"0","height":"0","passthru":true,"multiple":false,"options":[],"payload":"","topic":"radio","x":320,"y":200,"wires":[["5e33f1b8.91b2d8"]]},{"id":"5e33f1b8.91b2d8","type":"change","z":"d375568c.144b28","name":"","rules":[{"t":"set","p":"template","pt":"msg","to":"'<!DOCTYPE html>\t<html>\t<body>\t\t<audio autoplay>\t <source src=\"' & payload & '.mp3\" type=\"audio/mpeg\">\t <source src=\"' & payload & '.ogg\" type=\"audio/ogg\">\t</audio>\t\t</body>\t</html>'","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":200,"wires":[["f34ba2f2.d18af"]]},{"id":"f34ba2f2.d18af","type":"ui_template","z":"d375568c.144b28","group":"165e1e1a.e752fa","name":"test","order":5,"width":0,"height":0,"format":"","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":670,"y":200,"wires":[[]]},{"id":"165e1e1a.e752fa","type":"ui_group","name":"Default","tab":"f9b58883.fa613","order":1,"disp":true,"width":"12","collapse":false},{"id":"f9b58883.fa613","type":"ui_tab","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

Then got to `http://ip_of_node_red:1880/ui/` and select a station. There are 3 examples set in the inject node.

---

<div class="post-metadata">

### Author: ![automati](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@automati](https://discourse.nodered.org/u/automati)
#### Post date: [25 March 2021 11:43 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/3 "2021-03-25T11:43:13Z")

</div>

Many Thanks!  
And what kind of building blocks do I need so that I can do that? what does this flow look like in the end?  
Thank you very much

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [25 March 2021 11:48 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/4 "2021-03-25T11:48:42Z")

</div>

import the code i supplied it will show all the blocks. the only one you will need to install is the dashboard node.

---

<div class="post-metadata">

### Author: ![automati](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@automati](https://discourse.nodered.org/u/automati)
#### Post date: [25 March 2021 12:09 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/5 "2021-03-25T12:09:02Z")

</div>

and do you know what format the player must have .. can i use any radio provider?

for example:  
[http://stream.srg-ssr.ch/drs3/aacp\_96.m3u](http://stream.srg-ssr.ch/drs3/aacp_96.m3u)

[http://stream.srg-ssr.ch/drs3/aacp\_96.asx](http://stream.srg-ssr.ch/drs3/aacp_96.asx)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [25 March 2021 12:28 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/6 "2021-03-25T12:28:40Z")

</div>

You will have to test the links yourself, the ones you have supplied do not work direct in chrome, so i doubt they would work in dashboard.

---

<div class="post-metadata">

### Author: ![automati](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@automati](https://discourse.nodered.org/u/automati)
#### Post date: [25 March 2021 12:40 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/7 "2021-03-25T12:40:06Z")

</div>

where do I get these links from?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [25 March 2021 13:31 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/8 "2021-03-25T13:31:44Z")

</div>

from searches or use developer console to find streaming url. [https://m.youtube.com/watch?v=N5-eEdbvEaY](https://m.youtube.com/watch?v=N5-eEdbvEaY)

---

<div class="post-metadata">

### Author: ![automati](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@automati](https://discourse.nodered.org/u/automati)
#### Post date: [25 March 2021 13:42 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/9 "2021-03-25T13:42:38Z")

</div>

thank you!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [8 April 2021 13:43 UTC](https://discourse.nodered.org/t/nodered-as-internetradio/43134/10 "2021-04-08T13:43:12Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
