Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smappee authentication error Home Assistant #33

Closed
Trouble-51 opened this issue Feb 29, 2020 · 2 comments
Closed

smappee authentication error Home Assistant #33

Trouble-51 opened this issue Feb 29, 2020 · 2 comments

Comments

@Trouble-51
Copy link

System:

arch x86_64
dev false
docker true
hassio true
os_name Linux
python_version 3.7.6
timezone Europe/Lisbon
version 0.106.2
virtualenv false

config:
smappee:
host: 198.168.1.62
client_id: xxxxxxx
client_secret: xxxxx
username: xxxxx
password: xxxxxx

Any help to get rid of this problem would be appreciated!

Logger: homeassistant.components.smappee
Integration: smappee (documentation, issues)
First occured: 11:15:27 AM (1 occurences)
Last logged: 11:15:27 AM

Local Smappee device authentication failed (HTTPConnectionPool(host='198.168.1.62', port=80): Max retries exceeded with url: /gateway/apipublic/logon (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f82da0e2190>, 'Connection to 198.168.1.62 timed out. (connect timeout=5)')))
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 184, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 164, in _new_conn
% (self.host, self.timeout),
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7f82da0e2190>, 'Connection to 198.168.1.62 timed out. (connect timeout=5)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='198.168.1.62', port=80): Max retries exceeded with url: /gateway/apipublic/logon (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f82da0e2190>, 'Connection to 198.168.1.62 timed out. (connect timeout=5)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/smappee/init.py", line 95, in init
self._localsmappy.logon(host_password)
File "/usr/local/lib/python3.7/site-packages/smappy/smappy.py", line 552, in logon
r = self._basic_post(url='logon', data=password)
File "/usr/local/lib/python3.7/site-packages/smappy/smappy.py", line 530, in _basic_post
r = self.session.post(_url, data=data, headers=self.headers, timeout=5)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 581, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 504, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='198.168.1.62', port=80): Max retries exceeded with url: /g

@JrtPec
Copy link
Contributor

JrtPec commented Mar 2, 2020

This is a Timeout Error. Your device running Home Assistant sends a login request to the IP-address where it thinks your Smappee is, and doesn't get a response within 5 seconds.

I can only speculate about the reason:

  • Your Smappee used to be at 198.168.1.62, but due to a network reset it now has a different IP address.
  • Your Smappee is offline.
  • Your Smappee has lost network connection.
  • Your device making the request has lost network connection.
  • Your Smappee has encountered an error and does not respond.
  • ...

Anyway, I do not believe the underlying code is at fault. Hopefully you can figure it out!

@JrtPec JrtPec closed this as completed Mar 2, 2020
@JrtPec
Copy link
Contributor

JrtPec commented Mar 2, 2020

@Trouble-51 I apologize, this may also be a duplicate of #18. Anyway, I have no clue on how to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants