jeatheak / Mitsubishi-WF-RAC-Integration

WF-RAC homeassistant integration
MIT License
101 stars 19 forks source link

Could not send airco data / Error: something went wrong updating the airco values #44

Open GittyBaer opened 1 year ago

GittyBaer commented 1 year ago

I hope this time I'm right, and this is an issue with the integration :-)

I get three types of messages from the integration ( Version 0.3.0) And it seems that some times the Aircons do not respond, as far as I can see, it is related to this messages...

I tried to add the devices to scenes, this works. But sometimes one of my devices fails to change the state. May be it is a timing issue?

As I can see in the original Mitsubishi App I have also to refresh the app to see all devices available there, it looks like the WiFi Devices are not very responsive. And they need sometimes a lot ofretries...

This error originated from a custom integration.

Logger: custom_components.mitsubishi_wf_rac.wfrac.device
Source: custom_components/mitsubishi_wf_rac/wfrac/repository.py:81
Integration: Mitsubishi WF-RAC (documentation)
First occurred: February 12, 2023 at 22:05:06 (15 occurrences)
Last logged: 14:30:06

Could not send airco data
Traceback (most recent call last):
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/device.py", line 99, in set_airco
    response = await self._api.send_airco_command(self._airco_id, command)
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/repository.py", line 116, in send_airco_command
    result = await self._post("setAirconStat", contents)
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/repository.py", line 81, in _post
    response.raise_for_status()
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 501 Server Error: Method Not Implemented for url: http://192.168.100.59:51443/beaver/command/setAirconStat
This error originated from a custom integration.

Logger: custom_components.mitsubishi_wf_rac.wfrac.device
Source: custom_components/mitsubishi_wf_rac/wfrac/repository.py:66
Integration: Mitsubishi WF-RAC (documentation)
First occurred: February 11, 2023 at 12:13:46 (145 occurrences)
Last logged: 14:26:53

Error: something went wrong updating the airco [Klima-WoZi] values
Error: something went wrong updating the airco [Klima-Kueche] values
Error: something went wrong updating the airco [Klima-DG] values
Error: something went wrong updating the airco [Klima-Bad] values
Error: something went wrong updating the airco [Klima-Kind1] values
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f3faf3c3820>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.100.61', port=51443): Max retries exceeded with url: /beaver/command/getAirconStat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3faf3c3820>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/device.py", line 53, in update
    response = await self._api.get_aircon_stats()
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/repository.py", line 110, in get_aircon_stats
    result = await self._post("getAirconStat")
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/repository.py", line 66, in _post
    response = await self._hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.100.61', port=51443): Max retries exceeded with url: /beaver/command/getAirconStat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3faf3c3820>: Failed to establish a new connection: [Errno 111] Connection refused'))

Sometimes I get only:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:548
First occurred: February 11, 2023 at 11:48:56 (91 occurrences)
Last logged: 10:12:00

Update of climate.klima_schlafzimmer is taking over 10 seconds
Update of climate.klima_kind1 is taking over 10 seconds
Update of climate.klima_kueche is taking over 10 seconds
Update of climate.klima_bad is taking over 10 seconds

Any suggestions? Can we do something about it? Or is there any workaround?

savage008 commented 1 year ago

These look a lot like the ones i get

`Logboek Details (FOUT)

Deze fout is ontstaan door een aangepaste integratie. Logger: custom_components.mitsubishi-wf-rac.wfrac.device Source: custom_components/mitsubishi-wf-rac/wfrac/repository.py:66 Integration: Mitsubishi WF-RAC (documentation) First occurred: 14 februari 2023 om 16:02:52 (145 occurrences) Last logged: 08:04:01

Error: something went wrong updating the airco [Airco] values Could not send airco data Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/local/lib/python3.10/http/client.py", line 975, in send self.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f33dafbb520>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.179.159', port=51443): Max retries exceeded with url: /beaver/command/getAirconStat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f33dafbb520>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/mitsubishi-wf-rac/wfrac/device.py", line 53, in update response = await self._api.get_aircon_stats() File "/config/custom_components/mitsubishi-wf-rac/wfrac/repository.py", line 110, in get_aircon_stats result = await self._post("getAirconStat") File "/config/custom_components/mitsubishi-wf-rac/wfrac/repository.py", line 66, in _post response = await self._hass.async_add_executor_job( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.179.159', port=51443): Max retries exceeded with url: /beaver/command/getAirconStat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f33dafbb520>: Failed to establish a new connection: [Errno 111] Connection refused'))`

richies79 commented 1 year ago

Having the same error updating the AC. Seems that recieving data from the AC is working but not sending to it. If I cange the temperature manually on the remote, the new temperature is shown in Home assistant

2023-03-18 01:22:23.458 ERROR (MainThread) [custom_components.mitsubishi_wf_rac.wfrac.device] Error: something went wrong updating the airco [Hall AC] values
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f96ed12c4c0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.30', port=51443): Max retries exceeded with url: /beaver/command/getAirconStat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f96ed12c4c0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/device.py", line 53, in update
    response = await self._api.get_aircon_stats()
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/repository.py", line 110, in get_aircon_stats
    result = await self._post("getAirconStat")
  File "/config/custom_components/mitsubishi_wf_rac/wfrac/repository.py", line 66, in _post
    response = await self._hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.30', port=51443): Max retries exceeded with url: /beaver/command/getAirconStat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f96ed12c4c0>: Failed to establish a new connection: [Errno 111] Connection refused'))
standekker commented 10 months ago

Can confirm that I am also seeing the same issue. Sometimes the unit will not turn on through activating a scene, and that the same log messages appear in my log file.

terneusen commented 3 days ago

Is there allready a sollution for this bug….?

I’m still getting this error using version 0.4.0.