core icon indicating copy to clipboard operation
core copied to clipboard

Solarlog integration not working

Open RaSch75 opened this issue 1 year ago • 18 comments

The problem

Solarlog integration does not anymore provide the entities after core update. Restoring the previous version helps.

What version of Home Assistant Core has the issue?

2024.10.0

What was the last working version of Home Assistant Core?

2024.09.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Solarlog

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

RaSch75 avatar Oct 03 '24 15:10 RaSch75

Hey there @ernst79, @dontinelli, mind taking a look at this issue as it has been labeled with an integration (solarlog) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of solarlog can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign solarlog Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


solarlog documentation solarlog source (message by IssueLinks)

home-assistant[bot] avatar Oct 03 '24 16:10 home-assistant[bot]

Most likely a duplicate of https://github.com/home-assistant/core/issues/127380

Please provide your logs to see if this is the same issue or not.

Ernst79 avatar Oct 03 '24 16:10 Ernst79

@home-assistant add-label needs-more-information

dontinelli avatar Oct 05 '24 11:10 dontinelli

I have the same issue. There is no log as already returned to the prior version of ha. Solarlog is not initializing and error is "string index out of range" App is offline Even after you reinstall it refuses to communicate with the device.

deveylder avatar Oct 05 '24 13:10 deveylder

Hi, I have the same issue.

Here is the log. Hope that helps:

Logger: homeassistant.components.solarlog.coordinator Quelle: helpers/update_coordinator.py:354 Integration: Solar-Log (Dokumentation, Probleme) Erstmals aufgetreten: 03:01:07 (1 Vorkommnisse) Zuletzt protokolliert: 03:01:07

