Setup failed for plex: No setup function defined

Following all the instructions on Plex setup, including adding 192.168.0.0/24 to the list of authorized IP address within my Plex Server.

But, on boot, I get this error:

Setup failed for plex: No setup function defined.

A couple things to note:

  • Using HassIO 0.98.5
  • The Plex watch sensor works
  • SSL true / Verify false works
  • I’ve continued to update the claim token after expiration (lasts only 5 minutes)
    • I even tried a null token, i.e. adding 192.168.0.0/24 for authorization without login
  • The only thing not working is media_player settings.

Google-fu found nothing like my error. The word “function” doesn’t exist as a whole word anywhere on the Plex instruction. What’s missing here? My plex config:

{
    "192.168.0.24:32400": {
        "ssl": true,
        "token": "claim-<censored>",
        "verify": false
    }
}
plex:

media_player:
  - platform: plex
    show_all_controls: false
    use_episode_art: true
    remove_unavailable_clients: true
    client_remove_interval: 600

sensor:
  - platform: plex
    token: !secret plex_webtoken
    host: 192.168.0.24
    port: 32400
    ssl: true
    verify_ssl: false
1 Like

same here…cant figure it out… V 0.98.3

Did you get this to work ? I have the same problem…

The new update, 0.99, has reworked how Plex communicates. Following the new setup, it does work, without the errors now.

However, there doesn’t appear to be Plex control anymore – don’t know if that worked before or not… But it does register the number of viewing streams as it did before.

As mentioned over in Error when configuring Plex Server, HA 0.100 will have a new setup method for Plex that should make it more reliable to configure.

@guice can you confirm if media_player entities are created when Plex clients begin playing content? It may look like nothing is happening with the integration before that.

I see no new media_player entities created with the Plex integration. My YAML for Plex:

plex:
    token: !secret plex_webtoken
    host: 192.168.0.24
    port: 32400
    ssl: true
    verify_ssl: false
    media_player:
        use_episode_art: true
        show_all_controls: false

(PS: Sorry for the late, late reply… A little laptop trouble and busy personal schedule.)

Hard to guess what’s going on when it appears nothing is happening. A few questions:

  1. What version are you on now?
  2. Does the Plex sensor entity appear and update?
  3. Have you tried configuring via the “Integrations” page instead of YAML? It validates the config interactively in case there’s an issue there.
  4. Can you bump up the logging in your configuration.yaml?:
logger:
  logs:
   homeassistant.components.plex: debug
   plexapi: debug

Everything is latest version.

I think I see what’s going on: looks like some of my old plex file configurations (plex.conf, plex.yaml package, and old integration entities) were conflicting with the new setup.

What I did:

  1. Removed the old plex.conf and my plex.yaml package configurations.
  2. Removed the entity from the Configuration UI.
  3. Added a new Plex Integration via the UI
    • This did the oauth redirection login to Plex and back
  4. Plex Sensor successfully showed – with a new name (went from sensor.plex to sensor.plex_zues)
  5. Opened the Plex app on my phone, and media_player.plex_blank_card_max was now added.

Thanks, @jjlawren. I appear to be up and fully functional now. :slight_smile:

1 Like