JurajNyiri / PlexMeetsHomeAssistant

Custom card which integrates plex into Home Assistant and makes it possible to launch movies or tv shows on TV with a simple click
Apache License 2.0
107 stars 8 forks source link

Unable to stream on devices that are not "Cast" #99

Closed zalmael closed 5 months ago

zalmael commented 10 months ago

Describe the bug Unable to stream a video on any device that are not "cast". Note that I can stream on my chromecast or google hub. Everything is well set-up (apparently), library is loaded, play buttons are here, but after lauching a video, it stops working. But I can see it does something.

2 different set-up :

type: custom:plex-meets-homeassistant
protocol: http
sort: titleSort:asc
playTrailer: true
showExtras: true
showSearch: true
ip: 192.168.1.68 
token: X-PLEX-TOKEN
port: '32400'
entity:
  plexPlayer: 192.168.1.68
libraryName: Films

When I launch a video, I can see on my Plex client (on the same device as the server is running on) that there is an activity image but then, it stops immediately. image

For this one, I also tried the identifier, with same result. I even tried to stream from the server to the client with this config

entity:
  plexPlayer:
    - identifier: TV 2016
      server:
        ip: 192.168.1.68
        token:  X-PLEX-TOKEN
        port: 32400
        protocol: http

Here what I see on the TV : 20230830_195509

Here are some logs about XHR requests, everything seems fine. I can send the details of the payloads and responses if needed.

image

Checks Please check below if true:

[X ] I am running Home Assistant on HTTP protocol [ ] I am running BOTH Home Assistant AND Plex on HTTPS protocol [X ] My Plex server is accessible through protocol, port and ip/hostname I have specified for the card. [ ] My Plex server is running on HTTPS and has a valid certificate.

Card Version 3.6.8

Plex Version Version 4.108.0

Device information Any device. Computer, Mobile

Thanks for your help, this card looks amazing but for now, I don't know how to use it properly. Maybe I'm missing something obvious.

zalmael commented 10 months ago

Hum, after further tests, I revoked access to some of devices not used anymore, including the Chrome one on the local device (same as server). After restarted, I got a new token, which I changed in my card configuration, but now, I get the message "rest_command/pmha_playmedia. Service not found". image

Edit : Nevermind, the request no longer fails.

JurajNyiri commented 5 months ago

Looks like you got it resolved. If the issue is still occuring please let me know and I will reopen this.