How to play media from emby or plex on chromecast

Hello good people of the community, I’m having a problem with a configuration.
My end goal is to be able to press a button on my android, probably a tasker shortcut on my home screen, and have a playlist start playing on a google cast device. ideally the phone is not required to keep the playlist playing, eg. not the device doing the casting.

My setup:
chromecast and chromecast audio connected to TVs and speakers in multiple rooms
plex and emby servers on the network
hass.io on a raspberry pi 3
bubbleupnp server for exposing the chromecast as dlna renderer

for the moment, I am not too concerned with the android part. I can use an http post from tasker to interface with HASS.
The part I am having trouble with is getting the chromecast to play media from either media server. I can control playback of the media player once started from another interface, but cannot initiate that playback from HASS.

I have emby setup in the configuration.yaml and I can see the chromecast and any emby or plex playback windows in the HASS states page.

Is playing media from the server even possible? If so, how.

In the end my ideal setup would have a tasker scene that would populate a drop down menu of available playlists on the media server, and another with the list of playback devices. then when a button is pressed, tasker would send a message to HASS and HASS would arrange for the selected playlist to be played on the selected media player.

Any help is greatly appreciated.

1 Like

Hey there. I have just installed hass.io to see about forcing Google Home and Amazon Prime to cooperate through Hass/maker and LG WebOs or something better.

For your topic, I am able to get Chromecast, via Google home to play plex media through a github project called Phlex. I wonder if you can leverage the virtual Google assistant in Hass and connect Phlex to this to achieve your goal?

I would also like to play my Plex music via Chromecast as I have the Chromecast plugged directly into a free HDMI slot on my AV amp.
I have tried calling the play_media service with variously formatted values but nothing works. Having said that I am unable to get it to work playing either a music track or playlist from Plex on any media_player, be they plex web, android, Samsung TV, Revo etc… :frowning:

I would love to hear if there is a way to play anything Plex on Chromecast, initiated by Hass. But i have not found a way so far…

Push up! Looking at the exact same problem…
I just want to start a playlist via HA script.
Therefore setter up Plex… but not moving atm

1 Like

Is this is possible now? i want a button on my dashboard that starts a specific video on my shield tv from my plex server! :slight_smile:

This may be possible with a script that:

  1. Uses the Android TV integration to turn on the Shield and switch to the Plex app.
  2. Uses the Plex integration to use media_player.play_media to start playback of the chosen movie.

The timing may be a bit difficult as the Plex app doesn’t always immediately broadcast that it’s running and able to accept commands. Worth a shot, though.