I finally got the Plex integration working with Home Assistant and an Nvidia Shield. I believe the docs are outdated and ask for “/” in the media_content_id but that is no longer needed. Below are three examples for playing a movie, a tv show episdoe, and a video playlist.
It cold work for a Sonos player but you must add Plex to the list of services in Sonos. Then the Sonos player should show up as a client. So if you have an audio playlist in Sonos you could use my playlist example above. This will not work for chrome cast because Plex does not register chrome cast devices as Plex clients.
@millsx2 have you done any configuration to your players (Plex Clients)?! I’m absolutely not able to start an episode to any of the plex clients I have… I’ve tried Plex on Apple TV, Plex Kodi Add-on, two browsers (Safari and Firefox) and Plex on iOS with the same sad result.
It just doesn’t work… It doesn’t show errors in the logs too…
The configuration for the players/clients should be automatic as long as you have the plex configuration set up correctly. Anytime a new client is added, for example, you install plex on a PS4, a new media player should be created in hassio that represents the ps4 plex client. Once a new media player is available for that plex client, you can then use it to send the play media command to it utilizing my methods above. If the plex client goes unavailable after a while (due to inactivity), you can look in to sending a rest command of “idle” to basically wake up that plex client to then allow for the play media comand to be send to it.
Well I,ve been able to make the whole thing work! It was because of the formatting of the commands you posted on this forum… Quotes were copy/pasted to `(accent grave, in French).
For those reading this in desparate need of a solution, here is what i’ve done in “code block”:
What version of hassio are you on? I am on .103 and I am surprised you still need to use the “” escaped brackets. I think those were removed in some of the updated versions of hassio.
It’s not necessary to escape the double quotes as long as the whole payload is enclosed in single quotes. Make sure that all the quotes are “plain” and not open/close versions.
Are any of you able to cast plex to a standard, non-built-in Chromecast? I can cast to my Shields, but not my Chromecast. see here for full issue details
I think you need to have the plex app installed on a device in order to cast to it. Since my nvidia sheild has plex installed, my home assistant integration sees the plex client and I am able to install to it. I cannot install the plex app on my Google Home so I cannot cast directly to it. I can cast to it through the plex app on my phone though.
@millsx2 That’s what I’m leaning towards. It would be great if we could cast to any device that Plex can.
Sidenote…when you use play_media, does Plex track it? My Plex Server Dashboard won’t show that anything is playing and played/unplayed and play position don’t get tracked even though the video plays on the Shield.
Yeah I would love to be able to cast plex to any device that is supported by Plex. As a workaround I can cast the .mp4 file directly to a Google Home without needing Plex but the features are limited compared to what you can do with plex.
As for the dashboard, play_media used to show what was playing on Plex on my shield. This was working great until a couple weeks ago where I think something changed either on Plex’s end or in the plex component code.