Chromecast Radio with station and player selection

Check Puckstars comment yesterday:

Try if it makes any difference. I can try out the Cas Receiver tonight.

Assuming the files are located on the same device as Hass is running and you created a ‘www’ folder, you can simplify this like this:

media_content_id: /local/doorchime.mp3

I also use multiple ways to control the radio, at he the moment by my Google Home (through IFTTT), a Xiaomi Switch and my latest project: a Xiaomi Cube. Perhaps I could add my config for those as well.

1 Like

Just realised that the thread about how to get the url’s for the streams is split from this one and hasn’t been active for a while. Posted this yesterday…


I’ve used this method before for the chromecast radio and recently 3 of my radio stations have stopped working (presumably the url’s have changed).

This method no longer seems to be working as searching the source for stream url yields no results and none of the url’s within the page seem to result in being able to find the actual url I want.

Any other ideas?

I’m looking for Free Radio Coventry & Warwickshire, Free Radio 80s and Sleep Radio if anyone already has the url’s. All my others are working fine.

[edit] I managed to find the sleep radio one - but the other two continue to elude me…

For anyone else looking for Sleep Radio:
http://37.59.28.208:8453/stream


So, if anyone in this thread has any ideas, gratefully received :+1:

Are you talking about the Tunein extraction method? Unfortunately that isn’t possible anymore indeed. I did not find a replacement yet (if anyone does please share with us!).

Thanks, I missed that one as well :slight_smile:

Sorry, yes, I was previously getting the stream url’s from the page source at tune-in.

So yeah, if anyone has a solution, please share :smile:

Mmmh…:face_with_raised_eyebrow: Xiaomi Cube you say? what’s that? I want one! :open_mouth:

https://xiaomi-mi.com/sockets-and-sensors/xiaomi-mi-smart-home-cube-white/

You can program different functions based on certain movements of the cube. ie: flip, bump, slide etc.

1 Like

Very interesting. I guess I need a Zigbee receiver on my system right? My HA is on a raspberry, let me see if it’s already compatible with that tecnology, but I’m sure it is…

the way I incorporated zigbee into my system was to buy a Xiaomi Hub. That connects via wifi and then gives you zigbee. I use it as a hallway night light triggered by a motion sensor and also as a doorbell chime speaker. pretty handy little unit

1 Like

It seems that this works for finding stream url’s.

https://www.quora.com/How-do-I-get-a-streaming-URL-for-Tunein/answer/Michael-Friedemann?srid=qNAe

Only pay attention that radio is playing because if it is not playing you wont get proper source when searching audio or jp_audio.

1 Like

@Bob_NL a simple example working.

With a simple phone android we can convert it a fake chromecast and the magic shows.

Very nice, I’ll will try this on 2 tablets I have sitting around doing nothing.

I also use this in combination with an Xiaomi Hub.

@Pantomax here’s the cube in action:https://youtu.be/SjoQUwNBcHE
Shake starts the script, rotate 90 degrees changes radio station (on random as you can see in the video if you pay attention ;)), rotate left/right changes the volume and double tap stops the radio. I also control some lights with it but didn’t show it in the video since this topic is about the radio.

2 Likes

I really want to implement this setup because to be honest, its awesome! in your first post are the headings you have there, the names of the yaml files?

in which case, do you have: !include selectors etc…?

also, you seem to have called your script the name of the first radio station of the list, is there a reason for this?

Glad you like it!

I use a lot of includes in my case. In the startpost however, I posted the configuration so that anyone can use it directly from configuration.yaml. I figured that those who are using includes, probably have enough Hass knowledge to know how to edit the syntaxes for use with includes ;).

The only reason for that is that I started the project with only one station and therefore that station earns copyright on the title (just kidding)

Thanks for sharing!

Yeah, that works - awesome :smile:

Thank you ! :+1:

Yes, please try it and report with us if it Works for you.

I guess I’m trying to get ahead of myself! I have a heap of !includes but still have no idea what I’m doing :laughing: