Problem with iTunes and Apple TV

Hello

I’m new to Linux but have managed to the going with home assistant on raspberry pi by following a few of the really good guides out there. Although I had to reinstall raspbian on my raspberry pi because of some really bad mistakes. But now when I’m trying to set up all my components again, the Apple TV and iTunes won’t show up.

In the log it says something I don’t get, and even if I did, I’m not sure I would be able to solve it. Could you guys help me?

2018-01-17 19:54:12 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform itunes
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x6eebe850>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.230', port=8181): Max retries exceeded with url: /now_playing (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x6eebe850>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/itunes.py", line 165, in setup_platform
add_devices
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/itunes.py", line 195, in __init__
self.update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/itunes.py", line 233, in update
now_playing = self.client.now_playing()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/itunes.py", line 92, in now_playing
return self._request('GET', '/now_playing')
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/itunes.py", line 72, in _request
response = requests.get(url, timeout=DEFAULT_TIMEOUT)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.230', port=8181): Max retries exceeded with url: /now_playing (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x6eebe850>: Failed to establish a new connection: [Errno 111] Connection refused',))
2018-01-17 19:54:39 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting