Metadata from radio station streaming with Chromecast Audio

I would like to display metadata from the radio station streaming on my Chromecast Audio devices.

However, I’m only able to find the attributes for station name and picture.

ffprobe http://nrk-mms-live.telenorcdn.net:80/nrk_radio_jazz_mp3_h

Gives me the following metadata output:

Metadata:
icy-name : NRK Jazz
icy-pub : 1
StreamTitle : Women Of Santiago med Viktoria Tolstoy(Utøver)

This is not perfect, but maybe the best I can get.

Are there any way that I would be able to get this value into Home Assistant?

1 Like

I think you should be able to get the info into ha with a command line sensor an some template script plus some more bash magic… but I’m too much of a noob to provide any code samples…guess it should be pretty simple for someone who knows what he’s doing

1 Like

Hi @moltubakk,
Did you have any chance with this? I’m going to dig here and there but if you had any clue, it would help.

TU

Hi @5AMsan! Sorry for the complete lack of follow-up!

I’ve been quite busy on other projects for months, and away from HA for a while.

Regarding the radio stuff, I ended up attacking it from an other angle:

As my listening at present is limited to Spotify, BBC, as well as Norwegian and Swedish radio (NRK, SR), I ended up creating my own web service. Based on the URL reported from the media player entities, I do a lookup against the APIs from the different radio stations. The endpoints from my web service is used for the Lovelace GUI.

This is far from perfect, and I have no guarantee for how long the radio station APIs will remain unchanged. But at present it works quite well.

Did you manage to do anything ‘the proper way’?

–bjørnar

Would you share how you did this web service, and use it in lovelace GUI? Maybe others (I for one) would be interested and could do something similar.