mypyllant-component icon indicating copy to clipboard operation
mypyllant-component copied to clipboard

Daily energy consumption totals incorrect

Open ccle610 opened this issue 2 years ago • 16 comments
trafficstars

Before submitting a new issue

Problem description

The totals are reset to zero at 0:30. No more values are recorded until 1:30 am. The values from 0:00 to 1:30 are lost for the day. As a test, the system was set to standby during this time, then the values fit.

Logs

The problem cannot be recorded in log files

ccle610 avatar Nov 04 '23 06:11 ccle610

The values aren't recorded incrementally, like you're describing.

The API returns the totals for the current day, so every hour (when the totals are updated by the integration) I just get the latest total value for that day. AFAIK there is no way to miss any energy values this way. But there may well be something wrong with timezones, or the way the values get reset within Home Assistant. I'm using total_increasing for the energy sensors.

I may be able to help, if you can provide more information (screenshots comparing the vaillant app and what you're seeing in HA).

signalkraft avatar Nov 04 '23 18:11 signalkraft

HA_Energy MyVaillant

Thx for answering . . . and ok, I'll understood the Problem now ;-) Today the HP was not set to standby, so the difference is clearly visible on the Screenshots attached. I stay in Germany MEZ: UTC+1 and indeed, the gap is smaller since Wintertime startet. Formaly the consumption totals startet app. 3:00 AM - There is no settings in "myVaillant App" to set Timezone - but Germany was selected when I start the App first time.

Beside: Yesterday myVaillant App shows a Consuption of 8.8 kWh - in HA it was 8 kWh Maybe a Sensor can be created, showing the Values of Yesterday? So my Grafana will show more realistic graphs ;-)

ccle610 avatar Nov 04 '23 18:11 ccle610

I have also a problem in the logs. In Home Assistant it stop working at 00:35 - Happy New Year ;) The app says 0 value. I think this is the problem and why the state is "unknown".

Thanks for the great integration!

Bild 01 01 24 um 01 13

Bildschirmfoto 2024-01-01 um 01 14 05

2024-01-01 00:53:59.673 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform mypyllant Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 509, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 754, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1025, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 745, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in _async_write_ha_state state, attr = self._async_generate_attributes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in _async_generate_attributes state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 751, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 501, in state value = self.native_value ^^^^^^^^^^^^^^^^^ File "/config/custom_components/mypyllant/sensor.py", line 776, in native_value return round(self.heat_energy_generated / self.energy_consumed, 1) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ZeroDivisionError: division by zero 2024-01-01 00:53:59.764 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up mypyllant platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 369, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 509, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 754, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1025, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 745, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in _async_write_ha_state state, attr = self._async_generate_attributes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in _async_generate_attributes state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 751, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 501, in state value = self.native_value ^^^^^^^^^^^^^^^^^ File "/config/custom_components/mypyllant/sensor.py", line 776, in native_value return round(self.heat_energy_generated / self.energy_consumed, 1) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ZeroDivisionError: division by zero

rapton avatar Jan 01 '24 00:01 rapton

Hello everyone, I have the same problem. I came from Multimatic Integration and switched to MyVaillant. Since then, the values have differed significantly every day (HA and MyVaillant app). Sometimes there are 3-4kWh missing daily in HA. The Multimatic integration had added up the values in each case. Now the values are "reset" daily.

What is the smartest way to restore the status so that the values between the app and HA are consistent?

Many thanks (especially to the developer who makes it possible to read out the WP / HP in HA)!

beda162 avatar Mar 02 '24 09:03 beda162

Hello,

I have exactly the same problem and I think it may really be related to some issue with timezones.

If you check the image below, the first graph is my Shelly Energy meter on the main and the second is what the heat pump says. There is basically nothing else consuming power (<50W). You can see the same graph pattern, but about 4.5 hours delayed. Why? My timezone is CET+1 on both the device and HA.

Any ideas?

Screenshot 2024-03-06 at 18 25 58

mr-tichyt avatar Mar 06 '24 17:03 mr-tichyt

...and also to add, if I check my energy dashboard, the difference between what Shelly measured and what the heat pump reports as consumption differs exactly by what was consumed by the heat pump in the last 4.5 hours of every day...

mr-tichyt avatar Mar 06 '24 17:03 mr-tichyt

In my case, both the Raspberry with HA and the Vaillant system have the same time / time zone setting (Europe/Berlin).

beda162 avatar Mar 07 '24 19:03 beda162

If you compare the heat pump current power graph with flow temperature, does it match or is it also shifted by some time as for me? The power readings are completely off in my case and I assume it will break the consumption alignment for a day...

mr-tichyt avatar Mar 08 '24 08:03 mr-tichyt

I posted a more thorough explanation about this problem at the very bottom off this page.

signalkraft avatar Mar 24 '24 17:03 signalkraft

@signalkraft thanks very much for this detailed explanation on the docs page! this helps me alot to understand the problem.

Am I right: we cannot do something against this problem? Is there a discussion at Vaillant or in HomeAssistant to upvote?

TilmannBach avatar Mar 25 '24 13:03 TilmannBach

So I think, there is nothing to do here. I will close this Issue for this reason. Thank you for explaining, Signalkraft!

ccle610 avatar Mar 30 '24 06:03 ccle610

I would leave the bug open. It's a problem that many people will stumble across during the heating period. Perhaps you can at least write the lost values to the following day so that the overall balance is at least consistent again.

beda162 avatar Apr 01 '24 15:04 beda162

Hi everyone,

from what I can read on this issue is that there are discrapancies when considering the energy consumption on a specific period of time (i.e. per day). Would this also effect "manual" meter helper who just have increasing totals? Because they seem to have the same issue with increasing differences.

0la1 avatar Oct 24 '24 06:10 0la1