Unexpected error fetching solarlog data Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 659, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 557, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1002, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1305, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1061, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection sock = await _connect_sock( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock await loop.sock_connect(sock, address) File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect return await fut ^^^^^^^^^ asyncio.exceptions.CancelledError

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

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 102, in execute_http_request response = await self.session.post( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 575, in _request with timer: File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 736, in exit raise asyncio.TimeoutError from exc_val TimeoutError

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/solarlog/coordinator.py", line 70, in _async_update_data data = await self.solarlog.update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_connector.py", line 78, in update_data data: SolarlogData = await self.client.get_basic_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 152, in get_basic_data await self.execute_http_request(SOLARLOG_REQUEST_PAYLOAD) File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 109, in execute_http_request raise SolarLogConnectionError(msg) from exception solarlog_cli.solarlog_exceptions.SolarLogConnectionError: Timeout occurred while connecting to Solar-Log at http://192.168.178.70

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/solarlog/coordinator.py", line 75, in _async_update_data raise ConfigEntryNotReady(ex) from ex homeassistant.exceptions.ConfigEntryNotReady: Timeout occurred while connecting to Solar-Log at http://192.168.178.70

Tobi-1234 avatar Oct 05 '24 14:10 Tobi-1234

Hi, I have the same issue.

Here is the log. Hope that helps:

Logger: homeassistant.components.solarlog.coordinator Quelle: helpers/update_coordinator.py:354 Integration: Solar-Log (Dokumentation, Probleme) Erstmals aufgetreten: 03:01:07 (1 Vorkommnisse) Zuletzt protokolliert: 03:01:07

Unexpected error fetching solarlog data Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 659, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 557, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1002, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1305, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1061, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection sock = await _connect_sock( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock await loop.sock_connect(sock, address) File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect return await fut ^^^^^^^^^ asyncio.exceptions.CancelledError

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

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 102, in execute_http_request response = await self.session.post( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 575, in _request with timer: File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 736, in exit raise asyncio.TimeoutError from exc_val TimeoutError

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/solarlog/coordinator.py", line 70, in _async_update_data data = await self.solarlog.update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_connector.py", line 78, in update_data data: SolarlogData = await self.client.get_basic_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 152, in get_basic_data await self.execute_http_request(SOLARLOG_REQUEST_PAYLOAD) File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 109, in execute_http_request raise SolarLogConnectionError(msg) from exception solarlog_cli.solarlog_exceptions.SolarLogConnectionError: Timeout occurred while connecting to Solar-Log at http://192.168.178.70

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/solarlog/coordinator.py", line 75, in _async_update_data raise ConfigEntryNotReady(ex) from ex homeassistant.exceptions.ConfigEntryNotReady: Timeout occurred while connecting to Solar-Log at http://192.168.178.70

According to your log there was a TimeoutError while retrieving basic data. Furthermore, it was only reported once around 3am. This is the time at least my SolarLog restarts. So the log provided does not seem to be connected. Do you have additional log entries that could be helpful?

dontinelli avatar Oct 05 '24 15:10 dontinelli

Unfortunately not, as I just update HA to 2024.10.1. As soon as I have a new one, I will post it here. But after switching to 2024.10 there are a lot of entities not available which were working before the update… IMG_1323

Tobi-1234 avatar Oct 05 '24 15:10 Tobi-1234

same hiere since 204.20.1

stguz avatar Oct 05 '24 21:10 stguz

Same for me… a lot of entities no longer receive date:

IMG_4752

Seems because entities got duplicated after update to 10.0:

IMG_4753

Now data only go to the duplicated entities.

Going back to 09.3 via recovery from backup fixed it.

Now wondering if same would happen when updating to 10.1.

PEPITO82 avatar Oct 06 '24 10:10 PEPITO82

Ok, the issue is not that the sensors are not available but that apparently with the update the integration has created new entities (that are available) but does no more provide data for the old entities (that therefore became unavailable). @RaSch75, @Tobi-1234, @stguz : can you confirm this behavior for your setup as well?

I try to find out what lead to this duplication and if it can be prevented/the old entities migrated.

dontinelli avatar Oct 06 '24 12:10 dontinelli

"with the update the integration has created new entities" Well, even when I delete the SolarLog integration and then re-install it, the same error shows up: "string index out of range”. If it was about setting up new entities, this error wouldn't show up anymore...

toyota-axel avatar Oct 06 '24 13:10 toyota-axel

"with the update the integration has created new entities" Well, even when I delete the SolarLog integration and then re-install it, the same error shows up. If it was about setting up new entities, this error wouldn't show up anymore...

@toyota-axel, what error are you speaking about? I think there are two issues that get mixed up...

dontinelli avatar Oct 06 '24 13:10 dontinelli

Ok, the issue is not that the sensors are not available but that apparently with the update the integration has created new entities (that are available) but does no more provide data for the old entities (that therefore became unavailable). @RaSch75, @Tobi-1234, @stguz : can you confirm this behavior for your setup as well?

I try to find out what lead to this duplication and if it can be prevented/the old entities migrated.

Yes, I can confirm, I found the duplicated ones and deleted the old one's. Seems that it's working again, but tomorrow, when the sun is shining I can tell more :) Thanks @PEPITO82 for the hint!

Tobi-1234 avatar Oct 06 '24 20:10 Tobi-1234

I think for those who have no issue in loosing the statistics history, the workaround of @Tobi-1234 is a quick (and dirty) fix. I'm currently working on a fix and hope that it will also be possible to migrate the statistics. In any event it should be possible to restore a backup before upgrading so that only the history between the backup and the upgrade should get lost.

dontinelli avatar Oct 06 '24 20:10 dontinelli

Ich hatte das gleiche Problem. Da ich auf den Statistikverlauf verzichten kann, habe ich die Solarlog-Integration komplett gelöscht. Wenn ich versuche die Integration neu hinzuzufügen dauert das nur 3 Sekunden und dann sieht es so aus: Bildschirmfoto 2024-10-07 um 09 59 16

Nach Löschen der Integration, Neustart von HA und wieder Hinzufügen ändert sich nichts.

hardl1 avatar Oct 07 '24 08:10 hardl1

Ich hatte das gleiche Problem. Da ich auf den Statistikverlauf verzichten kann, habe ich die Solarlog-Integration komplett gelöscht. Wenn ich versuche die Integration neu hinzuzufügen dauert das nur 3 Sekunden und dann sieht es so aus: Bildschirmfoto 2024-10-07 um 09 59 16

Nach Löschen der Integration, Neustart von HA und wieder Hinzufügen ändert sich nichts.

https://github.com/home-assistant/core/issues/127380

dontinelli avatar Oct 07 '24 08:10 dontinelli

For me it is the same issue. / Habe das gleiche Problem. New entities have been created but can't deliver data. Restored a backup of Core-2024.9.3 resulting in Solarlog entities working again. I won't update to core-2024.10.1 until it works again.

lxto avatar Oct 07 '24 10:10 lxto

Have the same problem since HA Version 2024.10 image

What is the solution now? What shall I do?

zolldi avatar Oct 07 '24 13:10 zolldi

The solution is to wait till the next update. The fix by donetelli has been merged, so it should be included in the next release.

Ernst79 avatar Oct 07 '24 14:10 Ernst79

The duplication bug will be fixed with 2024.10.2 (coming up shortly). In fact, the unique_id of the sensors will be restored to the old value. For those who already updated to 2024.10.0/1 and have deleted the (old) duplicate entries, this will lead again to a duplication (so please do not report an issue for this one). For users that care for the statistics, please remain on 2024.9 (or restore respective backup) and directly upgrade to 2024.10.2.

dontinelli avatar Oct 08 '24 06:10 dontinelli

@dontinelli to be sure, if I've already upgraded but not delete the entries, the next upgrade will restore everything ?

A big thanks for the correction !

zorrobiwan avatar Oct 08 '24 09:10 zorrobiwan

@dontinelli to be sure, if I've already upgraded but not delete the entries, the next upgrade will restore everything ?

A big thanks for the correction !

Next upgrade will "reactivate" the old entities. So if you already upgraded, you might want to delete the duplicate ones that have been created with 2024.10.0.

dontinelli avatar Oct 09 '24 13:10 dontinelli

ok thx

zorrobiwan avatar Oct 09 '24 14:10 zorrobiwan

Hi, with 2024.10.2 entities work again. But they are 10 times to high. For today i have 74.899,273 kWh instead of 7.489,927 kWh for the entitie sensor.solarlog_ertrag_insgesamt

rantamplan1964 avatar Oct 12 '24 14:10 rantamplan1964

Hi, with 2024.10.2 entities work again. But they are 10 times to high. For today i have 74.899,273 kWh instead of 7.489,927 kWh for the entitie sensor.solarlog_ertrag_insgesamt

Can you please open a new issue for this and provide as much info as possible (e.g. model number, comparison of HA values and values in solarlog web portal)?

dontinelli avatar Oct 12 '24 14:10 dontinelli

Here is the new issue: https://github.com/home-assistant/core/issues/128243

rantamplan1964 avatar Oct 12 '24 15:10 rantamplan1964