hif2k1 / battery_sim

Home assistant home battery simulator - allows you to model how much energy you would save with a home battery
106 stars 13 forks source link

Only little part of the overproduction is used to charge the battery #75

Closed erwano1957 closed 1 year ago

erwano1957 commented 1 year ago

Hi, I was looking for an extension that allows the simulation of a battery and came across your development. For my current use case it seems to fit ideally. I'm trying to set up a virtual Battery (2.4 kWh) and connected it with the required sensors. All the sensors seem to be ok. When there is more production than consumption, the battery starts to charge and always exactly after 10 sec stops charging. This leads to the fact that the majority of the excess energy is fed back into the grid. What can I do to narrow down or even fix this behavior? Thanks in advance for the support.


The logging function I had yesterday already activated and have attached 3 different logs. Especially the log of 18:03 shows very nicely the phenomenon. In the meantime I have chosen a different battery type (Sonnen Eco). Please do not let this confuse you.

Additionally I have added the following screeshots

Please let me know if you need any more information. Energy_Dashboard_1 Energy_Dashboard_2 Energy_Dashboard_3 home-assistant_2023-05-15T16-03-44.358Z.log home-assistant_battery_sim_2023-05-15T20-19-53.656Z.log home-assistant_battery_sim_2023-05-16T20-05-43.220Z.log

hif2k1 commented 1 year ago

Thanks, that's helpful.

I think you are either using the wrong type of sensor as the import and export meters. The battery sim expects energy meters in kWh (not w) that is continuously increasing (cumulative). It uses that because that's what most people have. It looks like you are either using a power meter instead of energy or an energy one that resets to zero after each reading.

If you're energy meter doesn't give you that option then let me know, there are ways of converting.

On Thu, 18 May 2023, 11:15 erwano1957, @.***> wrote:

Hi, I was looking for an extension that allows the simulation of a battery and came across your development. For my current use case it seems to fit ideally. I'm trying to set up a virtual Battery (2.4 kWh) and connected it with the required sensors. All the sensors seem to be ok. When there is more production than consumption, the battery starts to charge and always exactly after 10 sec stops charging. This leads to the fact that the majority of the excess energy is fed back into the grid. What can I do to narrow down or even fix this behavior? Thanks in advance for the support.

The logging function I had yesterday already activated and have attached 3 different logs. Especially the log of 18:03 shows very nicely the phenomenon. In the meantime I have chosen a different battery type (Sonnen Eco). Please do not let this confuse you.

Additionally I have added the following screeshots

  • Energy_Dashboard_1: Todays Energy Dashboard: this shows that although the storage is not full (next picture) a lot of energy flows back into the grid.
  • Energy_Dashboard_2: Battery_sim:Sonnen Eco: showing that only 1.3 kWh flowed into the storage vs. 2.6 kWh flowed back into the grid
  • Energy_Dashboard_3: Grafana statistics: comparing "Overproduction" < back to the grid > vs Battery charging: shows that there was significant overproduction, but only ever briefly for a few seconds energy flowed into the battery

Please let me know if you need any more information. [image: Energy_Dashboard_1] https://user-images.githubusercontent.com/120573100/239193713-9ed54c09-d6c8-4e06-b757-dc38c2ce6433.jpg [image: Energy_Dashboard_2] https://user-images.githubusercontent.com/120573100/239193715-d91044cc-1968-461a-8b24-21f8021e7727.jpg [image: Energy_Dashboard_3] https://user-images.githubusercontent.com/120573100/239193716-253091d9-1187-4119-94b5-80d042be5dd9.jpg home-assistant_2023-05-15T16-03-44.358Z.log https://github.com/hif2k1/battery_sim/files/11506295/home-assistant_2023-05-15T16-03-44.358Z.log home-assistant_battery_sim_2023-05-15T20-19-53.656Z.log https://github.com/hif2k1/battery_sim/files/11506296/home-assistant_battery_sim_2023-05-15T20-19-53.656Z.log home-assistant_battery_sim_2023-05-16T20-05-43.220Z.log https://github.com/hif2k1/battery_sim/files/11506297/home-assistant_battery_sim_2023-05-16T20-05-43.220Z.log

— Reply to this email directly, view it on GitHub https://github.com/hif2k1/battery_sim/issues/75, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIZGMYE44AEO3A6TBDBL3XGXSD7ANCNFSM6AAAAAAYGGMVFQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

erwano1957 commented 1 year ago

Hi,

Ich nutze die folgenden Sensoren und kann dort keinen Fehler erkennen:

Battery Sensors:

Both as given by your integration.

Energy Sensors:

Any helf to solve this issue would be highly appreciated.

BR

Erwin

