Integration with Haier HoN app

Same problem here, I can’t control the AC anymore :frowning:

Reboot home assistant helps me

Hello, this is my first message in the Home Assistant Community. Congratulations on the integration. I have installed the integration GitHub - gvigroux/hon and it has detected my airco model AD71S2SM3FA(H) perfectly. The climate entity displays the information correctly, but the problem is that I can’t control it to turn it on/off, change the mode, temperature, etc.

Do you know what could be due?

Thank you.

Hello again.

I just found out what the problem is. My airco is ducted, not split, so some parameters in the REST API call to the hOn cloud should not be sent (like wind direction related params for example).

In my case, I have edited the variable of self._default_command of the HonClimate class in climate.py file to leave only these parameters: {"tempSel":"21.00","tempUnit":"0","machMode":"1","windSpeed":" 5","onOffStatus":1}

With that I can now control my ducted airco perfectly (model AD71S2SM3FA)

Congratulate @gvigroux for the work done.

Hi I have the same problem. I’ve just installed the integration and me too I can see my air conditioner with all data and option (heat, cool, fan etc etc) but I can’t control it. How can I resolve? Mine Is Haier conditioner model HAS09TAAIN (I suppose is a normal air conditioner split).
Help me please :slight_smile:

just figured out how to solbe the problem. mine was that the remote control was switch off. I don’t know why but I’ve always noticed that to make my air co stay connected to the app I have to maintain the remote control switched on…and now to be able to use the HA integration of my Haier conditioner I have to maintain the remote control switched on again. In this way I can control it. Anyone experienced the same?

When I try to configure the integration I get the following errors:

Config flow could not be loaded: {"message":"Invalid handler specified"}

and

This error originated from a custom integration.

Logger: homeassistant.loader
Source: custom_components/hon-master/const.py:107 
Integration: hon-master 
First occurred: 12:45:22 (2 occurrences) 
Last logged: 12:56:05

Unexpected exception importing platform custom_components.hon-master.config_flow
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 779, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 796, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/hon-master/__init__.py", line 18, in <module>
    from .const import DOMAIN, PLATFORMS
  File "/config/custom_components/hon-master/const.py", line 107, in <module>
    master
NameError: name 'master' is not defined

and

Logger: homeassistant.config_entries
Source: config_entries.py:849 
First occurred: 12:45:22 (2 occurrences) 
Last logged: 12:56:05

Error occurred loading configuration flow for integration hon: Exception importing custom_components.hon-master.config_flow
1 Like

Hello Jakesa, i have recently got installed Haier AC units and run into same issue as you. There is a typo in:

custom_components/hon-master/const.py:107

so just delete that line with “master” word and you should be fine. Another obstacle you can run into (in case you just installed hOn app) is a free virtual wine cooler that the app offers. But it is not supported by this integration and will complain about a lot of things. Removing it solved it for me and I am now up and running.

1 Like

Hi, I made another integration with a slightly different approach to execute commands more easily.

Check out the github repo if you wanna try it: GitHub - Andre0512/hon: Home Assistant component supporting hOn cloudHome Assistant component supporting devices of Haier's mobile app hOn

So far I integrated some washing machine functions.


2 Likes

Can this be used along side the hOn integration above?

I just wanted to say that this worked like magic! My dual split appeared and can now be controlled right away. I only wish this could be done locally, but it’s still faster than going through the Hon app. Thanks again!

Hi,
I installed your integration and went well, thanks.
Although i am now experiencing the following error in the log:

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/hon/__init__.py:32
Integration: Haier hOn (documentation, issues)
First occurred: 31 March 2023 at 2:26:27 pm (4 occurrences)
Last logged: 9:46:59 am

