CyrilP / hass-deltadore-tydom-component

Delta Dore Tydom Home Assistant custom component
MIT License
12 stars 3 forks source link

Can't add integration - Unknown error #77

Closed Nic062 closed 6 months ago

Nic062 commented 7 months ago

System Health details

System Information

version core-2024.4.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.1.73-haos-raspi
arch aarch64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4714 Installed Version | 1.34.0 Stage | running Available Repositories | 1402 Downloaded Repositories | 10
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.04.0 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 56.5 GB disk_used | 40.3 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.8.0), Log Viewer (0.17.0), Duck DNS (1.17.0), AdGuard Home (5.0.7), Grafana (9.2.2), Terminal & SSH (9.13.0), Zigbee2MQTT (1.36.1-1), Home Assistant Google Drive Backup (0.112.1), Mosquitto broker (6.4.0), tydom2mqtt (3.4.3)
Dashboards dashboards | 2 -- | -- resources | 7 views | 13 mode | storage
Recorder oldest_recorder_run | 24 avril 2024 à 18:32 -- | -- current_recorder_run | 27 avril 2024 à 11:33 estimated_db_size | 7393.04 MiB database_engine | sqlite database_version | 3.44.2

Checklist

Describe the issue

Hello,

After installing the component, I've noticed that I can't add the integration. When I enter all my information (which is valid, by the way) and validate, I get an "Unknown" error.

For information, I used to use the tydom2mqtt module, which is now deactivated, but I'd like to use your component.

I've checked my credentials and it's working fine.

bug

Reproduction steps

  1. add this repository into HACS
  2. download the integration from HACS
  3. add new integration from setting-> device & services -> add integration and choose Delta Dore Tydom
  4. data completion: user email, user password, mac address, local ip address or mediation.tydom.com address

Debug logs

Enregistreur: custom_components.deltadore_tydom
Source: custom_components/deltadore_tydom/config_flow.py:154
intégration: Delta Dore TYDOM (documentation, problèmes)
S'est produit pour la première fois: 11:36:26 (1 occurrences)
Dernier enregistrement: 11:36:26
Unknown error

Traceback (most recent call last):
  File "/config/custom_components/deltadore_tydom/tydom/tydom_client.py", line 178, in async_get_credentials
    raise TydomClientApiClientAuthenticationError(
custom_components.deltadore_tydom.tydom.tydom_client.TydomClientApiClientAuthenticationError: Tydom credentials not found

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

Traceback (most recent call last):
  File "/config/custom_components/deltadore_tydom/config_flow.py", line 154, in async_step_user
    user_input = await validate_input(self.hass, user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deltadore_tydom/config_flow.py", line 90, in validate_input
    password = await hub.Hub.get_tydom_credentials(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deltadore_tydom/hub.py", line 119, in get_tydom_credentials
    return await TydomClient.async_get_credentials(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deltadore_tydom/tydom/tydom_client.py", line 191, in async_get_credentials
    raise TydomClientApiClientError(
custom_components.deltadore_tydom.tydom.tydom_client.TydomClientApiClientError: Something really wrong happened!

Diagnostics dump

No response

CyrilP commented 6 months ago

Hi, it looks like the problem is due to the tydom gateway not having a password. can you please change your configuration.yaml and set the integration logs to debug and send me the logs you have when you submit the configuration form :

logger:
  logs:
    custom_components.deltadore_tydom: debug

don't forget to hide your login and password !

Nic062 commented 6 months ago

Thanks for your reply, I've just rebooted everything and adding the integration worked this time! Many thanks to you

CyrilP commented 6 months ago

Good news ! Have fun Thanks for closing the issue