2017-10-15 21:00:47 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up
platform plex
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/media_player/plex.py", line 80, in setup_platform
file_config = config_from_file(hass.config.path(PLEX_CONFIG_FILE))
File "/usr/src/app/homeassistant/components/media_player/plex.py", line 68, in config_from_file return
json.loads(fdesc.read())
File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decodeobj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s,
err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 35 (char 34)
2017-10-16 12:13:35 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up
platform plex
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for return fut.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result raise self._exception
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/media_player/plex.py", line 80, in setup_platform file_config =
config_from_file(hass.config.path(PLEX_CONFIG_FILE))
File "/usr/src/app/homeassistant/components/media_player/plex.py", line 68, in config_from_filereturn
json.loads(fdesc.read())
File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s,
err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 35 (char 34)
After some more fooling around I figured out that error was being thrown because of a borked plex.conf file. I didn’t have double quotes around my token!
Now HASS no longer throws an error in the log when I try to enable the plex component but it STILL doesn’t show up.
I had my Plex docker container in bridge mode with all the ports forwarded. As a test I changed it to “host” mode.
Now, with no media player configured and no plex.conf file when I restart HASS a get a new media player show up “Shield Android TV” (media_player.shield_android_tv) which is weird since my Shield is already discovered and showing as a card (media_player.shield). And why would it show up as a Shield TV?
And I DON’T have the Plex server on the Shield TV turned on. And even if I did why would it decide to show up now?
The documentation is misleading as hell if that’s the case.
To be clear, you configure all these settings related to your Plex SERVER so in order to be able to control only your Plex CLIENTS? Is that accurate? Just…wierd
So basically to control your Plex server you need an always-on Plex Client?
Yes I agree the docs don’t fully explain what the component actually achieves - by setting up your Plex server you are actually exposing just your Plex clients into homeassistant in order to control playback, volume or create automation based on playback.
So every time you play Plex from a new client you’d get that client added e.g. media_player.plex_web
2017-11-11 22:59:27 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Current Activity, the state is unknown.
2017-11-11 22:59:36 WARNING (SyncWorker_10) [netdisco.ssdp] Error fetching description at http://192.168.0.14:36277/devdesc.xml
2017-11-11 22:59:36 WARNING (SyncWorker_10) [netdisco.ssdp] Found malformed XML at http://192.168.0.26:49153/description1.xml:
2017-11-11 22:59:36 WARNING (SyncWorker_10) [netdisco.ssdp] Found malformed XML at http://192.168.0.26:49153/description2.xml:
2017-11-11 22:59:36 WARNING (SyncWorker_10) [netdisco.ssdp] Found malformed XML at http://192.168.0.26:49153/description3.xml:
2017-11-11 22:59:36 WARNING (SyncWorker_10) [netdisco.ssdp] Found malformed XML at http://192.168.0.26:49153/description5.xml:
2017-11-11 22:59:37 WARNING (SyncWorker_10) [netdisco.ssdp] Found malformed XML at http://192.168.0.27:49153/description0.xml:
2017-11-11 22:59:37 WARNING (SyncWorker_10) [netdisco.ssdp] Found malformed XML at http://192.168.0.27:49153/description1.xml:
2017-11-11 22:59:51 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2017-11-11 22:59:51 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2017-11-11 22:59:51 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2017-11-11 22:59:51 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2017-11-11 22:59:51 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2017-11-11 22:59:52 WARNING (MainThread) [homeassistant.components.remote] Setup of platform harmony is taking over 10 seconds.