I’m trying to setup a new Plex media_player component. My server is hosted remotely. I’m using a subdomain (only) over https. I’m trying to play a video on my Nvidia Shield.
I put the following in my configuration file:
# Plex
media_player:
- platform: plex
And the plex.conf
looks like this:
{
"plex.domain.com:443": {
"ssl": true,
"token": "RaNdOmToKeN",
"verify": true
}
}
In the logs I can see:
2018-06-22 13:33:07 INFO (SyncWorker_4) [homeassistant.components.media_player.plex] Discovery configuration done (no token needed)
2018-06-22 13:33:07 INFO (SyncWorker_4) [homeassistant.components.media_player.plex] Connected to: https://plex.domain.com:443
Yet if I go to services in the web interface and select the media_player.play_media
service, and the json data below it doesn’t do anything.
{
"entity_id": "media_player.living_room_shield",
"media_content_id": {
"library_name" : "Films",
"video_name" : "Gandhi",
"shuffle": "0"
},
"media_content_type": "VIDEO"
}
If I fire this call I see the Google Cast icon with a dark background. The logs give me this if I fire the above call:
2018-06-22T11:39:54.656048308Z 2018-06-22 13:39:54 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 139650835547304: Received {'type': 'call_service', 'domain': 'media_player', 'service': 'play_media', 'service_data': {'entity_id': 'media_player.living_room_shield', 'media_content_id': {'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}, 'media_content_type': 'VIDEO'}, 'id': 12}
2018-06-22T11:39:54.661458959Z 2018-06-22 13:39:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service=play_media, service_data=entity_id=media_player.living_room_shield, media_content_id=library_name=Films, video_name=Gandhi, shuffle=0, media_content_type=VIDEO, service_call_id=139651847093832-11>
2018-06-22T11:39:54.661558605Z 2018-06-22 13:39:54 INFO (SyncWorker_3) [pychromecast.controllers] Not launching app CC1AD845 - already running
2018-06-22T11:39:54.661580113Z 2018-06-22 13:39:54 DEBUG (SyncWorker_3) [pychromecast.socket_client] Sending: Message urn:x-cast:com.google.cast.media from sender-0 to aa7dd01d-4bba-40a9-a6e8-ecf6b2b28ad2: {'media': {'contentId': "{'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}", 'streamType': 'BUFFERED', 'contentType': 'VIDEO', 'metadata': {}}, 'type': 'LOAD', 'currentTime': 0, 'autoplay': True, 'customData': {}, 'requestId': 9, 'sessionId': 'aa7dd01d-4bba-40a9-a6e8-ecf6b2b28ad2'}
2018-06-22T11:39:54.661663171Z 2018-06-22 13:39:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=139651847093832-11>
2018-06-22T11:39:54.662238316Z 2018-06-22 13:39:54 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 139650835547304: Sending {'id': 12, 'type': 'result', 'success': True, 'result': None}
2018-06-22T11:39:54.668476070Z 2018-06-22 13:39:54 DEBUG (Thread-2) [pychromecast.socket_client] Received: Message urn:x-cast:com.google.cast.media from aa7dd01d-4bba-40a9-a6e8-ecf6b2b28ad2 to *: {'type': 'MEDIA_STATUS', 'status': [{'mediaSessionId': 7, 'playbackRate': 1, 'playerState': 'IDLE', 'currentTime': 0, 'supportedMediaCommands': 15, 'volume': {'level': 1, 'muted': False}, 'media': {'contentId': "{'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}", 'streamType': 'BUFFERED', 'contentType': 'VIDEO', 'metadata': {}}, 'currentItemId': 7, 'extendedStatus': {'playerState': 'LOADING', 'media': {'contentId': "{'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}", 'streamType': 'BUFFERED', 'contentType': 'VIDEO', 'metadata': {}}}, 'repeatMode': 'REPEAT_OFF'}], 'requestId': 0}
2018-06-22T11:39:54.668524109Z 2018-06-22 13:39:54 DEBUG (Thread-2) [pychromecast.controllers] Media:Received status {'type': 'MEDIA_STATUS', 'status': [{'mediaSessionId': 7, 'playbackRate': 1, 'playerState': 'IDLE', 'currentTime': 0, 'supportedMediaCommands': 15, 'volume': {'level': 1, 'muted': False}, 'media': {'contentId': "{'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}", 'streamType': 'BUFFERED', 'contentType': 'VIDEO', 'metadata': {}}, 'currentItemId': 7, 'extendedStatus': {'playerState': 'LOADING', 'media': {'contentId': "{'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}", 'streamType': 'BUFFERED', 'contentType': 'VIDEO', 'metadata': {}}}, 'repeatMode': 'REPEAT_OFF'}], 'requestId': 0}
2018-06-22T11:39:54.668535525Z 2018-06-22 13:39:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.living_room_shield, old_state=<state media_player.living_room_shield=idle; volume_level=1.0, is_volume_muted=False, media_content_id={'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}, media_position=0, media_position_updated_at=2018-06-22T13:39:17.290963+02:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=Shield, supported_features=21437 @ 2018-06-22T13:39:08.018262+02:00>, new_state=<state media_player.living_room_shield=idle; volume_level=1.0, is_volume_muted=False, media_content_id={'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}, media_position=0, media_position_updated_at=2018-06-22T13:39:54.666125+02:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=Shield, supported_features=21437 @ 2018-06-22T13:39:08.018262+02:00>>
2018-06-22T11:39:54.668545452Z 2018-06-22 13:39:54 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 139650835547304: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'media_player.living_room_shield', 'old_state': <state media_player.living_room_shield=idle; volume_level=1.0, is_volume_muted=False, media_content_id={'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}, media_position=0, media_position_updated_at=2018-06-22T13:39:17.290963+02:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=Shield, supported_features=21437 @ 2018-06-22T13:39:08.018262+02:00>, 'new_state': <state media_player.living_room_shield=idle; volume_level=1.0, is_volume_muted=False, media_content_id={'library_name': 'Films', 'video_name': 'Gandhi', 'shuffle': '0'}, media_position=0, media_position_updated_at=2018-06-22T13:39:54.666125+02:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=Shield, supported_features=21437 @ 2018-06-22T13:39:08.018262+02:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 6, 22, 11, 39, 54, 666411, tzinfo=<UTC>)}}
2018-06-22T11:39:54.696304833Z 2018-06-22 13:39:54 DEBUG (Thread-2) [pychromecast.socket_client] Received: Message urn:x-cast:com.google.cast.media from aa7dd01d-4bba-40a9-a6e8-ecf6b2b28ad2 to sender-0: {'requestId': 9, 'type': 'LOAD_FAILED'}
2018-06-22T11:39:54.696517726Z 2018-06-22 13:39:54 DEBUG (Thread-2) [pychromecast.socket_client] Message unhandled: Message urn:x-cast:com.google.cast.media from aa7dd01d-4bba-40a9-a6e8-ecf6b2b28ad2 to sender-0: {'requestId': 9, 'type': 'LOAD_FAILED'}
So what’s going on? Where does this go wrong?