[SOLVED] Mitsubishi MelCloud - suddenly unauthorized

I get an unauthorized error from MelCloud now. Is it just me or did they just close access temporarily or permanently? Still working using their own painfully useless app so I am leaning of a shutout of HASS.

Logger: homeassistant.config_entries
Source: components/melcloud/init.py:157
First occurred: 15:51:08 (1 occurrences)
Last logged: 15:51:08

Error setting up entry (e-mail) for melcloud
Traceback (most recent call last):
File “/Users/culture/homeassistant/lib/python3.10/site-packages/homeassistant/config_entries.py”, line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File “/Users/culture/homeassistant/lib/python3.10/site-packages/homeassistant/components/melcloud/init.py”, line 70, in async_setup_entry
mel_devices = await mel_devices_setup(hass, conf[CONF_TOKEN])
File “/Users/culture/homeassistant/lib/python3.10/site-packages/homeassistant/components/melcloud/init.py”, line 157, in mel_devices_setup
all_devices = await get_devices(
File “/Users/culture/homeassistant/lib/python3.10/site-packages/pymelcloud/init.py”, line 49, in get_devices
await _client.update_confs()
File “/Users/culture/homeassistant/lib/python3.10/site-packages/pymelcloud/client.py”, line 157, in update_confs
await self._fetch_user_details()
File “/Users/culture/homeassistant/lib/python3.10/site-packages/pymelcloud/client.py”, line 109, in _fetch_user_details
async with self._session.get(
File “/Users/culture/homeassistant/lib/python3.10/site-packages/aiohttp/client.py”, line 1141, in aenter
self._resp = await self._coro
File “/Users/culture/homeassistant/lib/python3.10/site-packages/aiohttp/client.py”, line 643, in _request
resp.raise_for_status()
File “/Users/culture/homeassistant/lib/python3.10/site-packages/aiohttp/client_reqrep.py”, line 1005, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message=‘Unauthorized’, url=URL(‘https://app.melcloud.com/Mitsubishi.Wifi.Client/User/GetUserDetails’)

1 Like

Same here:

Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 17:12:10 (3 occurrences)
Last logged: 17:13:16

Error setting up entry (EMAIL_ACCOUNT_HERE) for melcloud
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/melcloud/__init__.py", line 69, in async_setup_entry
    mel_devices = await mel_devices_setup(hass, conf[CONF_TOKEN])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/melcloud/__init__.py", line 167, in mel_devices_setup
    all_devices = await get_devices(
                  ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymelcloud/__init__.py", line 49, in get_devices
    await _client.update_confs()
  File "/usr/local/lib/python3.11/site-packages/pymelcloud/client.py", line 157, in update_confs
    await self._fetch_user_details()
  File "/usr/local/lib/python3.11/site-packages/pymelcloud/client.py", line 109, in _fetch_user_details
    async with self._session.get(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 643, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/User/GetUserDetails')```

Fixed by:
Re-adding the integration account entry .

4 Likes

How do you do that?

(I’m on Core and unable to update to most recent Python and get my install to work, so stuck on 2023.5, dunno if there is an option to re-add account in later versions)

Never mind. De-installed the integration and re-installed. Entered credentials again, everything back as it was, same device and entity names, history preserved. No worries.

Thanks.

1 Like

I got the same issue and followed @cornubot recommandation (Uninstall and reinstall Melcloud integration + re-enter Login + password). Every is OK again with all same netoities names

1 Like

I have uninstall and tried to reinstall either Melcloud or Melcloud custom and I still have the same issue despite I reboot HA get unlogged from Melcloud application.
I’m able to login Melcloud application with my login password but not at all in HA.
Hope you can help.

I changed password in melcloud. before this I had same problems

This is interesting to see this topic here… others who use my Hubitat Mitsubishi integration have also experienced issues authenticating with MELCloud. A user assisted with this by including a replace for some “special characters” (will need to follow up on the chars included), but if this is required it would seem like this is required to deal with chars introduced into the authentication code provided back from MELCloud. Strange… I would have expected to see this in more pro-active dev’s for other platforms that I follow on GitHub…

Also interesting to see a Euro-user with Kangaroo in their name…

1 Like

Hi
I finally solved the issue by changing password. First I logged with my wife password it works, then try with my password does not work went back to my wife password not working anymore. Change my password then work again then I stopped here quite frustrated. I changed my password which was 32 digit long with special character to a shorter one and less specials.
@ sburke781 That is a reminder of long time in Austaralia after I rolled my Hilux on a side dirt road, then I got called FyingKagaroo and as I’m travelling since ever it is FlyingKangaroo4Ever :wink:

1 Like