Roku Player issue

Hi all

New install of HA and I have configured the Plex media server component and it shows up my players and what they are playing from Plex.

Ubuntu 18.04 LTS
HA Ver - 0.67.1 in a virtualenv

If I try to pause the player nothing happens.

I have spotted this issue when HA starts up and think its probably related to this.
This error was showing up in the logs even before I configured plex.

Error while setting up platform roku
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 82, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/roku.py", line 56, in setup_platform
    new_roku = RokuDevice(host)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/roku.py", line 92, in __init__
    self.update()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/roku.py", line 103, in update
    if self.roku.current_app is not None:
  File "/srv/homeassistant/lib/python3.6/site-packages/roku/core.py", line 262, in current_app
    resp = self._get('/query/active-app')
  File "/srv/homeassistant/lib/python3.6/site-packages/roku/core.py", line 172, in _get
    return self._call('GET', path, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/roku/core.py", line 192, in _call
    raise RokuException(resp.content)
roku.core.RokuException: b''

Also this error from Plex

BadRequest (406) not_acceptable http://172.28.6.101:32433/player/playback/pause?commandID=1&type=video;

and

Error executing service <ServiceCall media_player.media_play_pause: entity_id=['media_player.loungempc']>
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1002, in _event_to_service_call
    await service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/__init__.py", line 403, in async_service_handler
    yield from getattr(player, method['method'])(**params)
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/plex.py", line 728, in media_pause
    self.device.pause(self._active_media_plexapi_type)
  File "/srv/homeassistant/lib/python3.6/site-packages/plexapi/client.py", line 299, in pause
    self.sendCommand('playback/pause', type=mtype)
  File "/srv/homeassistant/lib/python3.6/site-packages/plexapi/client.py", line 195, in sendCommand
    return self.query(key, headers=headers)
  File "/srv/homeassistant/lib/python3.6/site-packages/plexapi/client.py", line 165, in query
    raise BadRequest('(%s) %s; %s %s' % (response.status_code, codename, response.url, errtext))
plexapi.exceptions.BadRequest: (406) not_acceptable; http://172.28.6.101:32433/player/playback/pause?commandID=1&type=video

Anyone got any ideas on the Roku/plex issue I’m having?

Can anyone help with this?

Can no one seriously assist with this one?

The Roku error was an error straight out of the box on a brand new install before I even started tinkering with it. Maybe i’m missing a dependency but I dont believe I am…

Im not familiar enough with python to understand what that error means to go looking for the problem…

Help would be appreciated please :slight_smile:

1 Like

Did you ever find a solution to this problem? I am having the same Roku error.

Not as of yet still not finding the Roku entities.