I have two plex servers, one hosted on an internet server using a custom port, another as a local Hassio Addon.
The internet plex server connects and works just fine, however when I try to add my local docker plex server, which is behind nginx proxy manager as a custom location, home assistant fails to connect with the error:
xml.etree.ElementTree.ParseError: mismatched tag: line 1, column 2287
If I set the plex server in homeassistant to use the same domain, but use 32400 as the port using HTTP, it works just fine. I also have my domain and port configured as an announced address, and everything works outside of homeassistant even with remote access turned off.
I’m able to load my domain using the paths specified in the custom location using a web browser or curl. I had a plex server hosted elsewhere some time ago I put behind an HTTPS revers proxy on port 443 and remember having similar issues with homeassistant. Is there some defect someone else can reproduce with connecting to plex on HTTPS port 443:?
custom location for nginx proy manager:
location / {
if ($args ~ (.*)X-Plex-Device(.*)) {
proxy_pass http://a0d7b954-plex:32400;
}
proxy_pass http://homeassistant:8123;
}
location ~ ^/(\?(?:.*)(X-Plex-Device=)|web|video|photo|library|web|status|system|updater|clients|:|playQueues)(.*) {
proxy_pass http://a0d7b954-plex:32400;
# proxy_redirect http://a0d7b954-plex:32400 /;
# set some headers and proxy stuff.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}