PLEX latest movies click to play

those are not the logs needed
look in the ui configuration/ logs

Thanks. Errors appear from other things that I am trying to correct.

The integration created the folders in www.

configuration.yaml

logger:
  default: warning
  logs:
    homeassistant.components.sensor: fatal 
    homeassistant.components.websocket_api: fatal
    homeassistant.components.bluetooth_tracker.device_tracker: fatal

Logs

[BDV-N9200W(http://192.168.0.25:10000/sony)] Unable to connect
10:30:46 – (ADVERTENCIA) Sony Songpal - el mensaje se produjo por primera vez a las 28 de junio de 2021 19:40:31 y aparece 295 veces
[Dormitorio Ana(192.168.0.203):8009] Failed to connect to service ServiceInfo(type='mdns', data='Chromecast-3ff275d6ffb10ffff192eabd6b17d316._googlecast._tcp.local.'), retrying in 5.0s
10:14:40 – (ERROR) /srv/homeassistant/lib/python3.8/site-packages/pychromecast/socket_client.py - el mensaje se produjo por primera vez a las 28 de junio de 2021 20:59:00 y aparece 5 veces
[Dormitorio Ana(192.168.0.203):8009] Heartbeat timeout, resetting connection
10:14:10 – (ADVERTENCIA) /srv/homeassistant/lib/python3.8/site-packages/pychromecast/socket_client.py - el mensaje se produjo por primera vez a las 28 de junio de 2021 20:58:30 y aparece 6 veces
Config entry 'https://192-168-0-115.a7d5360a324945a2b5786e405b790e6f.plex.direct:32400' for plex integration not ready yet: HTTPSConnectionPool(host='192-168-0-115.a7d5360a324945a2b5786e405b790e6f.plex.direct', port=32400): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x9d266a18>: Failed to establish a new connection: [Errno 113] No route to host')); Retrying in background
9:21:16 – (ADVERTENCIA) config_entries.py - el mensaje se produjo por primera vez a las 28 de junio de 2021 21:24:23 y aparece 3 veces
Plex server (https://192-168-0-115.a7d5360a324945a2b5786e405b790e6f.plex.direct:32400) could not be reached: [HTTPSConnectionPool(host='192-168-0-115.a7d5360a324945a2b5786e405b790e6f.plex.direct', port=32400): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x9d266a18>: Failed to establish a new connection: [Errno 113] No route to host'))]
9:21:16 – (ERROR) Plex Media Server - el mensaje se produjo por primera vez a las 28 de junio de 2021 21:24:23 y aparece 3 veces
Websocket to PC-MILE failed, aborting [Error: Too many retries]
9:21:12 – (ERROR) Plex Media Server - el mensaje se produjo por primera vez a las 28 de junio de 2021 21:24:20 y aparece 5 veces
Websocket connection failed, retrying in 15s: Cannot connect to host 192-168-0-115.a7d5360a324945a2b5786e405b790e6f.plex.direct:32400 ssl:default [Connect call failed ('192.168.0.115', 32400)]
9:17:09 – (ERROR) /srv/homeassistant/lib/python3.8/site-packages/plexwebsocket.py - el mensaje se produjo por primera vez a las 28 de junio de 2021 21:16:22 y aparece 16 veces
Update of sensor.l4 is taking over 10 seconds
8:18:13 – (ADVERTENCIA) helpers/entity.py - el mensaje se produjo por primera vez a las 28 de junio de 2021 22:17:12 y aparece 33 veces
Error fetching data: http://192.168.0.4/cm?cmnd=state failed with
7:56:46 – (ERROR) RESTful - el mensaje se produjo por primera vez a las 28 de junio de 2021 22:17:15 y aparece 13 veces
Unexpected exception occurred: 'sessionKey'
1:12:12 – (ERROR) /srv/homeassistant/lib/python3.8/site-packages/plexwebsocket.py - el mensaje se produjo por primera vez a las 1:12:05 y aparece 2 veces
http://192.168.0.115:32400: Client not found at http://192.168.0.115:32400
1:06:42 – (ERROR) /srv/homeassistant/lib/python3.8/site-packages/plexapi/myplex.py
Setup of media_player platform songpal is taking over 10 seconds.
28 de junio de 2021 23:34:36 – (ADVERTENCIA) Reproductor multimedia - el mensaje se produjo por primera vez a las 28 de junio de 2021 21:08:20 y aparece 2 veces
Error while executing automation automation.homeassistant_start: Unable to find service fullykiosk.load_start_url
28 de junio de 2021 19:42:00 – (ERROR) Automatización
homeassistant_start: Error executing script. Service not found for call_service at pos 8: Unable to find service fullykiosk.load_start_url
28 de junio de 2021 19:42:00 – (ERROR) Automatización
Error in 'choose[0]' evaluation: In 'state' (item 1 of 4): In 'state' condition: unknown entity media_player.sony_bravia_tv In 'state' (item 2 of 4): In 'state' condition: unknown entity media_player.samsung_tv In 'state' (item 3 of 4): In 'state' condition: unknown entity media_player.spotify In 'state' (item 4 of 4): In 'state' condition: unknown entity media_player.kok
28 de junio de 2021 19:41:50 – (ADVERTENCIA) helpers/script.py
Invalid option: (possible options: Tyst, Standard, Medium, Turbo, Av)
28 de junio de 2021 19:41:37 – (ADVERTENCIA) Entrada de selección
Can't connect to eWeLink Cloud
28 de junio de 2021 19:41:36 – (ADVERTENCIA) Sonoff (integración personalizada)
Login error: None, region: us
28 de junio de 2021 19:41:36 – (ERROR) Sonoff (integración personalizada)
Coolkit API error: Cannot connect to host us-api.coolkit.cc:8080 ssl:default [None]
28 de junio de 2021 19:41:36 – (ERROR) Sonoff (integración personalizada)
Waiting on integrations to complete setup: sonoff
28 de junio de 2021 19:41:23 – (ADVERTENCIA) bootstrap.py
Entity id already exists - ignoring: calendar.algoritmos_y_est_de_datos_computacion
28 de junio de 2021 19:40:40 – (ERROR) Calendario
Setup of sonoff is taking over 10 seconds.
28 de junio de 2021 19:40:37 – (ADVERTENCIA) /usr/local/lib/python3.8/asyncio/events.py
Setup of calendar platform google is taking over 10 seconds.
28 de junio de 2021 19:40:36 – (ADVERTENCIA) Calendario
Platform songpal not ready yet: Unable to do POST request: Cannot connect to host 192.168.0.25:10000 ssl:default [Connect call failed ('192.168.0.25', 10000)]: None; Retrying in background in 30 seconds
28 de junio de 2021 19:40:31 – (ADVERTENCIA) Reproductor multimedia

i think plex is the least of your issues :grinning:

but it says om the error:
https://192-168-0-115 , no route to host.

make sure you are using the correct ip and maybe try with http insted of https

You likely have issues with DNS rebinding protection. See the docs for the integration and Plex’s documentation.

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?