Closed dshokouhi closed 4 years ago
Hey there @jjlawren, mind taking a look at this issue as its been labeled with a integration (plex
) you are listed as a codeowner for? Thanks!
I think this is only a UI thing since the component aborts immediately if there's already a config or if you're in the process of creating one: https://github.com/home-assistant/home-assistant/blob/463c2e8d45bf89199ea2cb64881cc38e37f14627/homeassistant/components/plex/config_flow.py#L164:L168
@jjlawren yea I wasn't really sure where this issue relied. I was thinking it was from discovery
but maybe something else is triggering the notification?
Every time I dismiss it the notification comes back in like 20 min or so?
I can't reproduce this when Plex is the only integration that's discovered. Do you have any other integrations listed under "Discovered" that haven't been configured yet? They may be coming from SSDP or zeroconf, too.
If Plex is showing up under "Discovered" then that's unexpected.
I only have Plex listed under discovered. I already have Plex configured with my local server selected. All the servers remaining in the drop down are ones that are shared to me and I do not own them.
I had the same behavior when plex was configured in config:
taking it out there, and have Plex configured via the integrations page solved this.
Maybe this is related (if not please discard): I do have another issue, maybe related to the Plex component continually trying to find a server, and that is it seems to halt the system if and when my Synology disk station( on which Plex server is running is) shut down for power saving during the night. The log is filled with Plex errors. see https://community.home-assistant.io/t/plex-discovery-causing-trouble/150022
Wish we could set the Plex component to stop 'discovering' when the configured server is offline....
I had the same behavior when plex was configured in config:
taking it out there, and have Plex configured via the integrations page solved this.
Ah let me try this today.
I only have Plex listed under discovered.
Once you have added a Plex server integration, it should no longer display under the "Discovered" header. I cannot reproduce this on my side as of yet.
I already have Plex configured with my local server selected. All the servers remaining in the drop down are ones that are shared to me and I do not own them.
This is normal. When you attempt to set up additional Plex integrations when multiple servers are available, it will only offer to configure servers which you have not already configured.
Ah, I think I might understand why this is happening. It's actually not related to discovery at all. It will occur when:
configuration.yaml
which both:
a. Contains a token
b. Does not specify an explicit Plex server IP/hostnameWhat happens is that on startup it attempts to import the token in the yaml config, finds multiple servers, and then waits for the user to choose one. I think this is probably the correct default behavior.
You can avoid this by removing the plex:
entry from configuration.yaml
or by adding in either host
&port
or server
config options.
You can avoid this by removing the plex: entry from configuration.yaml or by adding in either host&port or server config options.
Great you are seeing to this. I must however add the following config which shows it also happens when a host and port are in fact configured (and Plex is also configured via the integration):
plex:
host: !secret plex_ip
port: 32400
## username: !secret plex_username
## password: !secret plex_password
ssl: false
verify_ssl: false
token: !secret plex_token
media_player:
use_episode_art: true
show_all_controls: false
I have the username and password commented, as that is a remnant from a previous configuration. Simply showing here so to make sure I havent set these.
completely removing the config section does indeed stop the constant discovery, as I reported above. Not sure if I miss necessary options by doing so though. The config settings seem more complete and detailed
It's not needed anymore. The configuration.yaml
is not used directly by plex
, but are imported to create an integration config entry. The integration is started using those config entry options. You can see what's stored in <config_dir>/.storage/core.config_entries
. The media_player
options viewable/editable through the UI by clicking the gear inside the Plex integration page.
I see yes, thanks..
what about the ssl settings? Are they configurable or needed?
I can see the verify_ssl: false
in the config_entries, the ssl: false
isn't there though.
That's now built into the URL's http/https prefix.
Ah, I think I might understand why this is happening. It's actually not related to discovery at all. It will occur when:
- An existing Plex integration is configured
- A Plex entry remains in your
configuration.yaml
which both: a. Contains a token b. Does not specify an explicit Plex server IP/hostname- Multiple servers are linked to the Plex account associated with the token
What happens is that on startup it attempts to import the token in the yaml config, finds multiple servers, and then waits for the user to choose one. I think this is probably the correct default behavior.
You can avoid this by removing the
plex:
entry fromconfiguration.yaml
or by adding in eitherhost
&port
orserver
config options.
Yup that was it, after removing the configuration after the import it no longer attempts to discover other servers :) I am ok to close this now if you are @jjlawren
I have an idea on how to prevent this. Let's keep it open so I remember to fix it.
Home Assistant release with the issue:
0.100.2
Last working Home Assistant release (if known):
N/A as we were never able to see non-local servers before 0.100
Operating environment (Hass.io/Docker/Windows/etc.):
venv Integration:
plex: https://www.home-assistant.io/integrations/plex/
Description of problem:
discovery
integrationthe discovery notification for plex integration continues to show up despite the local server being setup and the notification being dismissed.
Personally I would expect for it to stop notifying after 1 server is setup or ask the user to stop searching or disable certain servers. The additional servers that show up are not mine and are just shared.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information: I am not sure what the expected behavior here is or if this is a known issue around discovery.