top of page
Rechercher
Photo du rédacteurSebastien Fouss

"Now Playing" info on Roon for Radio Paradise

Dernière mise à jour : 18 mai 2020


I have another webradio that I really enjoy: Radio Paradise, that seems to "suffer" from the same issue. More precisely, Radio Paradise offers many streams in different qualities, each of them provides metadata except the highest quality one (FLAC). Quoting Radio Paradise website:

These links currently do not currently include stream metadata (song title info). Not our choice. We would if we could.

I'll explain in this post how to add metadata to Radio Paradise. Unfortunately, we cannot use the same simple method used for FIP. My understanding is that:

  • Radio Paradise broadcasts through IceCast

  • IceCast does not seem to support metadata for FLAC streams

(experts comments welcome - I might be wrong)


So we have to use a different setup. After digging a bit, it appears that another audio broadcast server, Rocket Streaming Server (https://www.rocketbroadcaster.com/streaming-audio-server/), is able to add metadata to FLAC streams.


One last thing - Rocket Streaming Audio Server does not work on Raspberry, so we have to use another setup - in my case, I went for an Ubuntu EC2 instance on AWS (installation of it is simple, I won't detail it here but just bear in mind that you have to open port TCP 8000 to allow incoming connections to your new streamer, and TCP 1880 for node-red.

Please make sure to use a X86 version. For example, I used the following AMI:

ami-0e342d72b12109f91.


Install Rocket Streaming Audio Server


Enter the following commands:

> sudo apt-get update
> wget https://www.rocketbroadcaster.com/streaming-audio-server/downloads/ubuntu-18.04/rsas_0.1.15-1_amd64.deb
> sudo apt install -y ./rsas_0.1.15-1_amd64.deb 
> rm rsas_0.1.15-1_amd64.deb 
> sudo mkdir /var/log/rsas
> sudo mkdir /etc/rsas
  • Create the file: /etc/rsas/rsas.xml

  • Add the content below to this file (replace 'hackme' by the password of your choice), save it:

<icecast>
    <listen-socket>
        <port>80</port>
        <bind-address>0.0.0.0</bind-address> <!-- Listen on all interfaces -->
    </listen-socket>

    <mount>
        <mount-name>/paradise</mount-name>
        <username>source</username>
        <password>hackme</password> <!-- Change this password -->
        <max-listeners>10</max-listeners>
    </mount>

    <mount>
        <mount-name>/paradise_mellow</mount-name>
        <username>source</username>
        <password>hackme</password> <!-- Change this password -->
        <max-listeners>10</max-listeners>
    </mount>

    <mount>
        <mount-name>/paradise_rock</mount-name>
        <username>source</username>
        <password>hackme</password> <!-- Change this password -->
        <max-listeners>10</max-listeners>
    </mount>

    <mount>
        <mount-name>/paradise_eclectic</mount-name>
        <username>source</username>
        <password>hackme</password> <!-- Change this password -->
        <max-listeners>10</max-listeners>
    </mount>

    <relay>
        <server>stream.radioparadise.com</server>
        <port>80</port>
        <mount>/flac</mount>
        <local-mount>/paradise</local-mount>
        <on-demand>0</on-demand>
    </relay>

    <relay>
        <server>stream.radioparadise.com</server>
        <port>80</port>
        <mount>/mellow-flac</mount>
        <local-mount>/paradise_mellow</local-mount>
        <on-demand>0</on-demand>
    </relay>

    <relay>
        <server>stream.radioparadise.com</server>
        <port>80</port>
        <mount>/rock-flac</mount>
        <local-mount>/paradise_rock</local-mount>
        <on-demand>0</on-demand>
    </relay>

    <relay>
        <server>stream.radioparadise.com</server>
        <port>80</port>
        <mount>/eclectic-flac</mount>
        <local-mount>/paradise_eclectic</local-mount>
        <on-demand>0</on-demand>
    </relay>

</icecast>

Start RSAS as a service, as per instructions on https://www.rocketbroadcaster.com/streaming-audio-server/docs/installation :

  • Create an empty text file at/etc/systemd/system/rsas.service and paste this into it:

[Unit]
Description=Rocket Streaming Audio Server
After=network.target

[Service]
User=root
Group=root
ExecStart=/usr/bin/rsas -c /etc/rsas/rsas.xml
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always
RestartSec=3
LimitNOFILE=49152
WorkingDirectory=/var/log/rsas

[Install]
WantedBy=multi-user.target

Now, enter the following commands:

> sudo systemctl daemon-reload
> sudo systemctl enable rsas
> sudo systemctl start rsas

If all is ok, you should see something like this in /var/log/rsas/error.log:

ubuntu@ip-172-31-21-171:~$ more /var/log/rsas/error.log 
[2020-05-01 12:24:08.295 +00:00] [info] Rocket Streaming Audio Server starting.
[2020-05-01 12:24:08.295 +00:00] [info] Free Edition - 100 listener limit.
[2020-05-01 12:24:08.295 +00:00] [info] Upgrade today at https://www.rocketbroadcaster.com/streaming-audio-server
[2020-05-01 12:24:08.295 +00:00] [info] Listening on 0.0.0.0:8000
[2020-05-01 12:24:08.295 +00:00] [info] Running with 1 worker thread.

At this stage, you should be able to add Radio Paradise to Roon - but metadata are not yet available :)

Install node-red

Enter the following commands:

> curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
> sudo apt-get install -y nodejs build-essential
> sudo npm install -g --unsafe-perm node-red

> sudo npm install -g --unsafe-perm pm2
> pm2 start `which node-red` -- -v
> pm2 save
> pm2 startup 

Import the following flow (and update the passwords with the ones selected when setting up RSAS):

[{"id":"a114f181.4689f","type":"tab","label":"Radio metadata","disabled":false,"info":""},{"id":"d76a1872.49ee18","type":"inject","z":"a114f181.4689f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":460,"wires":[["37474c83.3bf5a4"]]},{"id":"37474c83.3bf5a4","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://api.radioparadise.com/api/now_playing?chan=1","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":460,"wires":[["c52dd89c.cbd0b"]]},{"id":"7511db15.62bc14","type":"inject","z":"a114f181.4689f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":620,"wires":[["9fc63e3c.82768"]]},{"id":"9fc63e3c.82768","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://api.radioparadise.com/api/now_playing?chan=2","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":620,"wires":[["6b0c8813.6755f"]]},{"id":"b8ae1d9e.74d96","type":"inject","z":"a114f181.4689f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":800,"wires":[["4d53421f.1f9dec"]]},{"id":"4d53421f.1f9dec","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://api.radioparadise.com/api/now_playing?chan=3","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":800,"wires":[["e4b61342.7c89e8"]]},{"id":"1943e1a4.1d4c0e","type":"inject","z":"a114f181.4689f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":280,"wires":[["34d203f2.53622c"]]},{"id":"34d203f2.53622c","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://api.radioparadise.com/api/now_playing?chan=0","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":280,"wires":[["df5d6ffe.bf739"]]},{"id":"df5d6ffe.bf739","type":"switch","z":"a114f181.4689f","name":"","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":280,"wires":[["3afeb293.1509de"],["cd7aeda2.d7897"]]},{"id":"cd7aeda2.d7897","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":480,"y":360,"wires":[["34d203f2.53622c"]]},{"id":"c52dd89c.cbd0b","type":"switch","z":"a114f181.4689f","name":"","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":460,"wires":[["5c857cc9.354e64"],["ccbe78d2.0a7358"]]},{"id":"ccbe78d2.0a7358","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":480,"y":540,"wires":[["37474c83.3bf5a4"]]},{"id":"6b0c8813.6755f","type":"switch","z":"a114f181.4689f","name":"","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":620,"wires":[["50ac2ec.5b5aad"],["b0418275.04ba48"]]},{"id":"e4b61342.7c89e8","type":"switch","z":"a114f181.4689f","name":"","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":800,"wires":[["a81d4d31.65d78"],["e493e040.983da"]]},{"id":"b0418275.04ba48","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":480,"y":700,"wires":[["9fc63e3c.82768"]]},{"id":"e493e040.983da","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":480,"y":880,"wires":[["4d53421f.1f9dec"]]},{"id":"5c857cc9.354e64","type":"json","z":"a114f181.4689f","name":"","property":"payload","action":"","pretty":false,"x":710,"y":460,"wires":[["58911617.e47c08","f4c6bbbe.a662f8"]]},{"id":"58911617.e47c08","type":"function","z":"a114f181.4689f","name":"","func":"var artist = msg.payload.artist;\nartist = encodeURIComponent(artist);\nvar title = msg.payload.title;\ntitle = encodeURIComponent (title);\n\nmsg.payload = artist + \"%20-%20\" + title;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":460,"wires":[["2037c378.6ee27c"]]},{"id":"c361158f.279978","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":1310,"y":460,"wires":[[]]},{"id":"2037c378.6ee27c","type":"function","z":"a114f181.4689f","name":"","func":"msg.url = \"http://source:hackme@127.0.0.1/admin/metadata?mode=updinfo&mount=/paradise_mellow&charset=UTF-8&song=\" + msg.payload;\n\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":460,"wires":[["c361158f.279978"]]},{"id":"bbcf9d2.c90016","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1060,"y":540,"wires":[["37474c83.3bf5a4"]]},{"id":"f4c6bbbe.a662f8","type":"function","z":"a114f181.4689f","name":"","func":"msg.delay = msg.payload.time*1000;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":500,"wires":[["bbcf9d2.c90016"]]},{"id":"50ac2ec.5b5aad","type":"json","z":"a114f181.4689f","name":"","property":"payload","action":"","pretty":false,"x":710,"y":620,"wires":[["9e03bc8.2313f4","facb0605.0d6708"]]},{"id":"9e03bc8.2313f4","type":"function","z":"a114f181.4689f","name":"","func":"var artist = msg.payload.artist;\nartist = encodeURIComponent(artist);\nvar title = msg.payload.title;\ntitle = encodeURIComponent (title);\n\nmsg.payload = artist + \"%20-%20\" + title;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":620,"wires":[["753c80b7.4fd78"]]},{"id":"27be2657.81f3ea","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":1310,"y":620,"wires":[[]]},{"id":"753c80b7.4fd78","type":"function","z":"a114f181.4689f","name":"","func":"msg.url = \"http://source:hackme@127.0.0.1/admin/metadata?mode=updinfo&mount=/paradise_rock&charset=UTF-8&song=\" + msg.payload;\n\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":620,"wires":[["27be2657.81f3ea"]]},{"id":"8d73e3c0.55642","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1060,"y":700,"wires":[["9fc63e3c.82768"]]},{"id":"facb0605.0d6708","type":"function","z":"a114f181.4689f","name":"","func":"msg.delay = msg.payload.time * 1000;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":660,"wires":[["8d73e3c0.55642"]]},{"id":"a81d4d31.65d78","type":"json","z":"a114f181.4689f","name":"","property":"payload","action":"","pretty":false,"x":710,"y":800,"wires":[["4ea82937.ad1f78","d5559e45.82609"]]},{"id":"4ea82937.ad1f78","type":"function","z":"a114f181.4689f","name":"","func":"var artist = msg.payload.artist;\nartist = encodeURIComponent(artist);\nvar title = msg.payload.title;\ntitle = encodeURIComponent (title);\n\nmsg.payload = artist + \"%20-%20\" + title;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":800,"wires":[["ea7362e4.05492"]]},{"id":"d52cd867.5e7178","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":1310,"y":800,"wires":[[]]},{"id":"ea7362e4.05492","type":"function","z":"a114f181.4689f","name":"","func":"msg.url = \"http://source:hackme@127.0.0.1/admin/metadata?mode=updinfo&mount=/paradise_eclectic&charset=UTF-8&song=\" + msg.payload;\n\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":800,"wires":[["d52cd867.5e7178"]]},{"id":"1d8d5c46.886544","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1060,"y":880,"wires":[["4d53421f.1f9dec"]]},{"id":"d5559e45.82609","type":"function","z":"a114f181.4689f","name":"","func":"msg.delay = msg.payload.time * 1000;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":840,"wires":[["1d8d5c46.886544"]]},{"id":"3afeb293.1509de","type":"json","z":"a114f181.4689f","name":"","property":"payload","action":"","pretty":false,"x":710,"y":280,"wires":[["910547da.6d8988","7734e760.965458"]]},{"id":"910547da.6d8988","type":"function","z":"a114f181.4689f","name":"","func":"var artist = msg.payload.artist;\nartist = encodeURIComponent(artist);\nvar title = msg.payload.title;\ntitle = encodeURIComponent (title);\n\nmsg.payload = artist + \"%20-%20\" + title;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":280,"wires":[["b21356d6.bd1138"]]},{"id":"4821efc8.6c7cb","type":"http request","z":"a114f181.4689f","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"authType":"","x":1310,"y":280,"wires":[[]]},{"id":"b21356d6.bd1138","type":"function","z":"a114f181.4689f","name":"","func":"msg.url = \"http://source:hackme@127.0.0.1/admin/metadata?mode=updinfo&mount=/paradise&charset=UTF-8&song=\" + msg.payload;\n\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":280,"wires":[["4821efc8.6c7cb"]]},{"id":"39462662.c8ef5a","type":"delay","z":"a114f181.4689f","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1060,"y":360,"wires":[["34d203f2.53622c"]]},{"id":"7734e760.965458","type":"function","z":"a114f181.4689f","name":"","func":"msg.delay = msg.payload.time*1000;\n\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":320,"wires":[["39462662.c8ef5a"]]}]

If all goes well, you should have Radio Paradise with metadata:









1 108 vues0 commentaire

Comments


Post: Blog2_Post
bottom of page