Hi,
Thanks for your great wok on this. However, I seem to be unable to get it to work. I installed the latest version from HACS. Then went to add the integration and fill in the required fields:
When I then click submit I get this:
I checked on the command line and my HA is able to reach the airco on port 51443:
In the HA log I found this:
Traceback (most recent call last):
File "/config/custom_components/mitsubishi-wf-rac/config_flow.py", line 194, in async_step_user
info = await self._async_validate_input(self.hass, user_input)
File "/config/custom_components/mitsubishi-wf-rac/config_flow.py", line 71, in _async_validate_input
airco_id = await hass.async_add_executor_job(repository.get_details)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/mitsubishi-wf-rac/wfrac/repository.py", line 31, in get_details
return post(url, json=myobj).json()["contents"]["airconId"]
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 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2022-08-08 19:31:31.028 ERROR (MainThread) [custom_components.mitsubishi-wf-rac.config_flow] Unexpected exception
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 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 279, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
Now I believe that “Connection reset by peer” means my airco may be doing something nasty but I can’t seem to find what the issue is. It’s working nicely from the Smart-M-Air app on my phone.