So - this is possibly a bit confusing, but here’s what I’ve got:
Location A: Mac Mini running Plex server. SonicWALL in place with VPN activated.
Location B: (Currently OS X / Later will be a Pi) Running Home Assistant. Connected to VPN so I can ping Plex Server.
I have been able to get the Plex sensor to be recognized and notice when things are playing and not. However, I am unable to get the Plex media player to show up.
I think this is an issue with the Plex player on AppleTV, it doesn’t register in the server as a client.
You can check if you see your Plex player at this url (just open in your browser): http://10.0.1.200:32400/clients?X-Plex-Token=REDACTED
If while playing something on your AppleTV you receive the following XML: <MediaContainer size="0"></MediaContainer>
The problem is not on HASS.
I think that this is due to AppleTV and not something you can fix in HA. I run Plex from my FireTV and it does show up in the media player when Plex is active.
Maybe this is something to bring up over at the Plex forums. There may be a work around or config hack for it.
I have the same problem with the plex iOS app on iPhone / iPad - this is definitely a problem with plex - the iOS app does not register with the server and is not visible in the web app and in the xml, so that’s why HASS cannot see it.
I’ve raised the issue here but still haven’t gotten a response.
When the server and the iOS are on the same network the server detects it via plex’s internal discovery protocol and it does show up.