Mitsubishi MELCLOUD integration with Home Assistant

templates
Tags: #<Tag:0x00007fd075f02f38>

#125

I have the same problem.


#126

Still working here after updating to 89.2. Try to delete the pycache folder and restart.


#127

Just tried that, it did not help. I get this error instead of the controls:

Entity not available: climate.melcloud_bedroom_58597

I’m running Homeassistant in Docker. Everything worked in 89.1 but not 89.2


#128

Same problem for me now after restart. Maybe Melcloud server maintenance or they have done some changes to the connection settings.


#129

I think it must be something else. As the entity is not even activated to homeassistant from the configuration. So it dosn’t seem to be about the Melcloud service.


#130

My logs:

Log Details (ERROR)
Thu Mar 14 2019 18:10:36 GMT+0100 (Central European Standard Time)
Error while setting up platform melcloud
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File “/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py”, line 80, in create_connection
raise err
File “/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py”, line 70, 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.7/site-packages/urllib3/connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 343, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 839, in _validate_conn
conn.connect()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 301, in connect
conn = self._new_conn()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 168, in _new_conn
self, “Failed to establish a new connection: %s” % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x6e543690>: 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.7/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py”, line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘app.melcloud.com’, port=443): Max retries exceeded with url: /Mitsubishi.Wifi.Client/Device/Get (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x6e543690>: 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.7/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/melcloud/climate.py”, line 499, in setup_platform
devices = mc.getDevicesList()
File “/config/custom_components/melcloud/climate.py”, line 300, in getDevicesList
devices.append( MelCloudDevice(device[“DeviceID”], device[“BuildingID”], device[“DeviceName”], self._authentication) )
File “/config/custom_components/melcloud/climate.py”, line 93, in init
self._refresh_device_info()
File “/config/custom_components/melcloud/climate.py”, line 107, in _refresh_device_info
req = requests.get(“https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get”, headers = {‘X-MitsContextKey’: self._authentication.getContextKey()}, data = {‘id’: self._deviceid, ‘buildingID’: self._buildingid})
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 75, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘app.melcloud.com’, port=443): Max retries exceeded with url: /Mitsubishi.Wifi.Client/Device/Get (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x6e543690>: Failed to establish a new connection: [Errno 111] Connection refused’))


#131

For me it seems that there is problem regardin username / password - which I tested and working fine…

Maybe is time so that username / password warning is fixed - maybe something to do with that?

Log Details (WARNING)

Thu Mar 14 2019 18:10:06 GMT+0100 (Central European Standard Time)

Your configuration contains extra keys that the platform does not support. Please remove [email], [password]. (See /config/config/climate.yaml, line 13).


#132

Probably the error is about:
Override http.trusted_networks by auth_provider.trusted_networks (@awarecan - #21844) (http docs)

Nothing else changed about http/https in 89.2


#133

Definitely is not related with trusted networks auth_provider changes.


#134

Did a few small changes to the code and Melcloud component loads without any fatal errors on 0.89.2 on my docker install. Still a few errors in the log sometimes (ConnectionRefusedError: [Errno 111] Connection refused) but think Melcloud have done some maintenance/changes. Because I did get a error and was logged out of the Melcloud App yesterday and is now often very slow when the app connects.

Capture

Both heat pumps I have (Kaiteki 6600) loads and no problem adjusting heat etc.

If still not working, try to downgrade Home Assistant to .89.1 or 0.89 and see it the component loads and nor errors. If still not, we know Melcloud have done some changes.


#135

Hi,

I don’t know if it’s related to the problems described above but this is what’s in my log.
It says : "Max retries exceeded with url: /Mitsubishi.Wifi.Client/Login/ClientLogin "

I can still use it via the app & website btw.

2019-03-15 09:29:19 WARNING (MainThread) [homeassistant.loader] You are using a custom component for melcloud.climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-15 09:29:21 INFO (MainThread) [homeassistant.components.climate] Setting up climate.melcloud
2019-03-15 09:29:21 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform melcloud
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘app.melcloud.com’, port=443): Max retries exceeded with url: /Mitsubishi.Wifi.Client/Login/ClientLogin (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x671dc470>: Failed to establish a new connection: [Errno 111] Connection refused’,))
File “/home/homeassistant/.homeassistant/custom_components/melcloud/climate.py”, line 491, in setup_platform
File “/home/homeassistant/.homeassistant/custom_components/melcloud/climate.py”, line 64, in login
req = requests.post(“https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin”, data={“Email”: self._email ,“Password”: self._password, “Language”: self._language, “AppVersion”: “1.15.3.0”, “Persist”: False})
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘app.melcloud.com’, port=443): Max retries exceeded with url: /Mitsubishi.Wifi.Client/Login/ClientLogin (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x671dc470>: Failed to establish a new connection: [Errno 111] Connection refused’,))

E.


#136

I used your latest code and now climate is working…

Also no error regarding username/password.

I will report if there will become any error in future…


#137

Newest code change to melcloud also works for me. Thank you very much.


#138

Did you used the latest code which can be found on github?


#139

Now it works… Don’t know why.

Thank you

E.


#140

So… how is development ongoing for make component official?


#141

I have been tempted to skip the melcloud part and communicate directly locally with the melcloud wifi interface. Still would be “melcloud”, but push the changes directly to the climate instead of relay through their webui.

The fear I have is Melcloud just pushed new terms forbidding integrations of any kind so this component might be target for a shutdown order.


#142

Is that possible though? If it is it would make it more robust than relying on their web-interface. (although I don’t think they can prevent integration other than somehow technically locking out other types of software)


#143

Maybe there should someone send them e-mail regarding this?

Probably would be better to be honest regarding that then do nothing. People can sometimes suprise.
Also - they should be aware that many people buy theirs Melcloud adapter (or many adapters in my case) because of HA integrations + making this officially is somehow advertisement for their climate (many others already have this kind of advertisements :smile:)


#144

Very common that all have terms that reverse engineering, using they services outside the webpage/app etc. is not allowed. This is the case for many other services. Nothing new.

Can alway hope for a API but dont think this is very likely anytime soon.