Using Google Home?
nope on the echo
solution: maybe using Google Home
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
beeing from the same company is well integrated.
Chromecast Audio and GH can be made as a group
Ok I finally have some type of solution
- Icecast2
- Mopidy
- HASS (iframe)
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.
media_content_id: "http://192.168.1.192:8000/mopidy.mp3"
media_content_type: "audio/mpeg"
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!
Hi, I’m new to HA and I did some reseach to find a good website to explain benjimatt’s solution. I’m sure it will be usefull to some people so enjoy!
https://www.howtoforge.com/linux_webradio_with_icecast2_ices2
https://github.com/skalavala/Multi-Room-Audio-Centralized-Audio-for-Home/blob/master/Install%20Mopidy.md
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
@anon43302295 Try this and let me know if it works thx
Free Radio Coventry & Warwickshire
http://tx.whatson.com/http_live_bauer.php?i=freecoventry.aac
redirects to ----(02 varies with different number "02, 03, 08, etc…)
http://icy-e-bl-02-gos.sharp-stream.com/freecoventry.aac
Free Radio 80s
http://tx.whatson.com/http_live_bauer.php?i=free80s.aac
redirects to ----(02 varies with different number "02, 03, 08, etc…)
http://icy-e-bl-04-cr.sharp-stream.com/free80s.aac
Ah, I forgot I cross-posted this and got an answer in the other thread…
Thanks though
Will this play the music in sync on multiple speakers if you start the streams at the same time with an automation?
If you have the speakers in a group on the Google app you could do this
Hi
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.
Config
[audio]
mixer = software
mixer_volume =
output = lamemp3enc ! shout2send mount=mopidy.mp3 ip=192.168.5.232 port=8000
username = relay
password = whatiset during icecast install (checked in config file)
#buffer_time =
Also if i dont set password, mopidy starts but when i try and play a file or stream i get the following error
ERROR GStreamer error: gst-resource-error-quark: Could not connect to server (6)
Any thoughts would be appreciated?
Cheers
I just configured Mopidy, icecast2 and my chromecasts to provide a multi-room audio environment at home but seems the chromecasts are not synchronized together which is not a good experience.
Do you feel the same?
Isn’t that lag configured via chromecast audio settings->sync delay for each device in Google Home app?
Also, has anyone tried flac files using the icecast solution? does it transcode?
One and a half year later I still looking for htis post to set up mopidy for my Chrome Cast Audio’s.
After All this time I still dont know a better way to get his own music to the chromecasts.
Thanks!
I’ve had successfully set up this solution on my Synology using a docker for Mopidy and one for Icecast. No matter the settings however, my Chromecast audios take at best 13 seconds or so to start/hear changes. Using VLC it is normally instant however.
Only using the Flac encoder:
output = audioresample ! audioconvert ! flacenc ! oggmux ! shout2send blablabla
am I able to start a stream with almost no latency (track changes are heard within a second). Unfortunately due to some GStreamer bug, Mopidy crashes when sending Flac.
Do you guys experience “lagless” playback? What are your settings? Anything more than a few seconds feels really bad from a user experience point of view.
Edit: Using lame3enc and a high burst size on ice cast the stream starts immediately, if something is already playing. However, there is still around 10 seconds to hear track changes etc.
i like this setup, will give it a try, any idea how to implement to play different music at each room
Would anybody have experience with starting a Plex audio stream through HA?
I have it hosting a white noise file that I’d love to play on my kids Google Home Minis when it’s their bedtime.
I assume there will be some copying of the service calls from above, I just don’t know where to look for the song URL.
Thanks