I am attempting to configure HASS and a Chromecast Audio device to play sounds on the same RPi3 via a share URL. I have the chromecast set up to play an iHeart Radio stream for the dog when I leave, which works, but I can’t get it to play a local media file as an alert sound. Has anyone set this up? Any suggestions on alternate config I need to do?
I got this to work by installing a plex media server on the raspberry pi. Then used plex to get a stream url that is used on the configuration of home assistant.
@jasonmscollins How exactly did you do that mate ? I have a plex media server running in my Synology NAS which I can play from Web address. And from Plex ofcourse I can cast any media to Chromecast. But from hass, I can’t trigger any media via Chromecast; while my chomecast is discovered in hass but plex is not discovered there though. But I dont think that should be problem as I wanted to play the media from plex through Chromecast. So, I think Plex need not to be discovered in hass ??
The problem I find the media link which I need to play… If I try via the dev-service > media_players.play_media and then trying to cast the media_content_id as “http://:32400/library/metadata/397”. Should it be the right address ?
I got the metadata information from the dev-state > Chromecast > media_information… But it seems it is not the right address
By the way, if I directly paste the link in a web, it opens up a xml file instead of opening the media.
Hi Jason, to play local media via Chromecast from home assistant, in my case it worked only if I ran Python simplehttpserver. I couldn’t get Plex work properly to meet my requirement.
However, as I didn’t like the idea of running the simple http server in background. I completely moved to Kodi media centre where I can even play YouTube video from Hass. In deed, some days, I quickly upload a video in YouTube in private mode, get the ID and straightaway play at home to instruct or inform something via the TV when I am at office…
Thanks
I am able to play a remote URL mp3 file using google cast. But when I run the python simple HTTP server, the file does not play. If I pate the URL (http://localhost:8000/garagedooropen.mp3) in a browser tab, the audio plays fine, so the URL is correct. Any ideas, maybe one of you guys has encountered this?
Didn’t try, but i had the same problem in the begining. I solved it by open my live stream with vlc. In VLC I looked at information and found a direct link to the stream. I hope it can help you.
Is it possible to cast a link from Spotify to google audio? Can’t get it to work and I think it is because account and password. Someone that have succeed with this?