Kleinrotti / hass-senertec

Home Assistant custom component integration for Senertec energy units.
Apache License 2.0
1 stars 1 forks source link

Unexpected error at login #11

Closed pthoelken closed 1 month ago

pthoelken commented 1 month ago

After I tried to login with my credentials I've got the following error message. But password and e-mail was correct. I've also changed the password to another one which has no special chars. Without success.

image
Kleinrotti commented 1 month ago

Please check the home assistant log and append the error message here.

pthoelken commented 1 month ago

Sorry, here it is. We have a Dachs with 5KW

2024-09-11 07:43:34.822 DEBUG (MainThread) [custom_components.senertec.config_flow] Trying to connect to senertec during setup
2024-09-11 07:43:34.822 INFO (SyncWorker_16) [senertec.client] Logging in..
2024-09-11 07:43:35.197 INFO (SyncWorker_16) [senertec.client] Login was successful.
2024-09-11 07:43:35.198 INFO (SyncWorker_2) [senertec.client] Initializing senertec platform...
2024-09-11 07:43:35.470 ERROR (MainThread) [custom_components.senertec.config_flow] Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/senertec/config_flow.py", line 78, in async_step_user
    info = await validate_connection(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/senertec/config_flow.py", line 45, in validate_connection
    await hass.async_add_executor_job(client.connectUnit, units[0].serial)
                                                          ~~~~~^^^
IndexError: list index out of range
2024-09-11 07:43:35.498 INFO (senertec-websocket) [websocket] Websocket connected
2024-09-11 07:43:35.498 INFO (senertec-websocket) [senertec.client] Connected to Senertec websocket
Kleinrotti commented 1 month ago

The login works as I can see. But there are no heating units returned. Seems like the same strange thing as discussed here Unfortunately I have no solution for it because I don't own these heating units and therefore I can't test furthermore.

Kleinrotti commented 1 month ago

If you have time for debugging with the py-senertec library, I can create a test release with more debugging information. Then we can take a look deeper what's the problem is.

pthoelken commented 1 month ago

Maybe the reason for that is bc our Dachs is marked as offline in the Dachs Portal. We are in contact with our service provider about this situation.

pthoelken commented 1 month ago

The reason for this error was, that the unit was not implemented completly. Now after our service provider configured this in dachsportal, it works fine.