gvigroux / hon

Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters
MIT License
141 stars 53 forks source link

account #94

Closed Maicolsara closed 1 year ago

Maicolsara commented 1 year ago

l'integrazione si è disconnessa e non si riconnette più anche le le credenziali sono uguali. ho già disistallato riavviato e cambiato password ma non funziona

Maicolsara commented 1 year ago

erroe : Your login attempt has failed. Make sure the username and password are correct.

Therodoxx commented 1 year ago

Similar here. Error: 2023-06-04 06:20:03.513 ERROR (MainThread) [custom_components.hon.hon] hOn Invalid Data [<coroutine object ClientResponse.text at 0x7f839f713370>] after sending command [{'mobileId': 'XXXXXXXX', 'os': 'android', 'osVersion': 31, 'appVersion': '1.53.7', 'deviceModel': 'goldfish_x86'}] with headers []{'Content-Type': 'application/json', 'id-token':XXXXXXXXXXXXXXXXXXXXX'}] 2023-06-04 06:20:03.515 DEBUG (MainThread) [custom_components.hon] Appliances: []

egonkab commented 1 year ago

Same here. No connection for 2 days When setting up the following error:

Logger: custom_components.hon.hon Source: custom_components/hon/hon.py:138 Integration: hOn (documentation, issues) First occurred: 09:21:15 (3 occurrences) Last logged: 09:28:45

Unable to retreive the frontdoor URL. Message: {"actions":[{"id":"79;a","state":"SUCCESS","returnValue":"Your login attempt has failed. Make sure the username and password are correct.","error":[]}],"context":{"mode":"PROD","app":"siteforce:loginApp2","contextPath":"/SmartHome/s/sfsites","pathPrefix":"/SmartHome","fwuid":"emxZN2gzQnZ0X3FSYS1kQnBRbHV4QWI4T1Q3UVpoR0gtemxDX3B4aTM3bVEyNDQuMjAuMS0yLjQxLjQ","mlr":1,"loaded":{"APPLICATION@markup://siteforce:loginApp2":"YtNc5oyHTOvavSB9Q4rtag"},"globalValueProviders":[{"type":"$Global","values":{"eswConfigDeveloperName":{"writable":true,"defaultValue":""},"isVoiceOver":{"writable":true,"defaultValue":false},"setupAppContextId":{"writable":true,"defaultValue":""},"density":{"writable":true,"defaultValue":""},"srcdoc":{"writable":false,"defaultValue":false},"appContextId":{"writable":true,"defaultValue":""},"dynamicTypeSize":{"writable":true,"defaultValue":""}}}],"enableAccessChecks":true,"apce":1,"dns":"c","lairn":[],"laerc":[],"lav":"58","mna":{"lightning":"interop"},"lff":{"ENABLE_MIXED_SHADOW_MODE":false,"ENABLE_LIGHT_GET_ROOT_NODE_PATCH":true,"DISABLE_LIGHT_DOM_UNSCOPED_CSS":false},"arse":1,"acaf":1,"services":["markup://lightning:configProvider","markup://force:salesforceScopedModuleResolver","markup://force:ldsEngineCreator","markup://instrumentation:locatorService"]},"perfSummary":{"version":"core","request":7,"actions":{"79;a":{"total":4,"db":2}},"actionsTotal":4,"overhead":0}} Unable to retreive the frontdoor URL. Message: {"actions":[{"id":"79;a","state":"SUCCESS","returnValue":"Your login attempt has failed. Make sure the username and password are correct.","error":[]}],"context":{"mode":"PROD","app":"siteforce:loginApp2","contextPath":"/SmartHome/s/sfsites","pathPrefix":"/SmartHome","fwuid":"emxZN2gzQnZ0X3FSYS1kQnBRbHV4QWI4T1Q3UVpoR0gtemxDX3B4aTM3bVEyNDQuMjAuMS0yLjQxLjQ","mlr":1,"loaded":{"APPLICATION@markup://siteforce:loginApp2":"YtNc5oyHTOvavSB9Q4rtag"},"globalValueProviders":[{"type":"$Global","values":{"eswConfigDeveloperName":{"writable":true,"defaultValue":""},"isVoiceOver":{"writable":true,"defaultValue":false},"setupAppContextId":{"writable":true,"defaultValue":""},"density":{"writable":true,"defaultValue":""},"srcdoc":{"writable":false,"defaultValue":false},"appContextId":{"writable":true,"defaultValue":""},"dynamicTypeSize":{"writable":true,"defaultValue":""}}}],"enableAccessChecks":true,"apce":1,"dns":"c","lairn":[],"laerc":[],"lav":"58","mna":{"lightning":"interop"},"lff":{"ENABLE_MIXED_SHADOW_MODE":false,"ENABLE_LIGHT_GET_ROOT_NODE_PATCH":true,"DISABLE_LIGHT_DOM_UNSCOPED_CSS":false},"arse":1,"acaf":1,"services":["markup://lightning:configProvider","markup://force:salesforceScopedModuleResolver","markup://force:ldsEngineCreator","markup://instrumentation:locatorService"]},"perfSummary":{"version":"core","request":8,"actions":{"79;a":{"total":5,"db":2}},"actionsTotal":5,"overhead":0}} Unable to retreive the frontdoor URL. Message: {"actions":[{"id":"79;a","state":"SUCCESS","returnValue":"Your login attempt has failed. Make sure the username and password are correct.","error":[]}],"context":{"mode":"PROD","app":"siteforce:loginApp2","contextPath":"/SmartHome/s/sfsites","pathPrefix":"/SmartHome","fwuid":"emxZN2gzQnZ0X3FSYS1kQnBRbHV4QWI4T1Q3UVpoR0gtemxDX3B4aTM3bVEyNDQuMjAuMS0yLjQxLjQ","mlr":1,"loaded":{"APPLICATION@markup://siteforce:loginApp2":"YtNc5oyHTOvavSB9Q4rtag"},"globalValueProviders":[{"type":"$Global","values":{"eswConfigDeveloperName":{"writable":true,"defaultValue":""},"isVoiceOver":{"writable":true,"defaultValue":false},"setupAppContextId":{"writable":true,"defaultValue":""},"density":{"writable":true,"defaultValue":""},"srcdoc":{"writable":false,"defaultValue":false},"appContextId":{"writable":true,"defaultValue":""},"dynamicTypeSize":{"writable":true,"defaultValue":""}}}],"enableAccessChecks":true,"apce":1,"dns":"c","lairn":[],"laerc":[],"lav":"58","mna":{"lightning":"interop"},"lff":{"ENABLE_MIXED_SHADOW_MODE":false,"ENABLE_LIGHT_GET_ROOT_NODE_PATCH":true,"DISABLE_LIGHT_DOM_UNSCOPED_CSS":false},"arse":1,"acaf":1,"services":["markup://lightning:configProvider","markup://force:salesforceScopedModuleResolver","markup://force:ldsEngineCreator","markup://instrumentation:locatorService"]},"perfSummary":{"version":"core","request":6,"actions":{"79;a":{"total":4,"db":2}},"actionsTotal":4,"overhead":0}}

Lemonadel commented 1 year ago

I also face this issue. 3.06 around 4:00 CET Home Assistant showed that AC configured in this app is not longer available.

Could not set up hon integration in HA as well as it’s telling password is incorrect (but it works ).

I also confirm it’s a problem of hon app authorization as iPhone hon app is working fine with the same credentials.

ndom91 commented 1 year ago

Same issue here, every entity is listed as "unavailable", as it doesn't seem to be able to authenticate. Some logs, with debugging logging enabled:

2023-06-04 14:39:25.596 ERROR (MainThread) [custom_components.hon.hon] hOn Invalid Data [<coroutine object ClientResponse.text at 0x7f98039819a0>] after sending command [{'mobileId': '36fb29e.....', 'os': 'android', 'osVersion': 31, 'appVersion': '1.53.7', 'deviceModel': 'goldfish_x86'}] with headers []{'Content-Type': 'application/json', 'id-token': 'ey...'}]
2023-06-04 14:39:25.764 ERROR (MainThread) [custom_components.hon.base] Unexpected error fetching hOn Device data: 'shadow'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/hon/base.py", line 42, in _async_update_data
    await self._device.load_context()
  File "/config/custom_components/hon/device.py", line 69, in load_context
    for name, values in self._attributes.pop("shadow").get("parameters").items():
