Chromecast Radio with station and player selection

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:

ok cool. I just didnt want to break the function by not following suit

if it ain’t broke… :slight_smile:

I would to use this but get two errors :

  1. 2017-11-16 21:16:28 ERROR (MainThread) [homeassistant.loader] Unable to find component chromecast_radio
    2017-11-16 21:16:28 ERROR (MainThread) [homeassistant.setup] Setup failed for chromecast_radio: Component not found

and the message that I have an invalid config because “Input_select could not be set_up” although I copied the code from this thread.
At first in a seperate yaml, and when that did not work, I put it in the configuration_yaml

Do I have to add some components that are not mentioned at top of this thread ?

@curious did you put both of them in your config?:

input_select:
  radio_station:
    name: 'Select Radio Station:'
    options:
      - Radio 538
      - Q-Music
      - 3FM
      - 100% NL
      - Veronica
      - Sky Radio
      - Arrow Classic Rock
      - Classic FM
      - BNR Nieuwsradio
      - Radio Rijnmond
      - Poez
      - SLAM! Hardstyle
      - Bob Sinclar Radio
      - Smooth Jazz Tampa
      - Classic Rock Florida
      - Netherlands Viral 50
      - Chill Out Zone
      - Sleep Radio
      - Ambient Sleeping Pill
      - Radio Art - Sleep
      - Ambi Nature Radio
      - Calm Radio - Sleep
      - Dinamo.FM Sleep
    initial: Radio 538
    icon: mdi:radio
  chromecast_radio:
    name: 'Select Speakers:'
    options:
      - Livingroom
      - Livingroom - Onkyo
      - Google Home
      - Bedroom
      - Bathroom
      - Hall
      - Everywhere
    initial: Everywhere
    icon: mdi:speaker-wireless

Check here if you’re interested: