core icon indicating copy to clipboard operation
core copied to clipboard

Solarlog update power available only during production

Open frigi83 opened this issue 1 year ago • 6 comments

The problem

The entity power available in Solarlog is only update during solar panels production. Screenshot_20240914_141427_Home Assistant

If I create a template sensor myself I receive data 24h. Maybe it's only a problem of a trigger (only update if power on solar side change).

What version of Home Assistant Core has the issue?

core-2024.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Solarlog

Link to integration documentation on our website

https://www.home-assistant.io/integrations/solarlog/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I'm new to this integration, my panels are in service since one week.

frigi83 avatar Sep 17 '24 22:09 frigi83

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 Sep 17 '24 22:09 home-assistant[bot]

Thank you for the report. I will have to look into this, as power_available should be set to 0, if no production surplus is achieved. As there is already a new version of the API library on the way (it has been merged into the dev branch but did not yet make it into the productive release), it may also be that it will be resolved with the new library.

dontinelli avatar Sep 18 '24 06:09 dontinelli

Hi there, i also have the same issue, being available power is set to "0" if there is no production. This is a unwanted sisution, because the available power is also possibly negative. Is does report the negative values as long as there is production, so the way it is now is very unwanted. Just dont set the value to 0 Schermafbeelding 2024-09-25 220251 As you can see, there was a very littlebit of production during the night and then the value of "power available" keeps reporting correct values.

pvmaldegem avatar Sep 26 '24 07:09 pvmaldegem

Hi there, i also have the same issue, being available power is set to "0" if there is no production. This is a unwanted sisution, because the available power is also possibly negative. Is does report the negative values as long as there is production, so the way it is now is very unwanted. Just dont set the value to 0 Schermafbeelding 2024-09-25 220251 As you can see, there was a very littlebit of production during the night and then the value of "power available" keeps reporting correct values.

I'm not sure I agree with not setting to 0. Why should the available power be reported, if no power is produced? According to my understanding this sensor should show, what amount of the produced power is available. If you do not produce, there is none available. If you do want to measure the power consumed from the grid, you could use the respective sensor. Perhaps you could describe your use case?

dontinelli avatar Oct 04 '24 01:10 dontinelli

@frigi83, can you please confirm if the issue persists? I had no interruptions anymore since the update to 2024.10.0

dontinelli avatar Oct 05 '24 11:10 dontinelli

@frigi83, can you please confirm if the issue persists? I had no interruptions anymore since the update to 2024.10.0

I wasn't on 2024.10.x, but now I am. It work, now it's away available. But I don't understand why it should go to 0 if there is no solar production. So the sensor is not much useful, with a +/- value you can use it in a card like Power Flow Card Plus.

PS: It's nice that with the new release there is a device for every solar-log devices (I have two measurement unit for two apartments)

frigi83 avatar Oct 06 '24 19:10 frigi83

have a similar problem even though it lasts all day. With the new version (apart from the different entity names that destroyed my history) I detect continuous timeouts on the solar-log with continuous entities not available that never occurred before the latest updates. Result now this integration is unusable... if it can help I see this in the log: Recorder: homeassistant.components.solarlog.coordinator Source: helpers/update_coordinator.py:354 Integration: Solar-Log (documentation, problems) First occurrence: 06:51:45 (24 occurrences) Last recording: 08:41:25

Unexpected error fetching solarlog data Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1022, in start message, payload = await protocol.read() # type: ignore[union-attr] ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 643, in read await self._waiter 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 104 , in execute_http_request response = await self.session.post( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 686, in _request await resp.start(conn) File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1017, in start with self._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 93, in update_data data.inverter_data = await self.update_inverter_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-package s/solarlog_cli/solarlog_connector.py", line 136, in update_inverter_data raw_data = await self.client.get_energy_per_inverter() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 195, in get_energy_per_inverter await self.execute_http_request('{ "854": null }') File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 111, 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.2.220 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.2.220

radeon79 avatar Oct 15 '24 06:10 radeon79

Hi dontinelli,

here i descirbe my case : we have 600 solarpanles, a smaal wind turbine, several fans for cooling potatoes, a heatpump to heat the house and a couple more electric devices, all connected. we want to make use of our own power as good as possible, this means keeping the amount of power from the gris as low as possible, but sometimes we just need power even the produced power is not enough to cope for hat. So stall times, day and night, we need to know the net amount of power ( positive or negative) available to control our devices. if the senor goos to "0" becourse of some rule you implemented in the calculation, there is a lot of valuable data/information lost. The sensor is unusable for me that way. I now calculate the available power myself by just substtracting ac power with consumption . That is what you need.

Thanks for the integration anyway!

Regards Pieter.

Op vr 4 okt 2024 om 03:25 schreef dontinelli @.***>:

Hi there, i also have the same issue, being available power is set to "0" if there is no production. This is a unwanted sisution, because the available power is also possibly negative. Is does report the negative values as long as there is production, so the way it is now is very unwanted. Just dont set the value to 0 Schermafbeelding.2024-09-25.220251.jpg (view on web) https://github.com/user-attachments/assets/0fc1900f-bd06-420d-afb4-fd6236b48db2 As you can see, there was a very littlebit of production during the night and then the value of "power available" keeps reporting correct values.