Von: hif2k1 @.> Gesendet: Mittwoch, 24. Mai 2023 09:43 An: hif2k1/battery_sim @.> Cc: erwano1957 @.>; Author @.> Betreff: Re: [hif2k1/battery_sim] Only little part of the overproduction is used to charge the battery (Issue #75)

Thanks, that's helpful.

I think you are either using the wrong type of sensor as the import and export meters. The battery sim expects energy meters in kWh (not w) that is continuously increasing (cumulative). It uses that because that's what most people have. It looks like you are either using a power meter instead of energy or an energy one that resets to zero after each reading.

If you're energy meter doesn't give you that option then let me know, there are ways of converting.

On Thu, 18 May 2023, 11:15 erwano1957, @.<mailto:@.>> wrote:

Hi, I was looking for an extension that allows the simulation of a battery and came across your development. For my current use case it seems to fit ideally. I'm trying to set up a virtual Battery (2.4 kWh) and connected it with the required sensors. All the sensors seem to be ok. When there is more production than consumption, the battery starts to charge and always exactly after 10 sec stops charging. This leads to the fact that the majority of the excess energy is fed back into the grid. What can I do to narrow down or even fix this behavior? Thanks in advance for the support.

The logging function I had yesterday already activated and have attached 3 different logs. Especially the log of 18:03 shows very nicely the phenomenon. In the meantime I have chosen a different battery type (Sonnen Eco). Please do not let this confuse you.

Additionally I have added the following screeshots

  • Energy_Dashboard_1: Todays Energy Dashboard: this shows that although the storage is not full (next picture) a lot of energy flows back into the grid.
  • Energy_Dashboard_2: Battery_sim:Sonnen Eco: showing that only 1.3 kWh flowed into the storage vs. 2.6 kWh flowed back into the grid
  • Energy_Dashboard_3: Grafana statistics: comparing "Overproduction" < back to the grid > vs Battery charging: shows that there was significant overproduction, but only ever briefly for a few seconds energy flowed into the battery

Please let me know if you need any more information. [image: Energy_Dashboard_1] https://user-images.githubusercontent.com/120573100/239193713-9ed54c09-d6c8-4e06-b757-dc38c2ce6433.jpg [image: Energy_Dashboard_2] https://user-images.githubusercontent.com/120573100/239193715-d91044cc-1968-461a-8b24-21f8021e7727.jpg [image: Energy_Dashboard_3] https://user-images.githubusercontent.com/120573100/239193716-253091d9-1187-4119-94b5-80d042be5dd9.jpg home-assistant_2023-05-15T16-03-44.358Z.log https://github.com/hif2k1/battery_sim/files/11506295/home-assistant_2023-05-15T16-03-44.358Z.log home-assistant_battery_sim_2023-05-15T20-19-53.656Z.log https://github.com/hif2k1/battery_sim/files/11506296/home-assistant_battery_sim_2023-05-15T20-19-53.656Z.log home-assistant_battery_sim_2023-05-16T20-05-43.220Z.log https://github.com/hif2k1/battery_sim/files/11506297/home-assistant_battery_sim_2023-05-16T20-05-43.220Z.log

- Reply to this email directly, view it on GitHub https://github.com/hif2k1/battery_sim/issues/75, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIZGMYE44AEO3A6TBDBL3XGXSD7ANCNFSM6AAAAAAYGGMVFQ . You are receiving this because you are subscribed to this thread.Message ID: @.<mailto:@.>>

- Reply to this email directly, view it on GitHubhttps://github.com/hif2k1/battery_sim/issues/75#issuecomment-1560610130, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4X4ZLDNED2FLOK5MKMJBKLXHW3XBANCNFSM6AAAAAAYGGMVFQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

hif2k1 commented 1 year ago

Sorry, I'm not managing to unravel this one.

Does the Tasmota SML Verbrauch_Summe sensor measure energy used in the house including energy coming from solar panels or just energy coming in from the grid? Also just to check, you're definitely using the Rückeinspeisung _Riemann kumuliert_kWh sensor not the Rückeinspeisung sensor you showed in the graph above when you configure your battery? I'm sure you are, but that would be a possible reason.

It might help clarify things if you can post a graph of the Tasmota SML Verbrauch_Summe sensor, the Rückeinspeisung _Riemann kumuliert_kWh sensor and the battery charge level from the same period.

Thanks for not giving up. If we can get this sorted it might help others as well.

erwano1957 commented 1 year ago

Hi, Please find my answers to your questions inline.

BR

Erwin

Von: hif2k1 @.> Gesendet: Montag, 5. Juni 2023 22:08 An: hif2k1/battery_sim @.> Cc: erwano1957 @.>; Author @.> Betreff: Re: [hif2k1/battery_sim] Only little part of the overproduction is used to charge the battery (Issue #75)

Sorry, I'm not managing to unravel this one.

Does the Tasmota SML Verbrauch_Summe sensor measure energy used in the house including energy coming from solar panels or just energy coming in from the grid?

==>Its measuring all consumed energy including energy coming from the grid

Also just to check, you're definitely using the Rückeinspeisung _Riemann kumuliert_kWh sensor not the Rückeinspeisung sensor you showed in the graph above when you configure your battery? I'm sure you are, but that would be a possible reason.

==> As statet, I am using "Rückeinspeisung _Riemann kumuliert_kWh sensor"

It might help clarify things if you can post a graph of the Tasmota SML Verbrauch_Summe sensor, the Rückeinspeisung _Riemann kumuliert_kWh sensor and the battery charge level from the same period.

==>Currently the both sensors mentioned above are NOT connected to the energy dashboard but your integration is still installed and active - meaning changing status and counting energy. So I am wondering how this can be. Please find attached the requested graphs

BR and Thank You so much for your help Erwin

@.***

@.***

@.***

Thanks for not giving up. If we can get this sorted it might help others as well.

- Reply to this email directly, view it on GitHubhttps://github.com/hif2k1/battery_sim/issues/75#issuecomment-1577405400, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4X4ZLAGLPBODPHBSWU7J5DXJY4AFANCNFSM6AAAAAAYGGMVFQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

erwano1957 commented 1 year ago

Hi,

me again. As in other postings people where referring to update cycle I therefore checked my sensors once again.

  1. Tasmota SML Verbrauch_Summe sensor. Is directly coming from the Tasmoto-Wifi sensor on my meter and is measuring (kWh)

  2. The sensor: " Rückeinspeisung _Riemann kumuliert_kWh" is based on a sensor that is using the "sensor.tasmota_sml_watt_summe" (also coming from the Tasmota-Wifi sensor) and is only counting "negative" values. This values are afterwards used to do an Rieman integral on it which than will lead to the "Rückeinspeisung_Riemann_kumuliert kWh"

Frequency of updating of all above mentioned sensors is therefore based on the frequency set in Tasmota which is currently set to 10 seconds.

Hope this helps.

BR, Erwin

Von: erwin weber Gesendet: Dienstag, 6. Juni 2023 17:06 An: hif2k1/battery_sim @.>; hif2k1/battery_sim @.> Cc: Author @.***> Betreff: AW: [hif2k1/battery_sim] Only little part of the overproduction is used to charge the battery (Issue #75)

Hi, Please find my answers to your questions inline.

BR

Erwin

Von: hif2k1 @.**@.>> Gesendet: Montag, 5. Juni 2023 22:08 An: hif2k1/battery_sim @.**@.>> Cc: erwano1957 @.**@.>>; Author @.**@.>> Betreff: Re: [hif2k1/battery_sim] Only little part of the overproduction is used to charge the battery (Issue #75)

Sorry, I'm not managing to unravel this one.

Does the Tasmota SML Verbrauch_Summe sensor measure energy used in the house including energy coming from solar panels or just energy coming in from the grid?

==>Its measuring all consumed energy including energy coming from the grid

Also just to check, you're definitely using the Rückeinspeisung _Riemann kumuliert_kWh sensor not the Rückeinspeisung sensor you showed in the graph above when you configure your battery? I'm sure you are, but that would be a possible reason.

==> As statet, I am using "Rückeinspeisung _Riemann kumuliert_kWh sensor"

It might help clarify things if you can post a graph of the Tasmota SML Verbrauch_Summe sensor, the Rückeinspeisung _Riemann kumuliert_kWh sensor and the battery charge level from the same period.

==>Currently the both sensors mentioned above are NOT connected to the energy dashboard but your integration is still installed and active - meaning changing status and counting energy. So I am wondering how this can be. Please find attached the requested graphs

BR and Thank You so much for your help Erwin

@.***

@.***

@.***

Thanks for not giving up. If we can get this sorted it might help others as well.

- Reply to this email directly, view it on GitHubhttps://github.com/hif2k1/battery_sim/issues/75#issuecomment-1577405400, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4X4ZLAGLPBODPHBSWU7J5DXJY4AFANCNFSM6AAAAAAYGGMVFQ. You are receiving this because you authored the thread.Message ID: @.**@.>>

hif2k1 commented 1 year ago

OK so what I think is going on based on what you said is as follows: 1) The solar panels generate some energy 2) Some of this energy goes out to the grid and the battery sees this as "export" and charges the simulated batter 3) At the same time some of the energy is used in the house and shows up on the "Tasmota SML Verbrauch_Summe sensor". The battery sees this as energy import and discharges the battery by that amount. Overall this looks like a partial charge.

The import sensor should instead measure only energy coming in off the grid and into the system, not energy from the solar panels that is used in the house. When you have energy being generated in the solar panels and used in the house you don't want that going through the battery as it would just increase battery wear and lose some energy on the way. I hope that makes sense.

PS you can get graphs of any sensor in the history section. Thanks

erwano1957 commented 1 year ago

So, thanks to your explanations I have adjusted the assignment of the sensors and now everything works wonderfully and I have already gained first insights. Thank you very much for your advice. I think we can close this issue now. PS: I do not know how to do that