KeyError: 'shadow'

Unfortunately re-adding the integration, and trying to sign-in again only returns a blank modal, showing nothing but a "close" button, so it doesn't show any additional error messages. The browser console during this login and the HA logs also don't show anything related to this login attempt :/

EDIT: I can confirm android app login and program start does still work for me though. More details below:

EDIT 2: Looks like it just needed another restart for the debugging logging to kick in. Here's what I got:

2023-06-04 15:06:40.712 ERROR (MainThread) [pyhon.connection.auth] hOn Authentication Error
  1     401 - https://haiereurope.my.site.com/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb&display=touch
  2     302 - https://haiereurope.my.site.com/SmartHome/s/login?display=touch&ec=302&inst=68&startURL=/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb%26display%3Dtouch
  3     301 - https://haiereurope.my.site.com/SmartHome/s/login/?display=touch&ec=302&inst=68&startURL=/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb%26display%3Dtouch
  4     200 - https://haiereurope.my.site.com/SmartHome/s/login/?language=en_US&display=touch&ec=302&inst=68&startURL=%2FSmartHome%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb%26display%3Dtouch&System=IoT_Mobile_App&RegistrationSubChannel=hOn
  5     200 - https://haiereurope.my.site.com/SmartHome/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1
ERROR - 200 - https://haiereurope.my.site.com/SmartHome/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1
=============== Response ===============
*/{"event":{"descriptor":"markup://aura:systemError","attributes":{"values":{"message":"[AuraClientInputException from server] Unexpected request input. Expected input format: \"Data in a request must be a valid JSON Object and must be in the expected format.\".","showOverride":false}},"eventDef":{"descriptor":"markup://aura:systemError","t":"APPLICATION","xs":"G","a":{"message":["message","aura://String","G",false],"error":["error","aura://String","G",false],"auraError":["auraError","aura://Object","I",false,null],"timestamp":["timestamp","aura://Integer","I",false],"showOverride":["showOverride","aura://Boolean","I",false,false]}}},"exceptionMessage":"[AuraClientInputException from server] Unexpected request input. Expected input format: \"Data in a request must be a valid JSON Object and must be in the expected format.\".","exceptionEvent":true}/*ERROR*/
========================================
2023-06-04 15:06:40.718 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry user@gmail.com for hon
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/hon/__init__.py", line 31, in async_setup_entry
    hon = await Hon(
  File "/usr/local/lib/python3.10/site-packages/pyhon/hon.py", line 41, in create
    await self.setup()
  File "/usr/local/lib/python3.10/site-packages/pyhon/hon.py", line 63, in setup
    for appliance in (await self.api.load_appliances())["payload"]["appliances"]:
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/api.py", line 69, in load_appliances
    async with self._hon.get(f"{const.API_URL}/commands/v1/appliance") as resp:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler/base.py", line 44, in get
    async with self._intercept(self._session.get, *args, **kwargs) as response:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler/hon.py", line 58, in _intercept
    kwargs["headers"] = await self._check_headers(kwargs.get("headers", {}))
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler/hon.py", line 49, in _check_headers
    await self.auth.authenticate()
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 245, in authenticate
    if not (url := await self._login()):
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 182, in _login
    await self._error_logger(response)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 83, in _error_logger
    raise exceptions.HonAuthenticationError("Can't login")
pyhon.exceptions.HonAuthenticationError: Can't login
Maicolsara commented 1 year ago

Stesso problema qui, ogni entità è elencata come "non disponibile", poiché non sembra essere in grado di autenticarsi. Alcuni log, con la registrazione di debug abilitata:

2023-06-04 14:39:25.596 ERROR (MainThread) [custom_components.hon.hon] hOn Invalid Data [<coroutine object ClientResponse.text at 0x7f98039819a0>] after sending command [{'mobileId': '36fb29e.....', 'os': 'android', 'osVersion': 31, 'appVersion': '1.53.7', 'deviceModel': 'goldfish_x86'}] with headers []{'Content-Type': 'application/json', 'id-token': 'ey...'}]
2023-06-04 14:39:25.764 ERROR (MainThread) [custom_components.hon.base] Unexpected error fetching hOn Device data: 'shadow'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/hon/base.py", line 42, in _async_update_data
    await self._device.load_context()
  File "/config/custom_components/hon/device.py", line 69, in load_context
    for name, values in self._attributes.pop("shadow").get("parameters").items():
