jeatheak / Mitsubishi-WF-RAC-Integration

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

Cant add integration #30

Closed mariusnauj closed 1 year ago

mariusnauj commented 1 year ago

Hello,

I used this integration for 3 months, but today it stopped. When I tryied to add it again I got this error, can somebody help me?

Could not connect with the Airco: HTTPConnectionPool(host='192.168.8.120', port=51443): Max retries exceeded with url: /beaver/command/getDeviceInfo (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc4a220d240>: Failed to establish a new connection: [Errno 111] Connection refused'))

maglerod commented 1 year ago

Hi, this happends to me as well sometimes. What i usually do is:

  1. Remove the integration
  2. Turn off the Airco and wait for like 20 seconds or so
  3. Turn on Airco and wait for like 20 seconds or so
  4. Restart HA
  5. The device is found again and most possible to add again. If not possible it might be because there are to many devices added to Airco. Then you might need to remove the airco device from your m-air app. If it still says it's to many devices (which happened to me once, even thou i did all steps above), i resetted the WF-RAC interface on the Airco and added it to the network again and reAdded the integration. Then it worked.

Now this usually don't happends so often for me anymore but if the airco has been on constantly 24/7 for some days i will get error like: Bytes out of range. I've seen that someone else have reported already. The solution at the moment is very easy, turn off the Airco from remote control and wait a while and then turn it on again.

mariusnauj commented 1 year ago

Hello @maglerod It happened again. Second time for 2 days. Turn on and Turn off Airco it's enought that I turn it on and then off via Smart M-air application?

maglerod commented 1 year ago

Hello @maglerod It happened again. Second time for 2 days. Turn on and Turn off Airco it's enought that I turn it on and then off via Smart M-air application?

Do you get the error: Bytes out of range?, or is it : "Max retries exceeded..." you get?.

mariusnauj commented 1 year ago

I got this eror again with max retries:

Could not connect with the Airco: HTTPConnectionPool(host='192.168.8.120', port=51443): Max retries exceeded with url: /beaver/command/getDeviceInfo (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc4a220d240>: Failed to establish a new connection: [Errno 111] Connection refused'))

maglerod commented 1 year ago

Do you have the device in your m-air app also?. , have you tried removing it from the m-air app?

mariusnauj commented 1 year ago

Yes I have. And I noticed that when it happened I can't control my Airco with HA, after restarting HA Airco becamone unavailable. After deleting integration restarting HA, installling integration restarting HA again. And when I add Airco device I got this error. But when I trying again after 20-30min I can add it without errors.

maglerod commented 1 year ago

Strange, that happened for me one time then i resetted the WF RAC interface as well, and make sure in my router that next time i add the WF RAC to wifi, it will obtain a new IP Address.

But have to admit, it's anoying when it happends :(.

mariusnauj commented 1 year ago

I checked WF RAC on my AP it's all time online, IP not changed, I pinging it - no loss. But 2 week ago problems started. I used this integration for 3 months without problems.

jeatheak commented 1 year ago

Hey Guys,

Are you using the latest version of the software? because this issue was a known issue and we (tried) implementing a fix. Unfortunately I don't know why the airco is responding back with the max replies we thought it had to do with open connections that won't close.

At the moment I have very little time to look into it. And the difficult part for me is that it is working correctly for my Airco's at home. So debugging is hard. But if I have time I will look into it. Sorry for the delay.

mariusnauj commented 1 year ago

Hello @jeatheak Yes I am using the last version. And like I said 3 months was ok, but now more and more I get these errors :)

mariusnauj commented 1 year ago

It happened again Airco stoped responding. After deleted integration and ading new got error:

Could not connect with the Airco: HTTPConnectionPool(host='192.168.8.120', port=51443): Max retries exceeded with url: /beaver/command/getDeviceInfo (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f99dcf71a80>: Failed to establish a new connection: [Errno 111] Connection refused'))

In HA log I got this error:

This error originated from a custom integration.

Logger: custom_components.mitsubishi-wf-rac.config_flow Source: custom_components/mitsubishi-wf-rac/config_flow.py:72 Integration: Mitsubishi WF-RAC (documentation) First occurred: 10:07:09 (1 occurrences) Last logged: 10:07:09

create failed 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 0x7f99dcf71a80>: 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.8.120', port=51443): Max retries exceeded with url: /beaver/command/getDeviceInfo (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f99dcf71a80>: 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/config_flow.py", line 70, in _async_register_airco airco_id = await repository.get_airco_id() File "/config/custom_components/mitsubishi-wf-rac/wfrac/repository.py", line 91, in get_airco_id return (await self.get_info())["airconId"] File "/config/custom_components/mitsubishi-wf-rac/wfrac/repository.py", line 87, in get_info return (await self._post("getDeviceInfo"))["contents"] 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.8.120', port=51443): Max retries exceeded with url: /beaver/command/getDeviceInfo (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f99dcf71a80>: Failed to establish a new connection: [Errno 111] Connection refused'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/mitsubishi-wf-rac/config_flow.py", line 122, in _async_create_common info = await self._async_register_airco(self.hass, user_input) File "/config/custom_components/mitsubishi-wf-rac/config_flow.py", line 72, in _async_register_airco raise CannotConnect(reason=str(query_failed)) from query_failed custom_components.mitsubishi-wf-rac.config_flow.CannotConnect

mariusnauj commented 1 year ago

I can't use this integratin anymore, every day it crashing.

maglerod commented 1 year ago

Did you try resetting the Wifi interface of the airco and added it to your network again?

if you reset the device you need to add it again in the m-air app to be able to install it again. Guess you know already.

/a

maglerod commented 1 year ago

One other thing I found out is if you do to many calls it will respond with timeout or connection refused. It’s like it gets blocked for a while .

Have you checked so you don’t have any script / scene that are meshing the airco all time? In some kind of loop ?

/a

mariusnauj commented 1 year ago

No I dont have any script/scene related with Airco. Only automation, it checks if my room termostat temp is below it turn on Airco and when it temperature is above it turn off Airco. But 4 days ago I reseted Airco module and added it again in HA and in APP. And toll now it works.

maglerod commented 1 year ago

Great That procedure worked for me also when it was stucked in that problem.

/a