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
118 stars 45 forks source link

AS25S2SF1FA-S in 2x1 - Errors in HA #74

Closed Kazionauta closed 1 year ago

Kazionauta commented 1 year ago

Hello, I have AS25S2SF1FA-S in 2x1 configuration with one outdoor unit. Same device with different color is mentioned in [README] and while I have been able to add my units to HA, I can't quite control them. Trying to run a particular mode (e.g. heating) works but only for a moment, then HA shows after a few seconds that the unit has switched off. In fact, the unit is still running at the set parameters, but HA does not see this. In addition, it is not possible to change the swing at all. If I switch on the units from the remote control or from the app, Hass does not detect them starting and shows that they are off.

`[21:29:55] INFO: Home Assistant Core finish process exit code 100

2023-04-11 23:30:00.157 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hon which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2023-04-11 23:30:59.833 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'click' when rendering '{{ value_json.click }}'

2023-04-11 23:34:00.358 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'click' when rendering '{{ value_json.click }}'

2023-04-11 23:36:00.939 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547286007136] Allowed values 5

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service

await hass.services.async_call(

File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call

task.result()

File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service

await service.entity_service_call(

File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call

future.result()  # pop exception if have

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call

await coro

File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call

await result

File "/config/custom_components/hon/climate.py", line 382, in async_set_swing_mode

await self._device.settings_command(parameters).send()

File "/config/custom_components/hon/device.py", line 142, in settings_command

self.update_command(command, parameters)

File "/config/custom_components/hon/device.py", line 136, in update_command

command.parameters.get(key).value = parameters.get(key)

File "/config/custom_components/hon/parameter.py", line 110, in value

raise ValueError(f"Allowed values {self._value}")

ValueError: Allowed values 5

2023-04-11 23:36:13.464 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547286007136] Allowed values 5

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service

await hass.services.async_call(

File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call

task.result()

File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service

await service.entity_service_call(

File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call

future.result()  # pop exception if have

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call

await coro

File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call

await result

File "/config/custom_components/hon/climate.py", line 354, in async_set_fan_mode

await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, ClimateFanMode.HON_FAN_OFF)}).send()

File "/config/custom_components/hon/device.py", line 142, in settings_command

self.update_command(command, parameters)

File "/config/custom_components/hon/device.py", line 136, in update_command

command.parameters.get(key).value = parameters.get(key)

File "/config/custom_components/hon/parameter.py", line 110, in value

raise ValueError(f"Allowed values {self._value}")

ValueError: Allowed values 5

2023-04-11 23:36:22.010 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547286007136] Allowed values 5

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service

await hass.services.async_call(

File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call

task.result()

File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service

await service.entity_service_call(

File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call

future.result()  # pop exception if have

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call

await coro

File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call

await result

File "/config/custom_components/hon/climate.py", line 382, in async_set_swing_mode

await self._device.settings_command(parameters).send()

File "/config/custom_components/hon/device.py", line 142, in settings_command

self.update_command(command, parameters)

File "/config/custom_components/hon/device.py", line 136, in update_command

command.parameters.get(key).value = parameters.get(key)

File "/config/custom_components/hon/parameter.py", line 110, in value

raise ValueError(f"Allowed values {self._value}")

ValueError: Allowed values 5`

gvigroux commented 1 year ago

Ok I see the problem. Let me fix that soon

Kazionauta commented 1 year ago

Great, thank you for your work! If you will need logs or test let me know here.

gvigroux commented 1 year ago

I made the fix. Can you please test again ?

Kazionauta commented 1 year ago

It's so much better! Thank you! The AC does not switch off by itself, it also detects changes made by the remote control or the android app. Unfortunately the swing and fan level controls do not work, can you do something about this?