I'm not sure I agree with not setting to 0. Why should the available power be reported, if no power is produced? According to my understanding this sensor should show, what amount of the produced power is available. If you do not produce, there is none available. If you do want to measure the power consumed from the grid, you could use the respective sensor. Perhaps you could describe your use case?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/126156#issuecomment-2392615129, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKW3ZN2IPSVRNRIG36KOVNTZZXU63AVCNFSM6AAAAABOMMSWGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJSGYYTKMJSHE . You are receiving this because you commented.Message ID: @.***>

pvmaldegem avatar Oct 15 '24 06:10 pvmaldegem

have a similar problem even though it lasts all day. With the new version (apart from the different entity names that destroyed my history) I detect continuous timeouts on the solar-log with continuous entities not available that never occurred before the latest updates. Result now this integration is unusable... if it can help I see this in the log: Recorder: homeassistant.components.solarlog.coordinator Source: helpers/update_coordinator.py:354 Integration: Solar-Log (documentation, problems) First occurrence: 06:51:45 (24 occurrences) Last recording: 08:41:25

Unexpected error fetching solarlog data Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1022, in start message, payload = await protocol.read() # type: ignore[union-attr] ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 643, in read await self._waiter 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 104 , in execute_http_request response = await self.session.post( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 686, in _request await resp.start(conn) File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1017, in start with self._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 93, in update_data data.inverter_data = await self.update_inverter_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-package s/solarlog_cli/solarlog_connector.py", line 136, in update_inverter_data raw_data = await self.client.get_energy_per_inverter() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 195, in get_energy_per_inverter await self.execute_http_request('{ "854": null }') File "/usr/local/lib/python3.12/site-packages/solarlog_cli/solarlog_client.py", line 111, 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.2.220 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.2.220

@radeon79, your problem is not related to the above but due to a timeout error. The latter should be resolved with the increased timeout (https://github.com/home-assistant/core/pull/128293, should be merged in upcoming 2024.10.3)

dontinelli avatar Oct 15 '24 07:10 dontinelli

Hi dontinelli, here i descirbe my case : we have 600 solarpanles, a smaal wind turbine, several fans for cooling potatoes, a heatpump to heat the house and a couple more electric devices, all connected. we want to make use of our own power as good as possible, this means keeping the amount of power from the gris as low as possible, but sometimes we just need power even the produced power is not enough to cope for hat. So stall times, day and night, we need to know the net amount of power ( positive or negative) available to control our devices. if the senor goos to "0" becourse of some rule you implemented in the calculation, there is a lot of valuable data/information lost. The sensor is unusable for me that way. I now calculate the available power myself by just substtracting ac power with consumption . That is what you need. Thanks for the integration anyway! Regards Pieter. Op vr 4 okt 2024 om 03:25 schreef dontinelli @.>: Hi there, i also have the same issue, being available power is set to "0" if there is no production. This is a unwanted sisution, because the available power is also possibly negative. Is does report the negative values as long as there is production, so the way it is now is very unwanted. Just dont set the value to 0 Schermafbeelding.2024-09-25.220251.jpg (view on web) https://github.com/user-attachments/assets/0fc1900f-bd06-420d-afb4-fd6236b48db2 As you can see, there was a very littlebit of production during the night and then the value of "power available" keeps reporting correct values. I'm not sure I agree with not setting to 0. Why should the available power be reported, if no power is produced? According to my understanding this sensor should show, what amount of the produced power is available. If you do not produce, there is none available. If you do want to measure the power consumed from the grid, you could use the respective sensor. Perhaps you could describe your use case? — Reply to this email directly, view it on GitHub <#126156 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKW3ZN2IPSVRNRIG36KOVNTZZXU63AVCNFSM6AAAAABOMMSWGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJSGYYTKMJSHE . You are receiving this because you commented.Message ID: @.>

@pvmaldegem, I think your solution is exactly the way to go. I also have template sensors to calculate the energy returned to the grid and the energy consumed from the grid. As you can now add template sensors to devices, they even are displayed next to the other sensors in the device overview.

On a side note: According to my understanding integrations shouldn't provide calculated values at all. I guess the power_available sensor would not be accepted for a new integration but is only accepted in order not to break existing setups.

dontinelli avatar Oct 15 '24 07:10 dontinelli

@frigi83, can you please confirm if the issue persists? I had no interruptions anymore since the update to 2024.10.0

I wasn't on 2024.10.x, but now I am. It work, now it's away available. But I don't understand why it should go to 0 if there is no solar production. So the sensor is not much useful, with a +/- value you can use it in a card like Power Flow Card Plus.

PS: It's nice that with the new release there is a device for every solar-log devices (I have two measurement unit for two apartments)

I'm not sure if I understand you correctly. I have Power Flow Card Plus, with a power sensor for the net consumption (I directly use the power sensor of the meter, which has been added as device with the new release) and one for the solar production. Works perfectly fine for me. I also created a new PR, which should enable additional sensors for the energy dashboards.

As the problem has been resolved, I will close this issue.

Anyone, free to open a feature request in the community forum, where is the appropriate place to discuss the use case of the power_available sensor.

dontinelli avatar Oct 15 '24 07:10 dontinelli

@home-assistant close

dontinelli avatar Oct 15 '24 07:10 dontinelli