Plex discovered but token not taking

Hi Everyone,

I am looking for some assistance in getting Plex to work with Home Assistant.

I am using Home Assistant 0.47.1 on Windows 10. Plex is installed on the same machine and I keep getting the following error.

2017-06-29 15:12:46 ERROR (Thread-7) [plexapi] http://10.39.167.126: HTTPConnectionPool(host=‘10.39.167.126’, port=80): Max retries exceeded with url: /?X-Plex-Token=pDBseHyU7AiN7ph928uB (Caused by NewConnectionError(‘<requests.packages.urllib3.connection.HTTPConnection object at 0x06FA6CD0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it’,))

Plex is being found by discovery and asking for the token. I put the token in and get “failed to register, please try again”. In plex I have white listed the IP and have also set secured connections to preferred.

I have been messing around for hours and can’t seem to get them to work. Any help or assistance would be greatly appreciated.

Fastrax

You can also enable the plex platform directly by adding the following lines to your configuration.yaml:

# Example configuration.yaml entry
media_player:
  - platform: plex

In case discovery does not work (GDM disabled or non-local plex server), you can create ~/.homeassistant/plex.conf manually.

{"IP_ADDRESS:PORT": {"token": "TOKEN"}}
IP_ADDRESS (Required): IP address of the Plex Media Server
PORT (Required): Port where Plex is listening. **Default is 32400**
TOKEN (Optional): Only if authentication is required. Set to null (without quotes) otherwise.

Thanks @NK553

I have also given that a go. But it’s still not working. Its still appearing in the “configurator” on the home screen asking for a token.

Would I have to disable it in discovery too if I have manually added in as above?

Thanks for the help. Fastrax

Try this:

  1. Open the Web UI for your Plex server and go to the Setttings for the server.
  2. Go to the network section and make sure Secure Connections is set to Preferred and GDM box is checked
  3. Click on the Advanced button and look further down the list for an option labeled “List of IP addresses and networks that are allowed without auth”. Put the IP of your HA server in here. Save your settings and for good measure restart your Plex server.
  4. Now restart HA and see if you connect.
1 Like

Hi, I have given the above a go a few times but still not getting any closer!

Thanks for the help. Any other suggestions?

I’ve tried both suggestions above and no luck for me either. Seems like something is broken. I had an earlier install of HA that registered the token with no issues. This time it’s a no go for me as well.

Unless you’re running the Plex server on a separate subnet, or enforcing SSL on the Plex server, I’m kinda out of ideas. Sorry.

I am wondering if there has been some sort of change to the authentication process recently?

Does anyone have an example of what they have in their configuration.yaml and plex.conf that are in the .homeassistant folder to get things working?

Any advice would be apprecaited

plex.conf

{"192.168.1.195:32400": {"token": "PlexTokenWouldBeHere"}}

Plex entry for media_players.yaml file included in configuration.yaml

- platform: plex
  include_non_clients: true
  use_episode_art: true
  use_dynamic_groups: true
  scan_interval: 15

i have the same problem, tryed all things mentioned here.

i think something is broken :slight_smile: