Closed domenicdistefano closed 2 years ago
HTTPS does not work with IP. You cannot have a valid certificate for an IP address, use hostname instead.
My apologies if my issue report was confusing - you are misunderstanding what the problem is (my fault). The line above referencing the test HTTPS query has nothing to do with your add-on. Just an attempt on my part to troubleshoot.
Everything works with a PC client using the HA card with the code I posted above. Simply moving to one of the mobile devices (same HA card) results in the failure seen in the screenshot.
Thanks
From: Juraj Nyíri @.> Sent: Tuesday, February 8, 2022 3:29 AM To: JurajNyiri/PlexMeetsHomeAssistant @.> Cc: Domenic DiStefano @.>; Author @.> Subject: Re: [JurajNyiri/PlexMeetsHomeAssistant] Tablet (Android or IOs) - Error (Issue #75)
HTTPS does not work with IP. You cannot have a valid certificate for an IP address.
— Reply to this email directly, view it on GitHubhttps://github.com/JurajNyiri/PlexMeetsHomeAssistant/issues/75#issuecomment-1032340740, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVXMGULR6F75BCGYXFNML3U2DH5FANCNFSM5NZGYU2Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.**@.>>
I understand the issue 100% from your config. You are using https with ip address. That will never work and there is no way how it would work. On pc you probably provided exception to the browser to accept connection even without proper certificate which is the reason it works there.
So what is the proper way to refer to the PLEX server running on the local LAN then for the IP: statement? What FQDN would a local Plex server running on private address space have?
Sent from my iPhone
On Feb 8, 2022, at 10:39 AM, Juraj Nyíri @.***> wrote:
I understand the issue 100% from your config. You are using https with ip address. That will never work and there is no way how it would work. On pc you probably provided exception to the browser to accept connection even without proper certificate which is the reason it works there.
— Reply to this email directly, view it on GitHubhttps://github.com/JurajNyiri/PlexMeetsHomeAssistant/issues/75#issuecomment-1032745919, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVXMGVGDBBEBP45SBF7HPLU2E2JVANCNFSM5NZGYU2Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>
OK - below is a portion of one of your examples.
At home I have an nginx proxy server and routinely use it along with Letsencrypt certs to point to local things. If I were to do this for my local Plex server thus obtaining a cert and FQDN for the card to use instead of the IP (as per the below example) should it work? OK going through the nginx proxy?
type: 'custom:plex-meets-homeassistant' token: QWdsqEXAMPLETOKENqwerty ip: remote.plex.server.com # remote shared plex instance port: 443
Sent from my iPhone
On Feb 8, 2022, at 10:39 AM, Juraj Nyíri @.***> wrote:
I understand the issue 100% from your config. You are using https with ip address. That will never work and there is no way how it would work. On pc you probably provided exception to the browser to accept connection even without proper certificate which is the reason it works there.
— Reply to this email directly, view it on GitHubhttps://github.com/JurajNyiri/PlexMeetsHomeAssistant/issues/75#issuecomment-1032745919, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVXMGVGDBBEBP45SBF7HPLU2E2JVANCNFSM5NZGYU2Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>
Bingo! Got it working using a FQDN / Cert as described above going through a proxy.
Working fine on PC but the below message appears on IOs devices (iPad & iPhone), Android phone and tablet (Fire 10).
Error: Plex Server did not Respond. Details of the error: Request Aborted
Also if I try the following HTTPS query from the above devices I get "The certificate home name mismatch when loading" https://10.10.10.38:32400/clients?X-Plex-Token=TOKEN
Here is the code from my Card
type: custom:plex-meets-homeassistant protocol: https sort: titleSort:asc displayType: '' playTrailer: true showExtras: true showSearch: true ip: 10.10.10.38 libraryName: TV Shows entity: plexPlayer: 10.10.10.234 token: XXXXXXXXXX port: '32400' maxCount: '100' maxRows: '' useHorizontalScroll: 'No' useShuffle: 'No' displayTitleMain: 'Yes' displaySubtitleMain: 'Yes' minWidth: '' minEpisodeWidth: '' minExpandedWidth: '' fontSize1: '' fontSize2: '' fontSize3: '' fontSize4: '' minExpandedHeight: '' title: ''