PLEX latest movies click to play

How did it go for you? did it help my card?, maybe wanna share yours?

Sorry to ask in your post but it seemed to me that I was asking something similar.
My home assistant is this:

I am trying to correct everything she did and adapt it to my needs.

When I get home from work I try what they told me. The documentation I already read it. I don’t know English and the translation is sometimes not good. One of my problems was the permissions I had on the www folder. The last thing I did is correct that and plex created a folder under www. On that side I think he’s doing something.
The port opened it following the documentation. If I look at the open ports they are not visible. I don’t know if they should be seen.

http://192.168.0.115:32400 I did not try with https

I’m still the same, you can see the images of the different configurations. Only with the ip the sensor is online but empty.
If I want to enter by url it works fine

sensor:
  - platform: plex_recently_added
    token: !secret plex_token
    host: !secret plex_host
    port: !secret plex_port

Before

plex_token: xxxxxxxxBD5Ed 
plex_host: 192.168.0.115
plex_port: 32400

Untitled

After

plex_token: xxxxxxxxBD5Ed 
plex_host: https://192.168.0.115
plex_port: 32400

image

I don’t know if it’s a mistake. If I enter by url it asks me to log in: http://192.168.0.115:32400/

Here is mine and it works:

  • platform: plex_recently_added
    name: Recently Added tv-shows
    token: xxxxxxxxxxxxxxxxxxxxxxxx
    host: 192.168.178.200
    port: 32400
    max: 10
    section_types:
    • show

But in any case if the IP cant be reached tray a tracert to see where it stops.
that will go stet by step from the home assistant host to the plex server and see where it stops.
but is simple, is not home assistant, the host device cant reach the ip 192.168.0.115. what’s the IP of your home assistant instance?

By the way
if you are doing this:
plex_token: xxxxxxxxBD5Ed
plex_host: https://192.168.0.115
plex_port: 32400

take away the "https:// " on the host part it only needs the ip

If I access from a Chrome with the IP, it enters plex. The error that was seen in the previous log was because the pc was turned off.
Home assistant’s ip is 192.168.0.2 and it’s on the same network. I hope the problem is not that the raspbery pi is in an environment.
The configuration of plex recently add is only with the ip.
What I do not understand is why it is shown online and yet the sensor is empty

Thank you very much for sharing your configuration, I will try when I return from work

First I had a problem with the windows firewall as it did not accept pings from outside.
Once I deactivated it, I did a traceroute from the rasp to the ip of the windows where the plex server is hosted.
Solved it without problem.
I removed the plex server integration and recently added and reinstalled them.
Everything remains the same. The sensor is still empty.

I will not have configured something in the plex server

I still can’t solve the problem. When I find the solution I will share it

Hello,

i tried to play a movie, but i always get :

Media could not be found: { “library_name”: “Movies”, “title”: “Texas Chainsaw Massacre”, “year”: “2022” }

here is my card :

type: picture-elements
image: ' '
elements:
  - type: custom:config-template-card
    entities:
      - sensor.plex_recently_movies_poster_1
      - sensor.neue_filme
      - sensor.plex_recently_movies_play_movie_1
    card:
      type: custom:hui-picture-card
      title: Movie 1
      image: ${states['sensor.plex_recently_movies_poster_1'].state }
      tap_action:
        action: call-service
        service: media_player.play_media
        service_data:
          entity_id: media_player.plex_plex_for_android_tv_aftmm
          media_content_type: movie
          media_content_id: ${states['sensor.plex_recently_movies_play_movie_1'].state  }
    style:
      top: 44%
      left: 30%
      width: 13%
      border: 2px solid gold

is the problem that sensor.plex_recently_movies_play_movie_1 has this as value?

{ "library_name": "Movies", "title": "Texas Chainsaw Massacre", "year": "2022" }

i get a second error:

Library 'Movie' not found

can you please help?

First, make sure your library name is correct. Your script says “Movies” but the error says “Movie”.

Otherwise this might be related to media_player.play_media not able to find Plex libraries · Issue #66659 · home-assistant/core · GitHub. Any chance you’ve added leading spaces to your library names to reorder them?

Also look how mine does not have spaces.

[sensor.plex_recently_movies_play_movie_1]
Movie 1 play button
{ “library_name”: “Movies”, “title”: “Eiffel”, “year”: “2021” }

Regards

Hello,

yeah you are right this was a typo, my library has the name “Filme”

no i use no leading spaces.
here are my libraries

<Directory allowSync="1" art="/:/resources/movie-fanart.jpg" composite="/library/sections/1/composite/1645268657" filters="1" refreshing="0" thumb="/:/resources/movie.png" key="1" type="movie" title="Filme" agent="tv.plex.agents.movie" scanner="Plex Movie" language="de-DE" uuid="3108dac9-38f3-4db2-ab11-9cf2f42f41b2" updatedAt="1641735154" createdAt="1640286404" scannedAt="1645268657" content="1" directory="1" contentChangedAt="3719122" hidden="0">
<Location id="12" path="/12TB/12TB/IMAX"/>
<Location id="1" path="/12TB/12TB/Filme"/>
<Location id="2" path="/12TB/12TB/Filme 4K"/>
<Location id="3" path="/10TB2/10TB/Filme/1080"/>
<Location id="4" path="/10TB2/10TB/Filme/4K"/>
<Location id="5" path="/10TB/8TB-2/4K"/>
<Location id="6" path="/3TB"/>
<Location id="7" path="/8TB/4K"/>

then i tried it with a movie called “source code”, but no luck.

 media_content_id: >-
            { "library_name": "Filme", "title": "Source Code ", "year": "2011" 
            }

i put the aboce code direct in the widget to test it, but no luck he always said,

homeassistant.exceptions.HomeAssistantError: Media could not be found: { "library_name": "Filme", "title": "Source Code ", "year": "2011"  }

You may see more info on why it failed in the home-assistant.log file.

I found the problem. I had 2 libraries with the same name filme.
I deleted one of them and now it works fine.

But has Someone the same problem that lovelance says he can’t find the hui-picture-card ?

It worked but now it stops, when I open “add new widget” it works and the card get loaded.

@Dingin

is it possible to hide the watched movies?
he saves the “flag” status, this is the watched or?