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

Cannot add air conditioners Haier to HA. Authentication error. On mobile app it works. Same e-mail / password. #251

Open Mira141 opened 1 month ago

Mira141 commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

Home Assistant Logs Check System -> Logs if you can find any logs related to this integration and post it here.

Device Log Post your device info here (if available)

  1. Enable the "Show Device Info" button This button can be found in the diagnostic section of your device or in the entity overview if "show disabled entities" is enabled.
  2. Press the button to create a notification
  3. Open home assistant notifications and copy the message (Crtl+A, Ctrl+C)

Data Archive For further analysis, please add your appliance data archive here (if available) Navigate to Settings -> Device & Services -> Haier hOn -> your device and press the Create Data Archive button. Then open notifications to download the data zip archive. To attach the file:

Mira141 commented 1 month ago

Logger: pyhon.connection.auth Zdroj: custom_components/hon/init.py:34 integrace: Haier hOn (dokumentace, problémy) První výskyt: 10:01:37 (1 výskyty) Naposledy logováno: 10:01:37 hOn Authentication Error 1 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAZJWjGmwMDAwMDAwMDAwMDAwMDAwAAAA-nhqMztwYjpzv-QmV6dLRYGX7T91-ubdUe0c0ZpPNQo4CqFADi0wGV5guewOY8aJQOmOIQqWF9LhkwL36mlrBQeEpdi3381wfTBQsuVPwuAm6y463ap2yR-4XgQLVkCIoG6PteemKstpJ--ScmBw78nrvtc7ZBUgtqXqZSB8JFzaM8CCrUZwjgdVcrYEIKhIiNOi0fk6lT5mIfdCItCmZ3vwb9iCoeYH24MCC5Hufc3e4D_9CTrGPKOOKnmeYu4j-IiU4MIyxA8TQ97T5kzXA4Uj8dC5mN_gI_0KMqaG-RBehdV4Qptc50Ir-m7vhgDWzYIHfARc5Xs7RJE7Yi_SDtE58vJzhzaC9_FW81853iWLZczogBj7nqpQjxYvq_zCti6WgC4eRs2ZZcJ1h-GTMl-PmLzacJaC2RmD8Qyk9zmHY_N-baqEldgb2tDn_fZktzQNYL_n82yd8i42vduWjkNClDsUtvQ0BUw63sRQA0dydlKm4OXgH9-YS-QhRdA-jFOD6fYXRzL_nIDO3OR_qT4ZPFFphRXX25Algv6gJBkbZ4HQPjfdp1vNsSOf3YMFoTeD1JsS69Dq32mTLwn5XvWCWjt4psUo4ZTSrPaDz6vy8PmdSGqJOu02Jd1D91h8aqCbP1fiLH7IykZ_LaKikxD-8BJh302WeJYlZniuiM-AURPY-3Oj176i5YkDFB3ePmyUmKju62sfZLf9aKo0auVSQl_OBAB05MjhlrvgzMozUWPUZreiVIp-2ntUN8khPQ%253D%253D%26display%3Dtouch 2 200 - https://account2.hon-smarthome.com/s/login/NewhOnLogin?display=touch/&ec=302&startURL=//setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAZJWjGmwMDAwMDAwMDAwMDAwMDAwAAAA-nhqMztwYjpzv-QmV6dLRYGX7T91-ubdUe0c0ZpPNQo4CqFADi0wGV5guewOY8aJQOmOIQqWF9LhkwL36mlrBQeEpdi3381wfTBQsuVPwuAm6y463ap2yR-4XgQLVkCIoG6PteemKstpJ--ScmBw78nrvtc7ZBUgtqXqZSB8JFzaM8CCrUZwjgdVcrYEIKhIiNOi0fk6lT5mIfdCItCmZ3vwb9iCoeYH24MCC5Hufc3e4D_9CTrGPKOOKnmeYu4j-IiU4MIyxA8TQ97T5kzXA4Uj8dC5mN_gI_0KMqaG-RBehdV4Qptc50Ir-m7vhgDWzYIHfARc5Xs7RJE7Yi_SDtE58vJzhzaC9_FW81853iWLZczogBj7nqpQjxYvq_zCti6WgC4eRs2ZZcJ1h-GTMl-PmLzacJaC2RmD8Qyk9zmHY_N-baqEldgb2tDn_fZktzQNYL_n82yd8i42vduWjkNClDsUtvQ0BUw63sRQA0dydlKm4OXgH9-YS-QhRdA-jFOD6fYXRzL_nIDO3OR_qT4ZPFFphRXX25Algv6gJBkbZ4HQPjfdp1vNsSOf3YMFoTeD1JsS69Dq32mTLwn5XvWCWjt4psUo4ZTSrPaDz6vy8PmdSGqJOu02Jd1D91h8aqCbP1fiLH7IykZ_LaKikxD-8BJh302WeJYlZniuiM-AURPY-3Oj176i5YkDFB3ePmyUmKju62sfZLf9aKo0auVSQl_OBAB05MjhlrvgzMozUWPUZreiVIp-2ntUN8khPQ%3D%3D 3 200 - https://account2.hon-smarthome.com/s/login/NewhOnLogin?display=touch/&ec=302&startURL=//setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAZJWjGmwMDAwMDAwMDAwMDAwMDAwAAAA-nhqMztwYjpzv-QmV6dLRYGX7T91-ubdUe0c0ZpPNQo4CqFADi0wGV5guewOY8aJQOmOIQqWF9LhkwL36mlrBQeEpdi3381wfTBQsuVPwuAm6y463ap2yR-4XgQLVkCIoG6PteemKstpJ--ScmBw78nrvtc7ZBUgtqXqZSB8JFzaM8CCrUZwjgdVcrYEIKhIiNOi0fk6lT5mIfdCItCmZ3vwb9iCoeYH24MCC5Hufc3e4D_9CTrGPKOOKnmeYu4j-IiU4MIyxA8TQ97T5kzXA4Uj8dC5mN_gI_0KMqaG-RBehdV4Qptc50Ir-m7vhgDWzYIHfARc5Xs7RJE7Yi_SDtE58vJzhzaC9_FW81853iWLZczogBj7nqpQjxYvq_zCti6WgC4eRs2ZZcJ1h-GTMl-PmLzacJaC2RmD8Qyk9zmHY_N-baqEldgb2tDn_fZktzQNYL_n82yd8i42vduWjkNClDsUtvQ0BUw63sRQA0dydlKm4OXgH9-YS-QhRdA-jFOD6fYXRzL_nIDO3OR_qT4ZPFFphRXX25Algv6gJBkbZ4HQPjfdp1vNsSOf3YMFoTeD1JsS69Dq32mTLwn5XvWCWjt4psUo4ZTSrPaDz6vy8PmdSGqJOu02Jd1D91h8aqCbP1fiLH7IykZ_LaKikxD-8BJh302WeJYlZniuiM-AURPY-3Oj176i5YkDFB3ePmyUmKju62sfZLf9aKo0auVSQl_OBAB05MjhlrvgzMozUWPUZreiVIp-2ntUN8khPQ%3D%3D 4 200 - https://account2.hon-smarthome.com/s/login/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZJWjGmwMDAwMDAwMDAwMDAwMDAwAAAA-nhqMztwYjpzv-QmV6dLRYGX7T91-ubdUe0c0ZpPNQo4CqFADi0wGV5guewOY8aJQOmOIQqWF9LhkwL36mlrBQeEpdi3381wfTBQsuVPwuAm6y463ap2yR-4XgQLVkCIoG6PteemKstpJ--ScmBw78nrvtc7ZBUgtqXqZSB8JFzaM8CCrUZwjgdVcrYEIKhIiNOi0fk6lT5mIfdCItCmZ3vwb9iCoeYH24MCC5Hufc3e4D_9CTrGPKOOKnmeYu4j-IiU4MIyxA8TQ97T5kzXA4Uj8dC5mN_gI_0KMqaG-RBehdV4Qptc50Ir-m7vhgDWzYIHfARc5Xs7RJE7Yi_SDtE58vJzhzaC9_FW81853iWLZczogBj7nqpQjxYvq_zCti6WgC4eRs2ZZcJ1h-GTMl-PmLzacJaC2RmD8Qyk9zmHY_N-baqEldgb2tDn_fZktzQNYL_n82yd8i42vduWjkNClDsUtvQ0BUw63sRQA0dydlKm4OXgH9-YS-QhRdA-jFOD6fYXRzL_nIDO3OR_qT4ZPFFphRXX25Algv6gJBkbZ4HQPjfdp1vNsSOf3YMFoTeD1JsS69Dq32mTLwn5XvWCWjt4psUo4ZTSrPaDz6vy8PmdSGqJOu02Jd1D91h8aqCbP1fiLH7IykZ_LaKikxD-8BJh302WeJYlZniuiM-AURPY-3Oj176i5YkDFB3ePmyUmKju62sfZLf9aKo0auVSQl_OBAB05MjhlrvgzMozUWPUZreiVIp-2ntUN8khPQ%3D%3D&System=IoT_Mobile_App&RegistrationSubChannel=hOn 5 200 - https://account2.hon-smarthome.com/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1 ERROR - 200 - https://account2.hon-smarthome.com/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1 =============== Response =============== {"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":"/s/sfsites","pathPrefix":"","fwuid":"eGx3MHlRT1lEMUpQaWVxbGRUM1h0Z2hZX25NdHFVdGpDN3BnWlROY1ZGT3cyNTAuOC40LTYuNC41","mlr":1,"coos":1,"loaded":{"APPLICATION@markup://siteforce:loginApp2":"E_kSyMRuvXAk7VGckNalqA"},"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":""},"appContextDeveloperName":{"writable":true,"defaultValue":""}}}],"enableAccessChecks":true,"apce":1,"dns":"c","lairn":[],"laerc":[],"lav":"61","lgef":["com.salesforce.locker.temporaryGate"],"mna":{"lightning":"interop"},"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}} ========================================

bavarianbytes commented 2 weeks ago

I have the same problem. Is the integration working for anybody currently?

mykola81 commented 1 week ago

The same for me. Here is latest entry error log: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hon/__init__.py", line 34, in async_setup_entry hon = await Hon( ^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhon/hon.py", line 77, in create await self.setup() File "/usr/local/lib/python3.12/site-packages/pyhon/hon.py", line 104, in setup appliances = await self.api.load_appliances() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhon/connection/api.py", line 86, in load_appliances async with self._hon.get(f"{const.API_URL}/commands/v1/appliance") as resp: File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__ return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhon/connection/handler/base.py", line 64, in get async with self._intercept(*args, **kwargs) as response: File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__ return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhon/connection/handler/hon.py", line 75, in _intercept kwargs["headers"] = await self._check_headers(kwargs.get("headers", {})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhon/connection/handler/hon.py", line 64, in _check_headers await self.auth.authenticate() File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 265, in authenticate if not await self._get_token(url): ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 237, in _get_token await self._error_logger(response) File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 96, in _error_logger raise exceptions.HonAuthenticationError("Can't login") pyhon.exceptions.HonAuthenticationError: Can't login