I’ll check out this code to see if there are any differences with what I have.
Meanwhile, can you take a look at your log files and see if you see a log output this looks like this?:
17-02-01 20:08:46 INFO (MainThread) [plexapi] POST http://<server-ip>:32400/playQueues?includeChapters=1&includeRelated=1&playlistID=136659&repeat=1&shuffle=1&type=audio&X-Plex-Token=...
17-02-02 00:00:00 INFO (MainThread) [plexapi] GET http://<server-ip>:32400/playlists?X-Plex-Token=<token>
17-02-02 00:00:00 INFO (MainThread) [plexapi] POST http://<server-ip>:32400/playQueues?includeChapters=1&includeRelated=1&playlistID=360771&repeat=0&shuffle=0&type=audio&X-Plex-Token=<token>
17-02-02 00:00:00 INFO (MainThread) [plexapi] GET http://<client-ip>:32500/player/playback/playMedia?address=<server-ip>&commandID=1&containerKey=/playQueues/10868%3Fwindow%3D100%26own%3D1&key=/playlists/360771&machineIdentifier=<machineIdentifier>&port=32400&shuffle=1
17-02-02 00:00:00 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 1052, in _event_to_service_call
yield from service_handler.func(service_call)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/__init__.py", line 366, in async_service_handler
yield from getattr(player, method['method'])(**params)
File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro
res = func(*args, **kw)
File "/home/pi/.homeassistant/custom_components/media_player/z_plex.py", line 390, in async_play_media
self.device.playMedia(vid,shuffle=1)
File "/home/pi/.homeassistant/deps/plexapi/client.py", line 154, in playMedia
}, **params))
File "/home/pi/.homeassistant/deps/plexapi/client.py", line 85, in sendCommand
return self.query(path, headers=headers)
File "/home/pi/.homeassistant/deps/plexapi/client.py", line 71, in query
return ElementTree.fromstring(data) if data else None
File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 1325, in XML
parser.feed(text)
File "<string>", line None
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0