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

Battery doesn't seem to be 'discharging' in HA #27

Closed Theredone51 closed 1 year ago

Theredone51 commented 2 years ago

battery_sim version: beb6756 HA: 2022.4.2 Supervisor: Home Assistant OS 7.6

It seems like the battery does not 'discharge' when the state changes from charging to discharging. Only when the battery start charging again the next day, does the battery reset to 0. image image

What it used to look like before: image

hif2k1 commented 2 years ago

Are you getting any errors? I'm not sure that its resetting or just not giving readings while it's discharging.

On Tue, 12 Apr 2022, 15:10 Theredone51, @.***> wrote:

battery_sim version: beb6756 https://github.com/hif2k1/battery_sim/commit/beb675647bd197afcd918b7d5da2ad4c396123e4 HA: 2022.4.2 Supervisor: Home Assistant OS 7.6

It seems like the battery does not 'discharge' when the state changes from charging to discharging. Only when the battery start charging again the next day, does the battery reset to 0. [image: image] https://user-images.githubusercontent.com/56741343/162980948-25746a32-bcb8-435f-a7a2-d04ad6ec96da.png [image: image] https://user-images.githubusercontent.com/56741343/162980970-9ae39b3d-997b-4a3c-8c93-5da0f1369d02.png

What it used to look like before: [image: image] https://user-images.githubusercontent.com/56741343/162981465-25153036-0e14-4616-82c1-a6cd7a60aedd.png

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

Theredone51 commented 2 years ago

Are you getting any errors? I'm not sure that its resetting or just not giving readings while it's discharging. On Tue, 12 Apr 2022, 15:10 Theredone51, @.> wrote: battery_sim version: beb6756 <beb6756> HA: 2022.4.2 Supervisor: Home Assistant OS 7.6 It seems like the battery does not 'discharge' when the state changes from charging to discharging. Only when the battery start charging again the next day, does the battery reset to 0. [image: image] https://user-images.githubusercontent.com/56741343/162980948-25746a32-bcb8-435f-a7a2-d04ad6ec96da.png [image: image] https://user-images.githubusercontent.com/56741343/162980970-9ae39b3d-997b-4a3c-8c93-5da0f1369d02.png What it used to look like before: [image: image] https://user-images.githubusercontent.com/56741343/162981465-25153036-0e14-4616-82c1-a6cd7a60aedd.png — Reply to this email directly, view it on GitHub <#27>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIZGIBGEYYLXJQDYZ4AFDVEV75DANCNFSM5THOPGUA . You are receiving this because you are subscribed to this thread.Message ID: @.> Sorry for the late reply, did some further digging:

  • No errors
  • Energy Out and Energy Saved is correctly logging
  • Discharging rate is >0 when the battery should be charging
  • Current discharging rate is 0 when the battery should be discharging, this seems to be the problem
hif2k1 commented 2 years ago

It looks like it charges and discharging ok at times e.g. on 4/10. Do you have a graph of the battery charge, import kWh and export kWh? How often does your energy meter update?

Theredone51 commented 2 years ago

It only seems that way, I've checked the 'discharging rate' and as you can see, since 4/05 it's no longer working / registering: image

That date coincides with update 3535d7b for which I create a different issue on the same date: https://github.com/hif2k1/battery_sim/issues/23

My energy meter updates every 30 minutes and the export sensor of the battery is set to work on the entity 'DailyElectricityReturned' which has remained functioning: image

hif2k1 commented 1 year ago

I've just pushed a new release which has debug logging in it. If you adjust your config to show debug info for battery sim then you should get some info in your logs and hopefully that might help to solve this puzzle. Thanks

Theredone51 commented 1 year ago

I've just pushed a new release which has debug logging in it. If you adjust your config to show debug info for battery sim then you should get some info in your logs and hopefully that might help to solve this puzzle. Thanks

This update (or the most recent HA updates) seems to have broken my setup completely, it's now not going up anymore either. I get following errors: image image image image image

hif2k1 commented 1 year ago

Right, I have pushed an update which may sort the first error. However, this error would only have come up if you had a tariff sensor set that doesn't exist or has been deleted so you probably need to change your config or re-create your battery.

The other warnings indicate that your import and export meters are resetting for some reason. This may be part of the reason you were getting the other problems earlier.

Let's keep working on it hey, let me know how it goes with the new update.

Theredone51 commented 1 year ago

Installed the latest update, recreated the battery and voila, it's working again: image