Error setting up entry [email protected] for hon
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/hon/__init__.py", line 32, in async_setup_entry
    await hon.setup()
  File "/usr/local/lib/python3.10/site-packages/pyhon/api.py", line 54, in setup
    headers=await self._headers) as resp:
  File "/usr/local/lib/python3.10/site-packages/pyhon/api.py", line 44, in _headers
    if await auth.authorize(self._email, self._password, self._mobile_id):
  File "/usr/local/lib/python3.10/site-packages/pyhon/auth.py", line 144, in authorize
    if not await self._get_token(session, url):
  File "/usr/local/lib/python3.10/site-packages/pyhon/auth.py", line 116, in _get_token
    async with session.get(url[0]) as resp:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 508, in _request
    req = self._request_class(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 305, in __init__
    self.update_host(url)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 364, in update_host
    raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: /SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYc8_22UMDAwMDAwMDAwMDAwMDAwAAAA8rLXfqDym8tq__zSOO5DOic5ap-0iwi-wv8bjaUBMao03bE3t-_gOi7_nZ7Y6M0jGBlZvQBW1a-o20RDJ_gUmwz_SM2IXimZJfW93pcgjip4wdzqaA49nL-MJdXXlAHANb0enONo-gskNMO8JK835_NjsHLvdyYQQoIlGJPDObmT4YxozOeml8qnuxhCoS4HHWi1u7W72FkydqqrIzfL0VITK-oufD2OJYsT7fnc1ymovBMnCCS5XKENIJXJB5aQ7P34m9wCmKh45aw91ytbC-vNNanis4qleJC8k3Lm5h5T1Qe4SJ1ZM-nm8hIJ4C6mtSFPRMZ-wtp2rB7MjsXalQzpyMs6mwiBtYzazz27W2t8kiYIV3Z0oiGA0V2tc6D0YFQ1nrCpPCFIn-g1R-OXu4z3keVHVpsc2VTEh4Oi5NfCwZHzeK-QSA1VutBviCa8W0kplQ07pXtAO3V4_wCcA1JbF5ory4-W5Wx52ViXqTcr-Vu9GPxjNsDWFdV1tsrkiDZwaF4eKn1fSDm3Z5-DY3nBhT4_dZ6nqC_kDLQY3FX1oPtaiEc1WQ_VvNq-JkLDley2C4SLc9if_IZs1-oGPzWz0XXsyqf3vqy0X_P6-Tn5dd3cqD6dx_Kax45FBi9wMRH9AOrfhd0KpJuieN4cJutybnqLyoH3tdTFpVoEWqtXdVu18JYluR9TH0ORsAt_gA0Pfjh8BDoSTs2ePwKazbw

Any ideas as to the issue?

Thank you.

I like the control & configuration panel :slight_smile:
I will try to integrate some of them in my version

1 Like

Thanks a lot :slight_smile:

I have this problem: the integration is there, but it doesn’t let me see the 3 conditioners I have (now I use HASSIO, on the old docker installation I see them correctly…)

Hi, sorry I hadn’t looked in here for a while… The problem was fixed in the last release :slight_smile:

Hi its ok. I’ve been following on Github. I’ve just posted actually as I’m still not having any success getting it to work! Appreciate your efforts soo far!

Hi the hon integration is not working since some week…below the error:

Logger: homeassistant.config_entries
Source: custom_components/hon/hon.py:186
Integration: hOn
First occurred: 11:26:41 (1 occurrences)
Last logged: 11:26:41

Error setting up entry [email protected] 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 40, in async_setup_entry
    await hon.async_authorize()
  File "/config/custom_components/hon/hon.py", line 186, in async_authorize
    self._cognitoToken = json_data["cognitoUser"]["Token"]
KeyError: 'cognitoUser'

credentials are correct…The Hon app works on my phone…The integration doesn’t.
Please help…

here below another log entry:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/stream/__init__.py:97
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:34:39 (2 occurrences)
Last logged: 11:37:44

[1612293888] Error handling message: Unknown error (unknown_error) Roberto from 87.21.59.185 (Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1)
[1529326824] Error handling message: Unknown error (unknown_error) Roberto from 5.90.241.90 (Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 191, in __new__
    port = val.port
  File "/usr/local/lib/python3.10/urllib/parse.py", line 177, in port
    raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as '554 '

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 811, in ws_camera_stream
    url = await _async_stream_endpoint_url(hass, camera, fmt=msg["format"])
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 976, in _async_stream_endpoint_url
    await stream.start()
  File "/usr/src/homeassistant/homeassistant/components/stream/__init__.py", line 392, in start
    "Started stream: %s", redact_credentials(str(self.source))
  File "/usr/src/homeassistant/homeassistant/components/stream/__init__.py", line 97, in redact_credentials
    yurl = URL(url)
  File "/usr/local/lib/python3.10/site-packages/yarl/_url.py", line 193, in __new__
    raise ValueError(
ValueError: Invalid URL: port can't be converted to integer

Hope this helps.
Thanks.

How to give command that the beeps stops?
I tried this but didnt work:

    - service: switch.turn_on
      target:
        entity_id: switch.huiskamer_mute_mode

who knows how to turn beeps off?