Chromecast Radio with station and player selection

change the group entity_id to remove the capital 'R’s and change the spare for an underscore… plus the indentation was off. You don’t use the domain when in a domain named yaml file either

# group:         <----since you are saving this in groups.yaml , you can't then use the domain heading group: (it's not required or allowed)
  residence_radio:
    name: Residentie Radio
    entities:
      - input_select.radio_station
      - input_select.chromecast_radio
      - script.radio538
      - input_slider.volume_radio
1 Like

After using this project for a long time now, I wanted to give some kind of RDS information for the current playing songs.

I am using the scrape sensor to pull the data from the Radio’s official website, or some other website that displays the current playing song.

For example in my sensor.yaml,

- platform: scrape   
  resource: https://onlineradiobox.com/gr/pepper/
  select: '#bodyW > div.page > div > div.page__wrapper-4right > div > section.station-onair > table > tbody > tr.active > td:nth-child(2) > a'
  name: Pepper RDS 

It takes some time to find out the right selectors, but then you can have something like this:

2 Likes

how to install it??

Create a package as per the package docs

@Bob_NL Thanks for your guide. I’ve set up everything but now I don’t know wich card shall I use to show the first picture of your post? I mean the main one with selectors you put under the Frontend: section. Is there a specific card to view the groups in Lovecale?

@Knot83 I created this topic long before lovelace excisted. I’m sure there are plenty of way better options than the oldschool method I’m using (to everybody: please feel free to share awesome lovelace cards in combination with the radio in this topic :slight_smile: ).
However, this is my lovelace config:

entities:
  - input_select.radio_station
  - input_select.chromecast_radio
  - action_name: Play Radio
    entity: script.radio538
  - entity: input_number.volume_master
  - sensor.radiovolume
  - input_text.stream_url
  - action_name: Play stream
    entity: script.play_stream
show_header_toggle: false
title: Residentie Radio
type: entities

Which looks like this:
image

3 Likes

Thanks for sharing (y). I missed that post. Will look into it.

Same here, I have a killer alarm clock (if I may say so myself) including lullabies, wakeup light and of course the radio which I use every day but it also became a very complex project. I did not find the time and desire to untangle the whole thing and make it usable for everyone who is interested.

This was the post btw: Chromecast Radio with station and player selection

I tied the Spotify playlist picker inside a vertical stack-in-card with conditional mini media player cards. If more speakers are active (with other streams) I can swipe between the mini media player cards and control the speakers. I also incorporated swiper card. Looks really clean :slight_smile:

1 Like

Came across this test of yours after I could not get my Google Home Minis to play anything. When I try your test in the dev-services panel or through any other method my speaker plays a tone which I presume to be an error tone. (It’s not the usual “Casting started tone”.)
Any idea what may be happening?
Thank you.

Welcome to the HA community :slight_smile:

I’ve never had an error tone played before that I can think of. Have you been able to cast to the Home mini from HA before? If this is your first attempt I’d suggest checking the config, but that stream link should work…

I think it’s actually a problem with the way I have https set up with duckdns.

It should still work with duck dns but you probably need to configure the google tts correctly. I’ll find my code to give you an example, hang on…

EDIT:
config yaml

tts: # Text to speech
  - platform: google_translate
    base_url: http://192.168.0.14:8123  #where this IP address is that of your HA server

I temporarily disabled duckdns and letsencrypt, and then I re-enabled them. Then the chromecast radio started working but tts not. So I added the base_url: and still no tts. I’ll have to do more googling to fix that. I don’t want to take this thread off topic.
Thanks a lot for your help.

no worries. I’m actually not sure why I went off on the TTS tangent… not thinking properly today :exploding_head:

Anyone having luck with HLS/m3u8 streams? I can’t make them work with “media_content_type” set to “application/x-mpegurl”.

Looks cool, before I start going through this whole thread to grab the most useful config, has this been turned into a custom component in the mean time?

You don’t need a custom component, it’s just a single package file

We don’t need it, but it would make it easier,/cleaner. Deploying via HACS and just configure it with something like:

type: radio
  channels:
    - name: KINK
      stream_url: <url>
      image: <url>
    - name: KINK DNA
      stream_url: <url>
      image: <url>
  players:
    - media_player.player_one
    - media_player.player_two
 
2 Likes

On the other hand, it would be also cool if Radio would become a media source, as supported since 0.115 and the media browser allowed us to select a radio channel.

1 Like

Hi, may I ask if this will work with a non audio chromecast? I have a chromecast for TV and I am wondering if I could use it to listen to radio.
Thanks