ankohanse / hass-dab-pumps

Home Assistant Custom Integration for DAB Pumps via the DAB Live or DConnect service
MIT License
14 stars 2 forks source link

Water consumption increasing value #51

Closed domenicoblanco closed 1 hour ago

domenicoblanco commented 2 days ago

Describe the bug Hi, since the 4th of November I've an issue with water consumption. The value showed by the sensor is correct, as in the attached image

Screenshot 2024-11-25 alle 14 50 43

But for some reason the energy dashboard shows very different values (maybe because the value is floating?)

Screenshot 2024-11-25 alle 14 51 50

I think that could be a bug related to #46, as the lowest columns in the second image shows 343L, that is the correct value

To Reproduce Steps to reproduce the behavior:

  1. Go to Energy dashboard
  2. Scroll down to water consumption
  3. Compare with the sensor value

Expected behavior That values between energy dashboard and sensor are consistent

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

ankohanse commented 1 day ago

I suspect it is these jumps in the values returned by the pump that confuse the counter. First it sees a total of 0.343 m3. Then the counter goes to about 0.23 m3 which is interpreted as the start of a new series, so total is now 0.343 + 0.23 = 0.57. Then the counter goes back to 0.343, so total increases by about 0.11 to 0.68. Which is about the height of the middle bars in the energy graph. If that repeats within the same hour, that would increase the total seen to about 1.02, which is close to the height of the highest bars in the energy graph.

That change from 0.343 to 0.23 is a 32% change. Any changes less than 10% I regard as noise and are filtered out. So these are not filtered out. Maybe I need to set my detection less strict for TOTAL_INCREASING values and regard changes less than 50% as noise?

Will experiment a bit with that...

ankohanse commented 1 day ago

Note that on my own pump I do not get these weird downward spikes, the grapg is much more smooth. What type of pump do you have?

image

domenicoblanco commented 1 day ago

Yeah, the math is the same I applied when I thought about the floating values. My pump is an Esybox v2 but the weird part is that I didn't change anything, both in the network or installation. Maybe was the scheduled maintenance that happened in that period?

Screenshot 2024-11-25 alle 21 49 42

This is the difference with the last month and in the following is quite evident that the problem started to occur since the fourth

Screenshot 2024-11-25 alle 21 50 18
ankohanse commented 1 day ago

I've adapted the code to be more aggressive when filtering unexpected TOTAL_INCREASING values (like going from 0.34 to 0.23) Now released as v2024.11.4

Could you please let me know if that resolves the issue for you?

domenicoblanco commented 1 day ago

Of course, and thanks! Just restarted HA and I'll let you know! Here is about 22:50, I'll update you tomorrow evening

domenicoblanco commented 1 day ago

This is a quite weird update: after more than 15 hours, it added 8m3 and then stabilised. I don't know if is something related to their system or something to my pump, in any case I read that in the 4th of December there will be another scheduled maintenance Screenshot 2024-11-26 alle 18 28 45

domenicoblanco commented 1 hour ago

After yesterday's peak it seems working normally. Closing the issue and thanks again!