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

Failed to setup #102

Closed KevinVeenman closed 7 months ago

KevinVeenman commented 11 months ago

After adding the repository through HACS and restarting, adding the account (HON, with supported devices, location Europe) the account initializes and then fails to set up. Multiple restarts later and re-adding the repo no different result. Directly in the HON app, all works as expected.

Any thoughts?

image Home Assistant 2023.7.3

Log:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 390, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hon/init.py", line 71, in async_setup_entry coordinator = await hon.async_get_coordinator(appliance) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hon/hon.py", line 90, in async_get_coordinator coordinator = HonBaseCoordinator( self._hass, self, appliance) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hon/base.py", line 34, in init self._type_id = appliance["applianceTypeId"]


KeyError: 'applianceTypeId'
hajtuJ commented 11 months ago

Same issue happen for me. I did provide correct password and username but still this error occur.

gvigroux commented 11 months ago

Ok I know how to fix it, I guess there is an incorrect entry somewhere.

@hajtuJ do you have the same error?

KevinVeenman commented 11 months ago

Ok I know how to fix it, I guess there is an incorrect entry somewhere.

@hajtuJ do you have the same error?

Thanks for looking into this. Lemme know if I can support you with a donation of a "cup of coffee" :)

gvigroux commented 11 months ago

Hi @KevinVeenman, I just made an update. Can you please test and tell me the result ? at minimum you should have a different log with more info.

KevinVeenman commented 10 months ago

Hey @gvigroux, thanks for the update. Unfortunately no success just yet. I get the following log message (see below).

This error originated from a custom integration.

Logger: homeassistant.config_entries Source: custom_components/hon/device.py:20 Integration: hOn (documentation, issues) First occurred: 10:51:13 PM (1 occurrences) Last logged: 10:51:13 PM

Error setting up entr [LOGIN EMAIL] for hon Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 390, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hon/init.py", line 72, in async_setup_entry coordinator.device = HonDevice(hon, coordinator, appliance) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hon/device.py", line 20, in init self._type_id = appliance["applianceTypeId"]


KeyError: 'applianceTypeId'
gvigroux commented 10 months ago

Thank for your support :) I've decided to have a more strict approach, so you should not have any issue anymore (but maybe some devices will not appears).

If one device is missing after loading the integration:

  1. please add these lines in you configuration.yaml and reboot
logger:
  logs:
    custom_components.hon: debug
  1. after the reboot, look at the log and share the first log called "All appliances:"

Other question, do you have devices using Farenheit?

gvigroux commented 10 months ago

@KevinVeenman , @hajtuJ can you please do a new test?

gvigroux commented 7 months ago

I'm closing this due to lack of feedback