Call Service - Play Plex Playlist

Need some help! Trying to test playing a playlist using the info here: https://www.home-assistant.io/components/plex/

I used the Dev Service tab to test it out. I used the “fill example data” option, then massaged it using my data and the Plex playlist JSON example. It still says Invalid JSON. What am I doing wrong?

https://imgur.com/rlamBIR

If you copied the info from the website you need to retype the ( " ) marks as the copy and paste does not work correctly. I was able to retype all of the ( " ) marks and no longer received any JSON errors, but the plex playlist feature still does not work. I was never able to actually get this to work and I think it is a known issue with the plex hassio integration.

Thanks Matt. That did fix the invalid JSON error.

I had also read from past threads that playlist was not working. I was hoping with the new .99 changes for Plex, it would work now, but I am getting a failed to call service play_media.

Oh well, my hopes of Plex playing my favourite playlist when I get home from work and unlock the door will remain a pipe dream.

Appreciate the assistance.

EDIT I can’t even get it to play a single song or TV show either. Oh well. Thanks again for your time.

Are you trying to play a video or music playlist. I was originally trying to play a video playlist from Plex but finally gave up that dream.

I moved on to a new idea. I copied all of my video files for various shows to a computer with web server access so I can access them via HA. I then created “random” sensors in HA so I can get a random season number and a random episode number. I then created a custom script that will play a random episode of a random season from a show on either a google home hub or nvidia shield using google cast.

Below is an example. It also launches a loop script so that when a current episode ends, it will then play the next episode.

I thought about writing up the entire method of how this works, but have not had time yet.

  script_jim_living_room:
    alias: "Playlist: Jim Living Room"
    sequence:
      - service: media_player.play_media
        data_template:
          entity_id: media_player.shield_living_room
          media_content_id: 'http://xxx.xxx.x.xxx:PORT/TV/Jim/s{{states("sensor.jim_season")}}e{{(range(1,20) | random)}}.mp4'
          media_content_type: 'VIDEO'
      - delay:
          seconds: 10
      - service: script.script_living_room_loop
        data: 
          script_id: 'script.script_jim_living_room'
################################################################################