The log shows HA is unable to connect to Kodi: connection refused. But what’s next in troubleshooting? In Kodi settings, webservices are enabled, also ‘allow remote control from other devices’. Password is set to kodi/kodi.
This is the log:
2018-09-18 19:23:04 INFO (MainThread) [homeassistant.components.media_player.kodi] Unable to fetch kodi data
2018-09-18 19:23:04 DEBUG (MainThread) [homeassistant.components.media_player.kodi] Unable to fetch kodi data
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/aiohttp/connector.py”, line 822, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
File “uvloop/loop.pyx”, line 1881, in create_connection
File “uvloop/loop.pyx”, line 1860, in uvloop.loop.Loop.create_connection
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/jsonrpc_async/jsonrpc.py”, line 29, in send_message
response = yield from self._request(data=message.serialize())
File “/usr/local/lib/python3.6/site-packages/aiohttp/client.py”, line 366, in _request
timeout=timeout
File “/usr/local/lib/python3.6/site-packages/aiohttp/connector.py”, line 445, in connect
proto = await self._create_connection(req, traces, timeout)
File “/usr/local/lib/python3.6/site-packages/aiohttp/connector.py”, line 757, in _create_connection
req, traces, timeout)
File “/usr/local/lib/python3.6/site-packages/aiohttp/connector.py”, line 879, in _create_direct_connection
raise last_exc
File “/usr/local/lib/python3.6/site-packages/aiohttp/connector.py”, line 862, in _create_direct_connection
req=req, client_error=client_error)
File “/usr/local/lib/python3.6/site-packages/aiohttp/connector.py”, line 829, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host xxx.xxx.1.12:8080 ssl:None [Connection refused]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/kodi.py”, line 395, in _get_players
return (yield from self.server.Player.GetActivePlayers())
File “/usr/local/lib/python3.6/site-packages/jsonrpc_async/jsonrpc.py”, line 31, in send_message
raise TransportError(‘Transport Error’, message, exc)
jsonrpc_base.jsonrpc.TransportError: (“Error calling method ‘Player.GetActivePlayers’: Transport Error”, ClientConnectorError(111, ‘Connection refused’))
This is configuration.yaml:
media_player:
- platform: kodi
host: Xxx. Xxx.1.12
enable_websocket: true
username: kodi
password: kodi
turn_on_action:
- service: wake_on_lan.send_magic_packet
data:
mac: xxx
broadcast_address: Xxx. Xxx.1.255
turn_off_action:
- service: media_player.kodi_call_method
data:
entity_id: media_player.kodi
method: System.Shutdown