Andre0512 / hon

Home Assistant integration for Haier hOn: support for Haier/Candy/Hoover home appliances like washing machines and air conditioners in 28 languages.
MIT License
1.3k stars 2.46k forks source link

Integration is no longer loaded #133

Open KameDomotics opened 1 year ago

KameDomotics commented 1 year ago

The integration is no longer loaded. There is a "Failed to set up" message.

However, the hOn application on the smartphone is working.

IMG_6249

Errors in the log:

`Logger: homeassistant.config_entries Source: config_entries.py:402 First occurred: 13:27:06 (2 occurrences) Last logged: 13:27:15

Error setting up entry my_mail@gmail.com for hon 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 "/config/custom_components/hon/init.py", line 32, in async_setup_entry hon = await Hon( ^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 66, in create await self.setup() File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 97, in setup appliances = await self.api.load_appliances() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/connection/api.py", line 77, in load_appliances async with self._hon.get(f"{const.API_URL}/commands/v1/appliance") as resp: File "/usr/local/lib/python3.11/contextlib.py", line 204, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/connection/handler/base.py", line 64, in get async with self._intercept(*args, **kwargs) as response: File "/usr/local/lib/python3.11/contextlib.py", line 204, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/connection/handler/hon.py", line 61, in _intercept kwargs["headers"] = await self._check_headers(kwargs.get("headers", {})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/connection/handler/hon.py", line 51, in _check_headers await self.auth.authenticate() File "/usr/local/lib/python3.11/site-packages/pyhon/connection/auth.py", line 260, in authenticate if not await self._get_token(url): ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/connection/auth.py", line 232, in _get_token await self._error_logger(response) File "/usr/local/lib/python3.11/site-packages/pyhon/connection/auth.py", line 96, in _error_logger raise exceptions.HonAuthenticationError("Can't login") pyhon.exceptions.HonAuthenticationError: Can't login `

Andre0512 commented 1 year ago

Hi, did you change your password recently?

KameDomotics commented 1 year ago

Hi, did you change your password recently?

Hi, no, I have never changed my password.

It all happened suddenly, I noticed that the entities were all unavailable, I tried to reload the integration but it didn't work. I later deleted the integration and redid it, but now I no longer have any entities.

taduo commented 12 months ago

I also had this issue. The application on the phone was working. But I was able to fix it.

  1. Logout from hon Phone App.
  2. Login on hon phone App, (in my case it asked me to change the password).
  3. Change Password
  4. On Home Assistant, refresh the integration. (If it dose not work then remove and add again)
alucryd commented 12 months ago

Not working here either, unfortunately changing passwords didn't help. At first I had 2 factor activated so I deactivated it. Changed passwords, logged out and in again on the hOn app, but still the HA integration says it can't login.

dlosito commented 11 months ago

Hi! I received the washer dryer today (model hwd100-b14959u1) but I have the same problem since the first configuration! Do you have any news on the resolution? Thanks in advance, Domenico.

dlosito commented 11 months ago

@KameDomotics, I solved the problem! The authentication failed, probably, because I had registered for the application through Google. By creating a new account directly from the app, the HA authentication problem disappeared.