ollo69 / ha-melcloud-custom

Home Assistant custom integration for MelCloud AC devices with additional Swing control and WI-Fi Sensor
Apache License 2.0
21 stars 9 forks source link

Error Unauthorized #10

Open dtalens opened 7 months ago

dtalens commented 7 months ago

Melcloud component don't work

Error requesting melcloud_custom-Aire hab principal data: 401, message='Unauthorized', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get?id=XXXXXX&buildingID=XXXXX')
Error requesting melcloud_custom-Aire menjador data: 401, message='Unauthorized', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/User/GetUserDetails')

The Official component does work.

Skeletorjus commented 7 months ago

The Official component does work.

Are you sure about this? I noticed that melcloud_custom had stopped working, and after reloading the "standard" integration, that one failed as well.

systeemi commented 7 months ago

Melcoul android app works but Melcloud custom integration in Home assistan doesnt work.

Home assistan log gives error:

Logger: homeassistant.helpers.service Source: helpers/service.py:243 First occurred: 15.00.08 (22 occurrences) Last logged: 15.10.08

Referenced entities climate.xxxxxxxx are missing or not currently available

ps. now it's working

coenski commented 7 months ago

Melcloud custom integration not working here , android app and app.melcloud.com (via pc browser) do still work. Error info: 2023-11-14 14:13:35.934 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxx@xxx.xx' for melcloud_custom integration not ready yet: 401, message='Unauthorized', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/User/GetUserDetails'); Retrying in background

dtalens commented 7 months ago

Official component

The Official component does work.

Are you sure about this? I noticed that melcloud_custom had stopped working, and after reloading the "standard" integration, that one failed as well.

Melcloud official component is working image

dtalens commented 7 months ago

Clearing the integration and re-entering the credentials fixes it.

dtalens commented 7 months ago

Clearing the integration and re-entering the credentials fixes it.

This worked for a while but now it fails again.

dtalens commented 7 months ago

I would say that the problem is on the melcloud server side. There is some kind of error that causes authentication tokens to expire.

dtalens commented 7 months ago

No error for more than 12 hours after the last re-authentication.

ollo69 commented 7 months ago

I think that something happen MelCloud side that invalidate the token. I had to do a reconfiguration to obtain a new token and integration works again. I think that the best solution should be raise a reauth when the error reported in the first thread occurs, so that user will be notified that is requested to re-enter the password.

I will implement this on next release and eventually create a PR for native integration too.

TomEkk33 commented 7 months ago

The same issue for me - happened today 2 hours ago. Re-Installation of MELCloud component did not help.

Update: Re-Installation with restart of HA have helped now.