sampsyo / wideq

reverse-engineered client for the LG SmartThinQ API
https://pypi.org/project/wideq/
MIT License
333 stars 158 forks source link

Integration is working for few time #115

Open skazo4nik opened 4 years ago

skazo4nik commented 4 years ago

Hi! I use integration for LG AC. At last time I began to receive many errors about integration and integration works only for a few time after restart home assistant.

Here's info from logs:

Level: WARNING Logger: homeassistant.components.climate Source: components/climate/init.py:553 Integration: Climate (documentation, issues) First occurred: 26 july 2020 г., 22:30:10 (1 occurrences) Last logged: 26 july 2020 г., 22:30:10

ClimateDevice is deprecated, modify LGDevice to extend ClimateEntity

Level: ERROR Logger: homeassistant.helpers.entity Source: custom_components/smartthinq/climate.py:275 First occurred: 26 july 2020 г., 22:43:57 (2 occurrences) Last logged: 26 july 2020 г., 22:45:02

Update for climate.gostinnaia fails Update for climate.spalnia fails Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, 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 421, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/usr/local/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.8/http/client.py", line 264, 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) File "/usr/local/lib/python3.8/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/local/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) ConnectionResetError: [Errno 104] Connection reset by peer

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 726, in urlopen retries = retries.increment( File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, 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 421, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.8/http/client.py", line 1332, in getresponse response.begin() File "/usr/local/lib/python3.8/http/client.py", line 303, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.8/http/client.py", line 264, 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) File "/usr/local/lib/python3.8/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/local/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 465, in async_device_update await self.hass.async_add_executor_job( 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/smartthinq/climate.py", line 275, in update state = self._ac.poll() File "/usr/local/lib/python3.8/site-packages/wideq/ac.py", line 334, in poll res = self.mon.poll_json() File "/usr/local/lib/python3.8/site-packages/wideq/client.py", line 61, in poll_json data = self.poll() File "/usr/local/lib/python3.8/site-packages/wideq/client.py", line 47, in poll self.start() File "/usr/local/lib/python3.8/site-packages/wideq/client.py", line 32, in start self.work_id = self.session.monitor_start(self.device_id) File "/usr/local/lib/python3.8/site-packages/wideq/core.py", line 411, in monitor_start res = self.post('rti/rtiMon', { File "/usr/local/lib/python3.8/site-packages/wideq/core.py", line 394, in post return lgedm_post(url, data, self.auth.access_token, self.session_id) File "/usr/local/lib/python3.8/site-packages/wideq/core.py", line 202, in lgedm_post res = session.post(url, json={DATA_ROOT: data}, headers=headers) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 578, in post return self.request('POST', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

Level: WARNING Logger: homeassistant.components.climate Source: helpers/entity_platform.py:545 Integration: Climate (documentation, issues) First occurred: 26 july 2020 г., 22:39:20 (2399 occurrences) Last logged: 14:39:24

Updating smartthinq climate took longer than the scheduled update interval 0:01:00

As I understand, there is connection error once, and then integration stop to work.

tolrahC commented 4 years ago

Any update on this? I have the exact same problem