cathiele / homeassistant-goecharger

Home Assistant custom_component for controlling the go-eCharger EV-Charger
MIT License
89 stars 29 forks source link

Update for sensor.goecharger_xxxxxx_fails #29

Closed klacol closed 3 years ago

klacol commented 3 years ago

Hi, great project here; very helpful. I try to realize a control to set the max current based on the power, that my solar panels deliver. I have written a python script, that calculates the new max current, that should be set.

To set the max current from the python script I call the service: goecharger.set_max_current

with this payload (the value is an example): max_current: 11

When I call the service; i see this message in the Core-Log:

2021-02-28 19:08:52 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.goecharger_003339_u_l3 fails Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse response.begin() File "/usr/local/lib/python3.8/http/client.py", line 307, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise raise value File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.0.22', port=80): Read timed out. (read timeout=5) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update raise exc File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/goecharger/sensor.py", line 113, in update fetchedStatus = self._goeCharger.requestStatus() File "/usr/local/lib/python3.8/site-packages/goecharger/goecharger.py", line 280, in requestStatus status = self.queryStatusApi() File "/usr/local/lib/python3.8/site-packages/goecharger/goecharger.py", line 184, in queryStatusApi statusRequest = requests.get("http://%s/status" % self.host, timeout=5) # TODO: Configurable Timeout File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.0.22', port=80): Read timed out. (read timeout=5)

klacol commented 3 years ago

Any help appreciated.

cathiele commented 3 years ago

Did you find a solution for this or is it still an issue?

requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.0.22', port=80): Read timed out. (read timeout=5)

is 192.168.0.22 the correct ip?

cathiele commented 3 years ago

please reopen this issue if it is still a problem for you