hif2k1 / battery_sim

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

Battery doesnt start to charge imidiatelly once solar has surplus on default mode #120

Closed pedromfa closed 6 months ago

pedromfa commented 6 months ago

First i want to thank the author for this amazing integration. Very very much appreciated. :)

Ive installed this a few days ago but im struggling to understand how to make it work. Basically im confused with the modes. If i activate charge only it seems to start charging the battery eventually. But i wonder if the default mode should start charging the minute i have production surplus? I also noted that if i reload the integration it changes the status, for example this morning it changed from Empty to Idle. Am i doing something wrong here or is this some kind of bug? Appreciated.

hif2k1 commented 6 months ago

Yes by default the battery charges when there is a surplus and discharge if needed. No need to use the different modes unless you are trying to charge from the grid when prices are cheap or something. I don't generally use them, just leave them off. There is a delay in the battery updating. It refreshes every 10 minutes from memory. Originally it updated instantly, but that led to rounding errors and graphs that jumped around which people didn't like so I had to change it. Now the graphs are smoother, but there is a slight delay. In terms of the energy measurements it still works out the same in the end.

I'd suggest leaving it on default mode (with the other modes turned off) for a few hours when there is some sun and see if it has charged. If not let me know and send details of the meters you have set for import and export as getting the configuration right is the most likely culprit.

The battery can be both Idle (not doing anything) and Empty at the same time. Normally if it is empty it will prioritise that as the state, but it's possible that after the restart it reported idle until it got an update. I don't think this is an error unless the battery is saying empty when it is charged up or something.

On Mon, 11 Mar 2024 at 10:09, pedromfa @.***> wrote:

First i want to thank the author for this amazing integration. Very very much appreciated. :)

Ive installed this a few days ago but im struggling to understand how to make it work. Basically im confused with the modes. If i activate charge only it seems to start charging the battery eventually. But i wonder if the default mode should start charging the minute i have production surplus? I also noted that if i reload the integration it changes the status, for example this morning it changed from Empty to Idle. Am i doing something wrong here or is this some kind of bug? Appreciated.

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

pedromfa commented 6 months ago

Thank you so much for the quick reply. I understand now and it does what you say. Very happy with this. I'm just wondering if it is possible to add a configuration to limit the max and min battery charging capacity. I believe real batteries can't be charged up to 100 nor discharged to zero. This would give an even better simulation. Keep up the great integration here, it's truly one of a kind. 😉🙏