Trouble playing Plex media from service call

I’m trying to set up a couple scripts to play videos from Plex on our fire stick with the Plex app, but I’m not having any luck as the media_player.play_media service just keeps telling me the media could not be found:

entity_id: media_player.plex_living_room_fire_stick
media_content_type: video
media_content_id: "{ \"library_name\": \"Movies\", \"video_name\": \"Trolls\", \"shuffle\": 0 }"

Media could not be found: { "library_name": "Movies", "video_name": "Trolls", "shuffle": 0 }

entity_id: media_player.plex_living_room_fire_stick
media_content_type: episode
media_content_id: { \"library_name\": \"TV Shows\", \"show_name\": \"Paw Patrol\", \"season_number\": 1, \"episode_number\": 1, \"shuffle\": 0 }

Media could not be found: { "library_name" : "TV Shows", "show_name" : "Paw Patrol", "season_number" : 1, "episode_number" : 1, "shuffle": "0" }

and so on for a handful of shows and movies I tried. Library name matches the Plex server, and movie/show titles match what shows up in the Plex app. What am I missing?

The docs show media_content_type in ALLCAPS. I don’t know if that is needed, worth a try.

PS it is specified in the source as ALLCAPS.

Yes, it’s unfortunately case sensitive at the moment. If you use all caps and you’re still seeing the “Media could not be found:” error, that implies that the Plex server simply can’t find the media you’re requesting. Movies are usually the simplest test.

PS: The shuffle parameter is optional in recent versions but the docs haven’t been updated to reflect this yet. It’ll default to “0” if not included.

Tried it again yesterday and made sure I was using all caps for media type and it seems to be working now, so I think we can call this resolved.

1 Like