KeyError: 'shadow'

Purtroppo, aggiungere nuovamente l'integrazione e tentare di accedere nuovamente restituisce solo un modale vuoto, che non mostra altro che un pulsante "chiudi", quindi non mostra ulteriori messaggi di errore. Anche la console del browser durante questo accesso ei registri HA non mostra nulla relativo a questo tentativo di accesso:/

EDIT : posso confermare l'accesso all'app Android e l'avvio del programma funziona ancora per me. Maggiori dettagli di seguito:

  • firmware:4.1.0
  • Modello:Haier HW90-B14959U1_DE
  • hSulla versione dell'app per Android: 2.0.10(aggiornata il 24 maggio 2023)

EDIT 2 : sembra che sia necessario solo un altro riavvio per iniziare la registrazione del debug. Ecco cosa ho ottenuto:

2023-06-04 15:06:40.712 ERROR (MainThread) [pyhon.connection.auth] hOn Authentication Error
  1     401 - https://haiereurope.my.site.com/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb&display=touch
  2     302 - https://haiereurope.my.site.com/SmartHome/s/login?display=touch&ec=302&inst=68&startURL=/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb%26display%3Dtouch
  3     301 - https://haiereurope.my.site.com/SmartHome/s/login/?display=touch&ec=302&inst=68&startURL=/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb%26display%3Dtouch
  4     200 - https://haiereurope.my.site.com/SmartHome/s/login/?language=en_US&display=touch&ec=302&inst=68&startURL=%2FSmartHome%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAYiLqrM6MDAwMDAwMDAwMDAwMDAwAAAA9LhXPVPQxuwwdeODGf6JJDQyiqzmqXhNzA8YpfLJZ5bsSEIwTSeVkKPVE4yH9zfUp6CxpzjIVuc5CjN9u24T3IBmf5f75y75sU67MQYOfnTnVZndb0iPBiqyIHMQfBF3JaPTBsliS6ZoiCfzkjWmTENruUB29xGh9pI6WIvrEPpQkGbuQGmneGN_7uFkdZViVhE2oVMSQGoJFem_COUQiQdFDTz-glAPaemJE1GmplxvNQ9UX4zRnpyQx-1CYinCaEAKvFhR3FGRSVpCcC52eN96oOExI24j06OxPK93OGvV_JZBk-E4MFKdJxmRlsv158hr0IjnofMFsiVx9ATtdmkemSA1sEMZMcIwEJvb2gAMwSTfpKxdQkxk1-90uQSn7hF7KtofK3H5OCKxN9DS_c9LYP5_wsVk7jziSUp1ZZxxfoQg0-z59j9TssZvPr7LhcFC-zZ-cdlh0gtaYfIbSJKhaN9LOSsO3DK2q7FWHMigCkWp33lCE9pUtNKOExAtyqemYhwqW1WMF9xxrmIkV0E--3TVieKgKfX_rOJiVaa7zIZD0NP1lRCoc6WqvHzRUvO2ow6hPmZr3nQiPyONUECwOI3B7RjLirA9mQpY0nOV6rUz9EoiaPgE4Jhjyq9oQaQHWyABKjQ2lOpDNrSF8syPU8p_glCH_zmaohYGd9saoIMd_n9x7nG-ar2VkZ07U1xsNeQJ8Uc5B4Hsyjw1ydaahe2eV3VwKWncqspX9SJb%26display%3Dtouch&System=IoT_Mobile_App&RegistrationSubChannel=hOn
  5     200 - https://haiereurope.my.site.com/SmartHome/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1
