core: Plex sensor and media players fail to update when server is restarted after an update

Home Assistant release with the issue:

0.101.3

Last working Home Assistant release (if known):

0.100.2

Operating environment (Hass.io/Docker/Windows/etc.):

venv Integration:

Plex https://www.home-assistant.io/integrations/plex/

Description of problem:

When the plex media server is restarted during an update the sensor and media players do not update. No errors are seen during the logs at this time either. The sensor also does not go to unavailable during this restart.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

plex:
  token: !secret token

Traceback (if applicable):

none

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (15 by maintainers)

Most upvoted comments

After updating to 0.110.x I can confirm this issue is fixed! I was able to update the server in the plex UI and after it finished I went to play an item and it actually updated in HA! The logs also indicate that the server attempted to reconnect which was not there before, previously I only saw the disconnected message!

2020-05-25 17:03:35 ERROR (MainThread) [plexwebsocket] Websocket disconnected
2020-05-25 17:04:35 ERROR (MainThread) [plexwebsocket] Websocket connection failed, retrying in 15s: [Errno 104] Connection reset by peer

Tested today on 0.109.2 same issue

So I tried to pull the debug logs from my dev instance and synced it up against the latest changes as of 9am PST today. It seems that the issue is no longer present in the dev branch so one of the fixes from 0.102 beta seems to have corrected this issue.

ok I usually download the plex betas about a day after release so shouldn’t be too long of a wait. Hopefully someone else who see’s this and hasn’t updated their server yet can grab the logs sooner than I can.

Can you bump up the logging and reproduce?

logger:                                                                                                                                                                    
  logs:                                                                                                
    homeassistant.components.plex: debug
    plexapi: debug
    plexwebsocket: debug

Also 0.102 (and the current beta) have additional debug logging to troubleshoot scenarios like this.