I have been trying to configure a weather display using data from the UK Met Office and am having no luck. I have registered an api with them and installed the text in my sensors.yaml file exactly as it appears in the home-assistant components page but I am errors and nothing displayed. This is a new install of Hassio with nothing else configured, has anyone got this to work?
Error while setting up platform metoffice
4:01 PM components/sensor/metoffice.py (ERROR)
Press the button to load the full Home Assistant log.
Log Details (ERROR)
Wed Mar 28 2018 16:01:13 GMT+0100 (BST)
Error while setting up platform metoffice
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/urllib3/connection.py”, line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File “/usr/lib/python3.6/site-packages/urllib3/util/connection.py”, line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File “/usr/lib/python3.6/socket.py”, line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 601, in urlopen
chunked=chunked)
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File “/usr/lib/python3.6/http/client.py”, line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1026, in _send_output
self.send(msg)
File “/usr/lib/python3.6/http/client.py”, line 964, in send
self.connect()
File “/usr/lib/python3.6/site-packages/urllib3/connection.py”, line 166, in connect
conn = self._new_conn()
File “/usr/lib/python3.6/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 0x73b907d0>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/requests/adapters.py”, line 440, in send
timeout=timeout
File “/usr/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/lib/python3.6/site-packages/urllib3/util/retry.py”, line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘datapoint.metoffice.gov.uk’, port=80): Max retries exceeded with url: /public/data/val/wxfcs/all/json/sitelist/?key=e4458178-995b-4143-bb4e-dfd9042a362e (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x73b907d0>: Failed to establish a new connection: [Errno -3] Try again’,))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/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/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/metoffice.py”, line 106, in setup_platform
latitude=latitude, longitude=longitude)
File “/usr/lib/python3.6/site-packages/datapoint/Manager.py”, line 187, in get_nearest_site
sites = self.get_all_sites()
File “/usr/lib/python3.6/site-packages/datapoint/Manager.py”, line 147, in get_all_sites
data = self.__call_api(“sitelist/”)
File “/usr/lib/python3.6/site-packages/datapoint/Manager.py”, line 102, in __call_api
req = requests.get(url, params=payload)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 72, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/api.py”, line 58, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 508, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python3.6/site-packages/requests/sessions.py”, line 618, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python3.6/site-packages/requests/adapters.py”, line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘datapoint.metoffice.gov.uk’, port=80): Max retries exceeded with url: /public/data/val/wxfcs/all/json/sitelist/?key=e4458178-995b-4143-bb4e-dfd9042a362e (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x73b907d0>: Failed to establish a new connection: [Errno -3] Try again’,))
Connection lost. Reconnecting…