hon: hOn Authentication Error while trying to add a newly created account
Describe the bug Trying to setup a newly created non-Gmail account results in hOn Authentication Error 1 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source…
To Reproduce Steps to reproduce the behavior:
- Add hon custom component to HA
- Add hOn integration
- Provide correct account login info - works on mobile
- See error
Expected behavior Successfully setup the hOn HA integration
Screenshots
Environment (please complete the following information):
- Home Assistant Version:
2024.7.1 - hOn Integration Version: tryied both
v0.13.0andv0.14.0-beta7 - pyhOn Version - not sure - whatever the hon HA integration comes with
Additional context n/a
Home Assistant Logs
Check System -> Logs if you can find any logs related to this integration and post it here.
Device Log
2024-07-09 15:32:56.764 ERROR (MainThread) [pyhon.connection.auth] hOn Authentication Error
1 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAZCcoebLMDAwMDAwMDAwMDAwMDAwAAAA-hPIMSrShOCaS_nzv1mPVc__ZIVsxf5QXEQnXosVHvlPqM5l48WnsXn0y3ZTEczc2c893sBM_EqnVOs_qjyw-gaRmembGvbDX5qykspJ0jdzLGAWTZ0FtME0iRR3LtvxS7mwuO3yIf_4aQ5VGFJS-iIWW8WmFMyiPfb87lq9XcJWfeb0ej0P9TKRjZNzrd9h9c3O_oKChN2Hzx8s8eEja5jIniUVuPMA-t9HcCvyEFD4ed5p7EOlXm-USZClqOq_ibu8ih6ZEKSHmpn72Z7WfU0rzueg6BjlRy49qFpeTAv0fFR60sIaudCnUYkNSJGfX305Tm3h-k5uePSH153yRePTHHIzVWZMPg8XtC2gTl3aFRQyPD05bMpJd6IxVFVI6NAUZRD42uOgfNcSNOA4t0QzcP--N2_40bLOU7g48KxnQkEfPI7bXsbkZU02Q61pmBSjIzT6VyZ1sYnGIITFu8MJIeX_Ay--IjxQkGA4RZ6He1FYnGG9nGGmnrrM6A0bKU4j-COTDoaMRy-A0UjSW_3s8FCmbARLGMiEnM7HcAUq8FlrnA3LzzpHQHr4T0AGA7Wn2l1EWLkKvmUX717UCxmV_VFKsFaB9LD0YI5cY1tWdfH7JyBl1ytqWEn3ppSrI8-sBXNO4x1MRI2V_nGmViCSFjqAvq_1TEX9bEwKR67CpVWhrceVJe7uDkbQnT1Wxtg_RSUJpOxupekVJL5g9vD0Pbn5XbTE0AWbGY2hCE_-MrnqMKtmK4eVz60IRjO7_g%253D%253D%26display%3Dtouch
ERROR - 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAZCcoebLMDAwMDAwMDAwMDAwMDAwAAAA-hPIMSrShOCaS_nzv1mPVc__ZIVsxf5QXEQnXosVHvlPqM5l48WnsXn0y3ZTEczc2c893sBM_EqnVOs_qjyw-gaRmembGvbDX5qykspJ0jdzLGAWTZ0FtME0iRR3LtvxS7mwuO3yIf_4aQ5VGFJS-iIWW8WmFMyiPfb87lq9XcJWfeb0ej0P9TKRjZNzrd9h9c3O_oKChN2Hzx8s8eEja5jIniUVuPMA-t9HcCvyEFD4ed5p7EOlXm-USZClqOq_ibu8ih6ZEKSHmpn72Z7WfU0rzueg6BjlRy49qFpeTAv0fFR60sIaudCnUYkNSJGfX305Tm3h-k5uePSH153yRePTHHIzVWZMPg8XtC2gTl3aFRQyPD05bMpJd6IxVFVI6NAUZRD42uOgfNcSNOA4t0QzcP--N2_40bLOU7g48KxnQkEfPI7bXsbkZU02Q61pmBSjIzT6VyZ1sYnGIITFu8MJIeX_Ay--IjxQkGA4RZ6He1FYnGG9nGGmnrrM6A0bKU4j-COTDoaMRy-A0UjSW_3s8FCmbARLGMiEnM7HcAUq8FlrnA3LzzpHQHr4T0AGA7Wn2l1EWLkKvmUX717UCxmV_VFKsFaB9LD0YI5cY1tWdfH7JyBl1ytqWEn3ppSrI8-sBXNO4x1MRI2V_nGmViCSFjqAvq_1TEX9bEwKR67CpVWhrceVJe7uDkbQnT1Wxtg_RSUJpOxupekVJL5g9vD0Pbn5XbTE0AWbGY2hCE_-MrnqMKtmK4eVz60IRjO7_g%253D%253D%26display%3Dtouch
=============== Response ===============
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<script>
function redirectOnLoad() {
if (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZCcoebLMDAwMDAwMDAwMDAwMDAwAAAA-hPIMSrShOCaS_nzv1mPVc__ZIVsxf5QXEQnXosVHvlPqM5l48WnsXn0y3ZTEczc2c893sBM_EqnVOs_qjyw-gaRmembGvbDX5qykspJ0jdzLGAWTZ0FtME0iRR3LtvxS7mwuO3yIf_4aQ5VGFJS-iIWW8WmFMyiPfb87lq9XcJWfeb0ej0P9TKRjZNzrd9h9c3O_oKChN2Hzx8s8eEja5jIniUVuPMA-t9HcCvyEFD4ed5p7EOlXm-USZClqOq_ibu8ih6ZEKSHmpn72Z7WfU0rzueg6BjlRy49qFpeTAv0fFR60sIaudCnUYkNSJGfX305Tm3h-k5uePSH153yRePTHHIzVWZMPg8XtC2gTl3aFRQyPD05bMpJd6IxVFVI6NAUZRD42uOgfNcSNOA4t0QzcP--N2_40bLOU7g48KxnQkEfPI7bXsbkZU02Q61pmBSjIzT6VyZ1sYnGIITFu8MJIeX_Ay--IjxQkGA4RZ6He1FYnGG9nGGmnrrM6A0bKU4j-COTDoaMRy-A0UjSW_3s8FCmbARLGMiEnM7HcAUq8FlrnA3LzzpHQHr4T0AGA7Wn2l1EWLkKvmUX717UCxmV_VFKsFaB9LD0YI5cY1tWdfH7JyBl1ytqWEn3ppSrI8-sBXNO4x1MRI2V_nGmViCSFjqAvq_1TEX9bEwKR67CpVWhrceVJe7uDkbQnT1Wxtg_RSUJpOxupekVJL5g9vD0Pbn5XbTE0AWbGY2hCE_-MrnqMKtmK4eVz60IRjO7_g%3D%3D'); } else
if (window.location.replace){
window.location.replace('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZCcoebLMDAwMDAwMDAwMDAwMDAwAAAA-hPIMSrShOCaS_nzv1mPVc__ZIVsxf5QXEQnXosVHvlPqM5l48WnsXn0y3ZTEczc2c893sBM_EqnVOs_qjyw-gaRmembGvbDX5qykspJ0jdzLGAWTZ0FtME0iRR3LtvxS7mwuO3yIf_4aQ5VGFJS-iIWW8WmFMyiPfb87lq9XcJWfeb0ej0P9TKRjZNzrd9h9c3O_oKChN2Hzx8s8eEja5jIniUVuPMA-t9HcCvyEFD4ed5p7EOlXm-USZClqOq_ibu8ih6ZEKSHmpn72Z7WfU0rzueg6BjlRy49qFpeTAv0fFR60sIaudCnUYkNSJGfX305Tm3h-k5uePSH153yRePTHHIzVWZMPg8XtC2gTl3aFRQyPD05bMpJd6IxVFVI6NAUZRD42uOgfNcSNOA4t0QzcP--N2_40bLOU7g48KxnQkEfPI7bXsbkZU02Q61pmBSjIzT6VyZ1sYnGIITFu8MJIeX_Ay--IjxQkGA4RZ6He1FYnGG9nGGmnrrM6A0bKU4j-COTDoaMRy-A0UjSW_3s8FCmbARLGMiEnM7HcAUq8FlrnA3LzzpHQHr4T0AGA7Wn2l1EWLkKvmUX717UCxmV_VFKsFaB9LD0YI5cY1tWdfH7JyBl1ytqWEn3ppSrI8-sBXNO4x1MRI2V_nGmViCSFjqAvq_1TEX9bEwKR67CpVWhrceVJe7uDkbQnT1Wxtg_RSUJpOxupekVJL5g9vD0Pbn5XbTE0AWbGY2hCE_-MrnqMKtmK4eVz60IRjO7_g%3D%3D');
} else {
window.location.href ='/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZCcoebLMDAwMDAwMDAwMDAwMDAwAAAA-hPIMSrShOCaS_nzv1mPVc__ZIVsxf5QXEQnXosVHvlPqM5l48WnsXn0y3ZTEczc2c893sBM_EqnVOs_qjyw-gaRmembGvbDX5qykspJ0jdzLGAWTZ0FtME0iRR3LtvxS7mwuO3yIf_4aQ5VGFJS-iIWW8WmFMyiPfb87lq9XcJWfeb0ej0P9TKRjZNzrd9h9c3O_oKChN2Hzx8s8eEja5jIniUVuPMA-t9HcCvyEFD4ed5p7EOlXm-USZClqOq_ibu8ih6ZEKSHmpn72Z7WfU0rzueg6BjlRy49qFpeTAv0fFR60sIaudCnUYkNSJGfX305Tm3h-k5uePSH153yRePTHHIzVWZMPg8XtC2gTl3aFRQyPD05bMpJd6IxVFVI6NAUZRD42uOgfNcSNOA4t0QzcP--N2_40bLOU7g48KxnQkEfPI7bXsbkZU02Q61pmBSjIzT6VyZ1sYnGIITFu8MJIeX_Ay--IjxQkGA4RZ6He1FYnGG9nGGmnrrM6A0bKU4j-COTDoaMRy-A0UjSW_3s8FCmbARLGMiEnM7HcAUq8FlrnA3LzzpHQHr4T0AGA7Wn2l1EWLkKvmUX717UCxmV_VFKsFaB9LD0YI5cY1tWdfH7JyBl1ytqWEn3ppSrI8-sBXNO4x1MRI2V_nGmViCSFjqAvq_1TEX9bEwKR67CpVWhrceVJe7uDkbQnT1Wxtg_RSUJpOxupekVJL5g9vD0Pbn5XbTE0AWbGY2hCE_-MrnqMKtmK4eVz60IRjO7_g%3D%3D';
}
}
redirectOnLoad();
</script>
</head>
</html>
========================================
2024-07-09 15:32:56.764 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ***REDACTED*** for hon
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup
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 256, in authenticate
if not await self._load_login():
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 104, in _load_login
login_url = await self._introduce()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 128, in _introduce
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
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:
- GitHub Web: Use the “Attach files by dragging & dropping, selecting or pasting them.” function
- GitHub Mobile: Upload the zip archive as image
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 181 (4 by maintainers)
Commits related to this issue
- Update for new hOn login https://github.com/Andre0512/hon/issues/230 — committed to addshore/pyhOn by addshore 2 years ago
- Bump pyhOn for updatedLogin https://github.com/Andre0512/hon/issues/230 — committed to addshore/hon by addshore 2 years ago
- Bump pyhOn for updatedLogin https://github.com/Andre0512/hon/issues/230 — committed to addshore/hon by addshore 2 years ago
To sum up: Haier changed their login page, which caused the
pyhOnlibrary to fail when attempting to log in on behalf of the user. @addshore fixed this issue and released thepyhOnlibrary with two tags:0.14.0-beta.8-addshoreand0.13.0-beta.1-addshore. In order to installhoncomponent with patched communication library you will need add its URL as custom repository in HACS.The
0.13library is essentially the same as the one previously used: it periodically queries Haier’s servers (though less frequently after discussion with Haier), which results in excessive resource consumption on Haier’s side.The
0.14library is new and communicates with the servers using theMQTTprotocol. This allows the device state to be updated almost in real-time (Haier informs us when something changes without us needing to query), and it doesn’t strain server resources. For example, my washing machine runs for no more than an average of 1 hour per day, so it doesn’t make sense to query Haier’s servers every minute for the remaining 23 hours.However, the
0.14library uses theawscrtpackage underneath, which requires compilation. Precompiled packages are available for x86_64 (e.g., all NUCs, etc.) and aarch64 (e.g., newer Raspberry Pis, etc.) architectures. If your Home Assistant runs on a different processor architecture (e.g., armv6, armv7, or armhf), there are two options.The first option seems less ideal: install all the necessary build tools (cmake, clang, llvm, and others), and the library will compile automatically. The downside is that you’re loading your disk (SD card) with tools that take up hundreds of MB (or even GB) to build a 20MB executable file. These tools won’t be needed after the build.
The second option is what I implemented in my fork: I removed the
awsiotsdklibrary (which requires the problematicawscrt) and replaced it withpaho-mqtt, which is installed by default with HA (as it is used by the standard MQTT integration).Additional tip: Every custom HA integration has a manifest file that declares which libraries are required for it to function. This repository specifies a particular version of
pyhOn, while my fork and addshore’s fork point to the appropriate Git repositories with the patched version. When Home Assistant loads these forks, it cannot determine the version required by the fork (since the Git reference points to a commit, not a version). As a result, it concludes that a version ofpyhOnis already installed and doesn’t install the patched version. By manually running the commanddocker exec homeassistant pip uninstall pyhOn -y, after the next HA restart, nopyhOnwill be present, so the patched fork will be installed.Finally, since there’s currently no contact with @Andre0512, I plan to carry out a significant refactor of the
0.14version in my fork soon. I believe there are some areas where performance and maintainability can be improved. However, I can’t promise that this will happen on any regular basis.Can we please keep this on topic? This is a bug report about the integration not working at the moment. I’m keen on getting a fix from the developer. Not interested in side projects.
If something doesn’t move on this repo by some time next week, I can look at making a fork of both this and pyhOn. I for one can’t use most of the alternatives as my fridge isn’t supported.
Burdening the target machine with additional dependencies like clang just for the purpose of compiling a package isn’t very efficient. It’s much better to cross-compile the package on a more powerful machine and then install the precompiled package on the target machine.
This compilation issue started with the introduction of the
awsiotsdkpackage in Python, which is used only for communication with Haier servers using the MQTT protocol. I forked Andre0512’s repositories, replaced this library with the standardpaho-mqttclient used in Home Assistant, and it seems to be working stably without unnecessarily burdening Haier’s servers with requests.https://github.com/IoTLabs-pl/hon
You might encounter issues because Home Assistant does not reinstallf the pyhOn package if there is some version installed. To address this, you can run the following command on your host machine:
This ensures that after the next reboot, the forked version of pyhOn will be installed instead of attempting to use the older, previously installed version.
Also same here after reloading the integration
So https://github.com/Andre0512/pyhOn/pull/29 fixes the login in the python package for me I tried folding that into a fork version of the integration for folks to use, but I’m not really sure what I am doing there 😄
Anyway, these small changes should work for you https://github.com/Andre0512/pyhOn/pull/29/files And the python package is installable via
pyhOn @ git+https://github.com/addshore/pyhOn.git@3f39be53f31885fb84d72f91fb4123c2e39e7156@kubasaw installed your fork (0.14 beta 9) on my Home Assistant green (HA core 2024.8.1) and used “docker exec homeassistant pip uninstall pyhOn -y” before installing it, which said it was sucessful. But still, my washer (sensor.washing_machine_control and many others) doesn’t seem to connect/update during a wash at all.
If you need some logs during the next cycle, let me know.
@KameDomotics @iNaiks use the “Advanced SSH & Web Terminal” addon from Home Assistant Community Add-ons instead of the official “Terminal & SSH”. You’ll also have to disable protection mode in addon settings.
In my case I made the mistake of installing version 0.13.0 (not beta) and the python packages were stuck even when installing 0.13.0 beta. I had to restore backup made with Proxmox from a few hours earlier. I couldn’t disable the python cache, although it’s probably a simple thing.
I can confirm that the 0.13.0-beta.1-addshore works if you install it at first.
Thanks addshore and [Andre0512](https://github.com/Andre0512 for this work of art. Plase Haier, pay this two developers some bills and stop going against them, this integration is the only reason I bought Haier.
I can confirm to! After the core update it works again! 0.13.0-beta.1-addshore.
After todays Core-Update 0.13.0-beta.1-addshore is working for me.
Hi, i want to give you guys my update on things with this addon. I manage to get this working, this time around without problem. I deleted gvigroux’s hon addon and reinstall Andre’s addon, and before i restarted HA i edited manifest, restarted HA and started intigration setup and now it works.
I removed the standard integration and made sure it had removed all files, restarted ha, and added the @addshore fork to custom repos in hacs and installed it. Once I added my account I got the same error. It was working fine up until I think Monday. Does anyone know if the other integration supports time remaining / machine state? That’s all I pretty much use it for; seeing how long is left without having to go into the app and I have automations set up to notify when the washer or drier have finished.
Same here tried all mentioned methods app works on mobile does not in HA
I think we should wait a few more days for Andre’s response, but if we don’t hear back, we’ll have to create a fork.
At least temporarily, I recommend you use the already mentioned https://github.com/gvigroux/hon. Remembering to remove the Andre integration previously, check if the custom_integrations/hon folder was deleted and restart HA due to the error https://github.com/gvigroux/hon/issues/105.
Unfortunately, Haier, despite its “willingness to cooperate”, is not playing nice with us, I personally plan to install such a module https://github.com/paveldn/haier-esphome to become independent from the cloud and Haier’s inventions; I recommend you think about the same.
@jm314159 thank this work for me but I have to downgrade ha core and then work also with up to date core
the issue is that the owner is not active since April…
@Z4RR0 hon HomeAssistant integration relies on pyhOn. @addshore has a fix for pyhOn, but that needs to get pulled by Andre.
Otherwise, the path is fork pyhOn on pypi.org with a different name, adjust a fork of hon HA integration to use the forked pypi module, and everything should work.
I think ill wait for pyhon version officially went up to 0.17.5.
I tried that changes but didnt get it to run.
I bypassed the login process for now and injected the “access_token” “refresh_token” text manually in the auth.py. that works for now.
Unfortunately I noticed I have the same problem, the entities do not update during the cycle ☹️
It work well for me! thanks @kubasaw
Works just fine
Guys, Can anyone tell me how to proceed step-by-step? I’ve restored my HA before I made any fixes mentioned and now I just need info from where to start. Remove official add-on amd then after restart install addshore one? Any additinal thinga I need to do?
Edit. Okay I removed old version, removed all entities, installed addshore (does not work on core 6.4) updated to 7.4 and magic happens it started to work like a charm. Unfortunately weather chart stopped to work at all blank lovelace page appears no idea how it’s connected nevertheless haier is more important than lovelace 😃 Thanks for all of your support!!!
Yey !! I can confirm too ! 0.13.0-beta.1-addshore. 🎉
hi, for me worked this step.
thank’s addshore!
Il giorno mer 31 lug 2024 alle ore 09:05 Andrey Karavaychik < @.***> ha scritto:
Did you install 0.13.0-beta.1-addshore or 0.14.beta after ha updated to the latest version? I updated HA core to the latest version when 0.14.beta was already installed and it worked.
It doesn’t work for me, I tried and tried again several times, even restarting the host. It doesn’t work.
I uninstalled both Andre as well as gvigroux’s integrations and reinstalled your version addshore and all is well with the world again!
I’m really happy about this, thanks for all the effort in fixing this! I do hope Andre is OK, but I appreciate you picking up the holy work 😉
Works on my side as well after HA updates.
I can confirm also, after HAOS core update 2024.7.4 the repro 0.13.0-beta.1-addshore is working fine
I can confirm! Works like a charm again (im on 0.14.0-beta.7)
I can confirm that following this has allowed me to connected to h0n and add my air conditioner
it started disconnecting here today quite often. I think Haier is still fighting it.
Worked perfectly for me. Will try out tomorrow and see if it actually updates though.
Hi all, i was able to make addshore version working using homeassistant container, some manual steps are required because simply adding the custom repo to hacs installs the integration but in a state that is not working because it fails building a dependency for pyhon. So here are the detailed steps to make it work:
enter the docker container:
docker exec -it homeassistant bashthen inside the docker container run this command to install required libraries to build all pyhon dependecies:
apk add git cmake make clang build-base llvm-static llvm-dev clang-static clang-devwhen it finished, manually install addshore pyhon fork:
pip install pyhOn@git+https://github.com/addshore/pyhOn.git@3f39be53f31885fb84d72f91fb4123c2e39e7156now you can just continue installing addshore fork of the hon integration adding this repo to hacs:
https://github.com/addshore/honinstall the integration, enter email and password and voilà, it’s working
Strange that Andre did not made any modification to the code to fix addon. Maybe he give up and decided to abend project, since hi did have potencial legal problems with haier itself, but i thought that thay come to agriment and let him do the addon, since haier itself dont want to make integration avalible to HA usees
Same problem
@roberglezz thanks for the info - just did the same and it worked. Just installed gvigroux repo on top, did not even have to reconfigure the Haier integration.
Did we really just deleted a whole bunch of comments just to “stay on topic”. A lot of these comments had a lot of information for me the step away from the cloud.
I’m all in for staying on topic, but these comments had a lot of usefull information to get this working again in another way. Which for some people could be a solution to the problem we are all having…
Well Haier definetly likes to play with the community as we saw how they treatened Andre for his work.
I think they pushed him so hard around that he is scared to work on the project again so the community has to solve this kind of problems by there own.
For now im glad that my hacky solution works for me. I have 7 AC Devices that work well with my automations. I was worried yesterday then they just disappeared in my home assistant after i restarted it.
I hope that one with the right amount of python knowledge will fix it and makes the integration work out of the box again.
But im pretty sure that this was not the last time Haier tries to mess up this solution. Its a shame. The products are working but the try to keep the controller in the box they made. This shitty hOn App that is slow and buggy as hell. I rather use the IR remotes than this peace of crap.
Your beta is not working on my end:
logs:
I will try @dm-christian approach
Update1: Still the same issue. My assumption is if you have the integration already installed, this will work. If not… wait for @Andre0512 to fix it or use other integrations.
Update2: Integration: https://github.com/gvigroux/hon works without issues
It was kind of out of the fact that my climate automations stopped working …
Well i just tried it out with the information here. If someone want to bypass it instead of doin it the right way:
If you manualy log into the given URL in
.... window.location.replace('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZChOZbAMDAw....'); ....you get back this html withwindow.location.replace('hon://mobilesdk/detect/oauth/done#access_token=xxxxxxxx.....in it. grab this url and update the auth.py:
async def _get_token(self) -> bool: self._parse_token_data('hon://mobilesdk/detect/oauth/done#access_token=xxxxxxxxxxxxxxxxxxxx&refresh_token=xxxxxxxxxxxxxxxxx ...') return Trueand
async def authenticate(self) -> None: self.clear() try: if not await self._get_token(): raise exceptions.HonAuthenticationError("Can't get token") if not await self._api_auth(): raise exceptions.HonAuthenticationError("Can't get api token") except exceptions.HonNoAuthenticationNeeded: returnThats quite hacky for sure 😃
So, I https://github.com/addshore/hon/commit/c5cff776ee5d6cb331f94714077b259f78818a00 currently installed, and it all appears to be working for me now, but it did require an additional restart of HA too?
If you want to do this the “easy” way, you can add
https://github.com/addshore/honas a custom HACS repo, and then use the0.14.0-beta.8-addshorerelease that should be available, which has the updated python dependency. Or you can go for what @dm-christian mentioned above.Ultimately, i dont plan on maintaining this fork / release / repo, so I hope it gets released here too 😃
Most probably it will have the same result. I never used this integration before, and have the issue, even after manually applying @addshore “fix” on pyhOn. Ref: https://github.com/Andre0512/pyhOn/pull/29/files
@addshore, I manually edited /usr/lib/python3.12/site-packages/pyhon/connection/auth.py with your changes,
and the washing machine can be query:
however, Haier integration still fails to setup:
and log details:
Note: I never had this integration installed before. Founded it yesterday, when the issue was there already.
@addshore hero! How did you reach Andre ?
Same issues with betas:
Does anyone of you have v0.14.0-beta.7 installed and can tell if the same error occurs? A push API has been implemented there, maybe it will solve our error.
same here - Haier did some extra redirection I guess to kill existing intergation.
I’ve got the exact same issue since today. I’ll be able to try something for this on Thursday sadly.
The issue also occurs when reloading an existing integration.
I delved a little into the error and the issue is here: https://github.com/Andre0512/pyhOn/blob/63752e13d6c8e74284ad72e04306e9fedde58b40/pyhon/connection/auth.py#L123 The response for redirect link is now differs from expected.