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 stopped charging and discharing during tariff 2 #91

Open icorne opened 1 year ago

icorne commented 1 year ago

What can I do to help debug this situation?

icorne commented 1 year ago

It started working again, but I am missing some numbers. Could it be related to peak/offpeak switch?

hif2k1 commented 1 year ago

If it is related to peak and off peak it should be fixed in the version just released (v1.2.0). If it's still a problem maybe post a graph of the battery charging and discharging.

icorne commented 1 year ago

I recreated a battery and it seems to be charging now

Screenshot_20230902-142007.png

icorne commented 1 year ago

The old one does not move.

Screenshot_20230902-142109.png

icorne commented 8 months ago

@hif2k1 It seems to be broken again since I've updated in 2024. Any known issues?

hif2k1 commented 8 months ago

No one else has reported this issue. Can you add the debug flag and get some debug logs (details in the readme on github). There should be a message every time you get a meter reading of how the battery is responding.

Thanks

On Mon, 8 Jan 2024 at 09:43, Ian Corne @.***> wrote:

@hif2k1 https://github.com/hif2k1 It seems to be broken again since I've updated in 2024. Any known issues?

— Reply to this email directly, view it on GitHub https://github.com/hif2k1/battery_sim/issues/91#issuecomment-1880664559, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIZGPBS4CTIWJX2QECNALYNO5TBAVCNFSM6AAAAAA4APQXFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGY3DINJVHE . You are receiving this because you were mentioned.Message ID: @.***>

icorne commented 8 months ago
image

As you can see, there IS consumption/production in tariff 2

icorne commented 8 months ago

home-assistant_2024-01-13T12-46-51.253Z.log

icorne commented 8 months ago

@hif2k1 can I reopen this?

icorne commented 7 months ago

Ok, I think I missed a change somewhere, it's working now after putting in export 1 AND 2,

Did they used to be consolidated?

hif2k1 commented 7 months ago

Literally just logged on to try and read through your log file. Not sure why it should have started working now. Let me know if it stops working again. Thanks

icorne commented 7 months ago

I was wrong @hif2k1 it's not working

hif2k1 commented 7 months ago

Looking through the log the battery is getting updates from these two sensors: sensor.energy_consumption_tarif_2 and sensor.energy_consumption_tarif_1

I don't see any time when the battery is charging up during the logged period so I can't tell about the export sensors.

It looks like it should be updating correctly in response to each of them. For some reason I haven't included the batteries actual charge level in the debug logging so I will release an update now with that included. However, I don't see how it could respond differently to the two inputs when it is receiving them exactly the same.

If you can update to the latest version and then run the logging again I can see how the batteries actual charge level is changing in response to the two inputs that would maybe show if there is a problem there, but I don't think there should be as after that point it is exactly the same code for handling the input.

hif2k1 commented 7 months ago

It might also be helpful if you can add a graph of ensor.energy_consumption_tarif_2, sensor.energy_consumption_tarif_1 and the batteries charge level from the history graph section. Something like this.

image

icorne commented 6 months ago
image image