Ill try to make this explanation quick. I have been loving HASS and finally diving into everything it can do. I am at a point that I am a little stuck.
Iv’e ordered some refurbished 10" tablets for $30 each and I essentially just want to use them as dashboards. Its getting a little old having to tell alexa/echo to do EVERYTHING!!!
This brings me to the Chromecast Audio devices. For me this is the cheapest/easiest way for me to get audio directed throughout my house. So at first I went through the input_select tutorial and made radio stations through TuneIn Radio direct links and this seems to work well but I have to change my yaml filed everytime I want a new station.
So I added the pandora station media player and figured this would solve my issues. It added well but I cant push the pandora audio to the chromecast speakers through HASS. So I continued reading reading reading and came to the conclusion that HASS just cant do this yet. I came across this link Pi Control Hub and I thought that my dreams had come true. Then I realized that this method sent the audio locally and not to the different chromecast devices.
I was thinking of linking pandora and tunein with Plex and just using the web based UI for operation but this UI doesnt seem too touch friendly. Then I thought of using Kodi but then I dont know a way to send the audio to my chromecast devices.
So now im stuck. All I want is to be able to cast to my chromecast audio devices through HASS using Pandora,TuneIn Radio, and (possible Iheart Radio and Google Play) and have them all in one location on my dashboard.
I have been working on the same thing for the past few days, and I have come to the same conclusion, it can’t be done at this time. I would love to find a work around other than buying Google Home
I created a separate VM in ESXI that is running another instance of ubuntu. The only packages installed on this VM are Icecast2, PIP, Mopidy, mopidy-musicbox-webclient, Mopidy-TuneIn
Icecast:
Once you install icecast I had to change the config from “localhost” to 127.0.0.1 for anything to be able to see this server. I left all other settings default because im lazy. Once we have this server instance we make one more by installing mopidy.
Mopidy:
Mopidy is essentially going to do most of the work. This houses my tunein radio, all local media files, (google music and pandora are both possible too) and the search engine is pretty quick in the app.
Uncomment the MPD Section (change hostname to 0.0.0.0)
Uncomment the HTTP Section (change hostname to 0.0.0.0)
Uncomment the AUDIO Section and change OUTPUT to “output = lamemp3enc ! shout2send mount=mopidy.mp3 ip=127.0.0.1 port=8000”
Add Icecast2 password to this section (default is hackme)
This is your MP3 stream that can be used by multiple clients because of icecast.
After this you need to add you web clients and/or plugins (mopidy-musicbox-webclient, Mopidy-TuneIn)
Chromecast:
Basically you just need to set up Mopidy to send a stream to your Icecast server (which allows multiple streams) I did this by creating a template switch that plays the icecast server stream.
Iframe:
Now that you have a webclient for Mopidy we need to add it to Iframe in HASS. Now your iframe will be on the left side of HASS, You can now play from this section. Once you play music from this section you will need to tell it which speakers to go to by activating one of your switches.
This is the best way that I have found to do this so far. It may not be ideal for everyone but it seems to be working relatively well. I am currently working on a custom panel to see if I can get the chromecast stream switches right above the WebApp. Lets hope it works lol.
Hi, so you created a seperate virtual environment on your Raspberry Pi?
And in that venv you installed the Icecast2 and Mopidy? Can please share some extra steps, sinces this is all new to me and would love to learn this as well!
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…
Im jjust trying to configure this, ice cast is running, ive made the config changes, however when i run mopidy i get the following error (only when i put password in though)
WARNING Found fatal audio configuration errors:
WARNING audio/username unknown config key. (tried with and without username option)
WARNING audio/password unknown config key.