ERROR - 200 - https://haiereurope.my.site.com/SmartHome/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1
=============== Response ===============
*/{"event":{"descriptor":"markup://aura:systemError","attributes":{"values":{"message":"[AuraClientInputException from server] Unexpected request input. Expected input format: \"Data in a request must be a valid JSON Object and must be in the expected format.\".","showOverride":false}},"eventDef":{"descriptor":"markup://aura:systemError","t":"APPLICATION","xs":"G","a":{"message":["message","aura://String","G",false],"error":["error","aura://String","G",false],"auraError":["auraError","aura://Object","I",false,null],"timestamp":["timestamp","aura://Integer","I",false],"showOverride":["showOverride","aura://Boolean","I",false,false]}}},"exceptionMessage":"[AuraClientInputException from server] Unexpected request input. Expected input format: \"Data in a request must be a valid JSON Object and must be in the expected format.\".","exceptionEvent":true}/*ERROR*/
========================================
2023-06-04 15:06:40.718 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry user@gmail.com for hon
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/hon/__init__.py", line 31, in async_setup_entry
    hon = await Hon(
  File "/usr/local/lib/python3.10/site-packages/pyhon/hon.py", line 41, in create
    await self.setup()
  File "/usr/local/lib/python3.10/site-packages/pyhon/hon.py", line 63, in setup
    for appliance in (await self.api.load_appliances())["payload"]["appliances"]:
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/api.py", line 69, in load_appliances
    async with self._hon.get(f"{const.API_URL}/commands/v1/appliance") as resp:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler/base.py", line 44, in get
    async with self._intercept(self._session.get, *args, **kwargs) as response:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler/hon.py", line 58, in _intercept
    kwargs["headers"] = await self._check_headers(kwargs.get("headers", {}))
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler/hon.py", line 49, in _check_headers
    await self.auth.authenticate()
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 245, in authenticate
    if not (url := await self._login()):
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 182, in _login
    await self._error_logger(response)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 83, in _error_logger
    raise exceptions.HonAuthenticationError("Can't login")
pyhon.exceptions.HonAuthenticationError: Can't login

speriamo gvigroux risolva il problema

llhotka commented 1 year ago

It seems hOn changed the authentication procedure somehow. I tried to set a new password in the app but the new credentials don't work in HA.

gvigroux commented 1 year ago

I do confirm I have the same issue :( I will have to find a new way to authenticate

llhotka commented 1 year ago

Slightly off-topic but, from your experience, would it be difficult to write a HA integration for controlling e.g. an air conditioner locally, without having any technical info about the protocol from the vendor (Haier in my case)?

helmet05 commented 1 year ago

My favorite and used integration. I tried deleting the device from HA and adding it again, but now can't login to account :)

llhotka commented 1 year ago

My favorite and used integration. I tried deleting the device from HA and adding it again, but now can't login to account :)

This is what happened to everybody, see above.

Maicolsara commented 1 year ago

Confermo di avere lo stesso problema :( dovrò trovare un nuovo modo per autenticarmi

sarai il nostro salvatore XdXd

stochlinski commented 1 year ago

I also used this plugin and yesterday it stopped working :( The same reason.

lechoooo commented 1 year ago

hi, this looks useful: https://github.com/Andre0512/hon/issues/58#issuecomment-1579660780

Maicolsara commented 1 year ago

Confermo di avere lo stesso problema :( dovrò trovare un nuovo modo per autenticarmi

Ciao hai qualche aggiornamento?

gvigroux commented 1 year ago

Should be fixed now :)

Maicolsara commented 1 year ago

Dovrebbe essere risolto ora :)

Keep giving me authentication error

gvigroux commented 1 year ago

I just created a new release base on the code. Sorry about that. Can you please retest and check you have the 0.5.1 version ?

mrtnbr commented 1 year ago

I updated via HACS to 0.5.1 and it is working again! Thank you very much @gvigroux !

gvigroux commented 1 year ago

YEAH !!! ad3bf1c60ba12f0f9e576a85a2865404