sander1988 / Indego

Home Assistant Custom Component for Bosch Indego Lawn Mower
Apache License 2.0
95 stars 29 forks source link

Error during setup of component indego #42

Closed kuradi closed 4 years ago

kuradi commented 5 years ago

hassio 0.98.2 and indego 0.7.4 (installed via hacs) giving me this:

`2019-09-03 19:41:54 ERROR (MainThread) [homeassistant.setup] Error during setup of component indego Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request six.raise_from(e, None) File "", line 2, in raise_from File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 383, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.7/http/client.py", line 1336, in getresponse response.begin() File "/usr/local/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.7/http/client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 317, in recv_into raise timeout('The read operation timed out') socket.timeout: The read operation timed out

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 641, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 368, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen chunked=chunked) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 389, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.indego.iot.bosch-si.com', port=443): Read timed out. (read timeout=30)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 172, in _async_setup_component component.setup, hass, processed_config # type: ignore File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/indego/init.py", line 54, in setup Mower() File "/config/custom_components/indego/init.py", line 118, in init IndegoAPI_Instance.getOperatingData() File "/usr/local/lib/python3.7/site-packages/pyIndego/init.py", line 396, in getOperatingData tmp_json = self.get(complete_url) File "/usr/local/lib/python3.7/site-packages/pyIndego/init.py", line 957, in get response = requests.get(url, headers=headers, timeout=30) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, 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 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.indego.iot.bosch-si.com', port=443): Read timed out. (read timeout=30) `

jm-73 commented 5 years ago

OK, I have had some trouble with the Bosch servers not responding. Maybe it is the same reason for your component to fail? For me, it started 04:00 CET.

This has been perfect timing for me as I am trying to get the component more resilient against non-responing mower and API. So I hope to be able to publish an update that handles offline mower and API soon!

kuradi commented 5 years ago

i downgraded to 0.7.3 and all working good.

jm-73 commented 5 years ago

I noticed that my indego sensor did have an outage of about 10 hours, from 02:00 to 12:00 CET. I know there are issues with the Indego Sensor and the ability to handle a mower that are offline. Working on a fix.

jm-73 commented 5 years ago

Will be fixed in 0.8.0