[22:38:41] INFO: Home Assistant Core finish process exit code 100 2023-04-13 00:38:46.305 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hon which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-04-13 00:39:05.858 ERROR (MainThread) [frontend.js.latest.202304061] :0:0 ResizeObserver loop completed with undelivered notifications. 2023-04-13 00:40:50.019 WARNING (MainThread) [homeassistant.components.cloud.google_config] Error reporting state - 5: Requested entity was not found. 2023-04-13 00:43:33.924 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [7] because not in range [['2', '4', '5', '6', '8']]. Use default instead. 2023-04-13 00:44:27.561 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [8] because not in range [['2', '4', '5', '6', '7', '8']]. Use default instead. 2023-04-13 00:44:27.573 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionHorizontal] with value [7] because not in range [['0', '3', '4', '5', '6', '7']]. Use default instead. 2023-04-13 00:44:54.350 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547995267856] name 'ClimateFanMode' is not defined Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, ClimateFanMode.HON_FAN_OFF)}).send() NameError: name 'ClimateFanMode' is not defined 2023-04-13 00:45:02.992 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [8] because not in range [['2', '4', '5', '6', '7', '8']]. Use default instead. 2023-04-13 00:45:02.994 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionHorizontal] with value [7] because not in range [['0', '3', '4', '5', '6', '7']]. Use default instead. 2023-04-13 00:45:08.578 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionHorizontal] with value [7] because not in range [['0', '3', '4', '5', '6', '7']]. Use default instead. 2023-04-13 00:45:17.377 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [8] because not in range [['2', '4', '5', '6', '7', '8']]. Use default instead. 2023-04-13 00:47:44.007 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547995267856] name 'ClimateFanMode' is not defined Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, ClimateFanMode.HON_FAN_OFF)}).send() NameError: name 'ClimateFanMode' is not defined 2023-04-13 00:48:05.748 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionHorizontal] with value [7] because not in range [['0', '3', '4', '5', '6', '7']]. Use default instead. 2023-04-13 00:48:44.013 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windSpeed] with value [5] because not in range [['1', '2', '3']]. Use default instead. 2023-04-13 00:49:08.941 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windSpeed] with value [5] because not in range [['1', '2', '3']]. Use default instead. 2023-04-13 00:49:20.791 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547995267856] name 'ClimateFanMode' is not defined Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, ClimateFanMode.HON_FAN_OFF)}).send() NameError: name 'ClimateFanMode' is not defined 2023-04-13 00:49:46.614 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [8] because not in range [['2', '4', '5', '6', '7', '8']]. Use default instead. 2023-04-13 00:49:46.619 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionHorizontal] with value [7] because not in range [['0', '3', '4', '5', '6', '7']]. Use default instead. 2023-04-13 00:50:56.304 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [8] because not in range [['2', '4', '5', '6', '7', '8']]. Use default instead. 2023-04-13 00:50:56.309 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionHorizontal] with value [7] because not in range [['0', '3', '4', '5', '6', '7']]. Use default instead. 2023-04-13 00:51:17.045 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [8] because not in range [['2', '4', '5', '6', '7', '8']]. Use default instead. 2023-04-13 00:51:39.514 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547995267856] name 'ClimateFanMode' is not defined Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, ClimateFanMode.HON_FAN_OFF)}).send() NameError: name 'ClimateFanMode' is not defined 2023-04-13 00:53:26.065 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionVertical] with value [8] because not in range [['2', '4', '5', '6', '7', '8']]. Use default instead. 2023-04-13 00:53:26.071 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windDirectionHorizontal] with value [7] because not in range [['0', '3', '4', '5', '6', '7']]. Use default instead.

gvigroux commented 1 year ago

Cool :) I will fix it as well quickly.

gvigroux commented 1 year ago

Should work now :) I'm closing the ticket. please reopen if it's not working

Kazionauta commented 1 year ago

Swing is working now, thank you once more, but there is a problem with fan speed. Can you look at that? [21:55:49] INFO: Home Assistant Core finish process exit code 100 2023-04-13 23:55:54.096 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hon which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-04-13 23:56:09.876 ERROR (MainThread) [snitun.client.client_peer] Challenge/Response error with SniTun server (0 bytes read on a total of 32 expected bytes) 2023-04-13 23:56:09.884 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server 2023-04-13 23:56:14.512 ERROR (MainThread) [frontend.js.latest.202304110] :0:0 ResizeObserver loop completed with undelivered notifications. 2023-04-14 00:00:25.097 WARNING (MainThread) [homeassistant.components.cloud.google_config] Error reporting state - 5: Requested entity was not found. 2023-04-14 00:00:40.424 ERROR (MainThread) [frontend.js.latest.202304110] :0:0 ResizeObserver loop completed with undelivered notifications. 2023-04-14 00:01:28.100 ERROR (MainThread) [frontend.js.latest.202304110] :0:0 ResizeObserver loop completed with undelivered notifications. 2023-04-14 00:02:13.789 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547684598736] 'dict' object has no attribute 'FAN_MEDIUM' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, CLIMATE_FAN_MODE.FAN_MEDIUM)}).send() AttributeError: 'dict' object has no attribute 'FAN_MEDIUM' 2023-04-14 00:04:17.676 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547684598736] 'dict' object has no attribute 'FAN_MEDIUM' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, CLIMATE_FAN_MODE.FAN_MEDIUM)}).send() AttributeError: 'dict' object has no attribute 'FAN_MEDIUM' 2023-04-14 00:05:01.579 WARNING (MainThread) [custom_components.hon.device] Unable to update parameter [windSpeed] with value [5] because not in range ['1', '2', '3']. Use default instead. 2023-04-14 00:05:30.189 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547684598736] 'dict' object has no attribute 'FAN_MEDIUM' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, CLIMATE_FAN_MODE.FAN_MEDIUM)}).send() AttributeError: 'dict' object has no attribute 'FAN_MEDIUM' 2023-04-14 00:05:42.062 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547684598736] 'dict' object has no attribute 'FAN_MEDIUM' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/config/custom_components/hon/climate.py", line 350, in async_set_fan_mode await self._device.settings_command({'windSpeed':CLIMATE_FAN_MODE.get(fan_mode, CLIMATE_FAN_MODE.FAN_MEDIUM)}).send() AttributeError: 'dict' object has no attribute 'FAN_MEDIUM'

gvigroux commented 1 year ago

Should work now! Sorry about that :(

Kazionauta commented 1 year ago

Don't apologise! You're doing a great job and I'm very grateful to you! I have tested it and everything works great now. Thank you!

gvigroux commented 1 year ago

👍