Hi,
I’ve tried creating a new application and subscribing to reseplanerare v2 before setting it up in hass.io 0.56.1 but it seems like it still struggles.
I’m using the key and secret created at Västtrafik along with the default configuration example:
- platform: vasttrafik
key: xxxxx
secret: xxxx
departures:
- from: Musikvägen
The api key and secret don’t contain any underscores (_).
When restarting home-assistant it just throws a couple of errors…
2017-10-24 12:13:19 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform vasttrafik
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
conn.connect()
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connection.py", line 337, in connect
cert = self.sock.getpeercert()
File "/usr/lib/python3.6/ssl.py", line 891, in getpeercert
self._check_connected()
File "/usr/lib/python3.6/ssl.py", line 855, in _check_connected
self.getpeername()
OSError: [Errno 107] Socket not connected
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 438, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
conn.connect()
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connection.py", line 337, in connect
cert = self.sock.getpeercert()
File "/usr/lib/python3.6/ssl.py", line 891, in getpeercert
self._check_connected()
File "/usr/lib/python3.6/ssl.py", line 855, in _check_connected
self.getpeername()
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(107, 'Socket not connected'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 170, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
return fut.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/vasttrafik.py", line 57, in setup_platform
config.get(CONF_KEY), config.get(CONF_SECRET))
File "/usr/lib/python3.6/site-packages/vasttrafik/journy_planner.py", line 38, in __init__
self.update_token()
File "/usr/lib/python3.6/site-packages/vasttrafik/journy_planner.py", line 49, in update_token
response = requests.post(TOKEN_URL, data=data, headers=headers)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **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 518, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 639, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 488, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError(107, 'Socket not connected'))
Is there something that I might have forgotten?
Any help would be appreciated!