KODI media player error

I just upgraded from 0.35.3 to 0.38.3. Almost all is working except my KODI player no longer shows up. I saw the updated documentation, updated my config so it is without http:// but it still doesn’t work.

My config:

media_player:
  - platform: samsungtv
    host: 192.168.0.21
    name: Samsung Smart TV
  - platform: kodi
    host: 192.168.0.11
    port: 8080
    name: KODI

I am getting the following error in my log:

17-02-15 11:35:46 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 "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 336, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 181, in async_add_entity
    yield from entity.async_update()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/media_player/kodi.py", line 148, in async_update
    self._players = yield from self._get_players()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/media_player/kodi.py", line 124, in _get_players
    return (yield from self._server.Player.GetActivePlayers())
  File "/home/hass/.homeassistant/deps/jsonrpc_async/jsonrpc.py", line 24, in send_request
    response = yield from self.request(data=request_body)
  File "/home/hass/.homeassistant/deps/aiohttp/client.py", line 577, in __iter__
    resp = yield from self._coro
  File "/home/hass/.homeassistant/deps/aiohttp/client.py", line 213, in _request
    proxy=proxy, proxy_auth=proxy_auth, timer=timer)
  File "/home/hass/.homeassistant/deps/aiohttp/client_reqrep.py", line 73, in __init__
    assert isinstance(url, URL), url
AssertionError: http://192.168.0.11:8080/jsonrpc

It even gets so far, that when I leave KODI in my configuration I can no longer open frontend of HA. When trying to log in it is connecting for quite some time and then writes “Unnable to connect”.

Wow, I missed that but mine is gone too. I’m already at work so cannot troubleshoot until later.

Mine is doing the same. best to open a issue on github.

Issue has been opened:

I just re-ran the upgrade command for HA. It installed a new version of yarl and everything now works fine. Might want to give that a shot.

1 Like

I re-ran HA update command and it has indeed updated yarl from 0.9.5 to 0.9.6 but my problem still persists. Kodi doesn’t load:

17-02-15 16:19:05 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 "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 336, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 181, in async_add_entity
    yield from entity.async_update()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/media_player/kodi.py", line 148, in async_update
    self._players = yield from self._get_players()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/media_player/kodi.py", line 124, in _get_players
    return (yield from self._server.Player.GetActivePlayers())
  File "/home/hass/.homeassistant/deps/jsonrpc_async/jsonrpc.py", line 24, in send_request
    response = yield from self.request(data=request_body)
  File "/home/hass/.homeassistant/deps/aiohttp/client.py", line 577, in __iter__
    resp = yield from self._coro
  File "/home/hass/.homeassistant/deps/aiohttp/client.py", line 213, in _request
    proxy=proxy, proxy_auth=proxy_auth, timer=timer)
  File "/home/hass/.homeassistant/deps/aiohttp/client_reqrep.py", line 73, in __init__
    assert isinstance(url, URL), url
AssertionError: http://192.168.0.11:8080/jsonrpc

Ok, got it working now. I had to delete two folders in /home/hass/.homeassistant/deps/:

yarl
yarl-0.9.5.dist-info

I then reran HA upgrade, it installed yarl 0.9.6. I also did pip install yarl --upgrade, rebooted and it’s working now.