Hello everyone,
I try to describe my Problem in detail
I have an photovoltaik System which produce some kWh each day measured with shelly 1pm
I have an shelly em3 which measured my whole house
The Problem with the em3 is i Dont have a total returned value only Every Channel Single returned values.
So i calculate Channel 1 + Channel 2 + Channel 3 in watts
I have create an template sensor which only sums up/calculate the negative Values in Watts.
With riemann integration i convert that Watts in kWh.
The Riemann.kwh i use in Utility Meter for daily/monthly reset.
Yester first of month it worked well but today my returned value from Riemann is way higher than produce kWh.
I have a huge Spike in Riemann daily Utility Meter, but i Dont know why
Here come somepicture (only 1 because of New User)
Einspeisung W Positive is the template sensor
einspeisungkwh is the Riemann integration
After that standard utility meter
That picture shows my problem very good.
Yesterday the red circle was right slowly increase when i produce more than i consume.
Today the blue circle jumps. After set to 0 it jumps even higher. After the last set to 0 i restartet home assistant and it stays where it should stay
Good morning, I have the following problem with Riemann sensors on Energy dashboard. The solar system is measured by a sensor in Watts:
- platform: template
sensors:
produzione_fotovoltaico:
unique_id: produzione_fotovoltaico
friendly_name: Produzione fotovoltaico
device_class: power
unit_of_measurement: W
value_template: "{{ state_attr('sensor.una_stato_sistema', '11') | int }}"
Then the Riemann is applied to convert from W to kWh:
- name: Produzione fotovoltaico kWh
platform: integration
source: sensor.produzione_fotovoltaico
unit_prefix: k
round: 3
method: left
And a statistic is created:
- name: Statistica produzione fotovoltaico
platform: statistics
entity_id: sensor.produzione_fotovoltaico_kwh
However each day, just at the first hour, I get a wrong integral sum:
Then the rest of the day is OK. I think that when solar is not generating any power (sensor value always zero from 7pm to 8am next day) the integral sum is still “summing” something. On SQLite browser in fact, I get a big “jump” of the statistic value.
I’ve the same issue.
With every sensor that stay for a “long” time at 0.
Sometimes I get a jump in the integration that never should happen.
I’ve workaround it by force update also the 0 every minute. But it should also work without it in my opinion.
I am asking because it seems I have the same issue.
My hardware setup is pretty the same as mentioned in the initial thread. Shelly 1PM for a photovoltaic system and a Shelly EM3 for measuring the whole house.
I created a template sensor that shows me only positve values [W] when I take power from the grid.
[Image #1 - Sorry. Since I’m a new user I am not aloud to add more than one image into my threads]
In case the photovoltaic system produces enough power I will no longer take energy from the grid.
So the value of the template sensor becomes 0 W.
I marked these periods in the following image
[Image #2 - Sorry. Since I’m a new user I am not aloud to add more than one image into my threads]
To convert this template sensor from W to kWh I also use a Riemann sum sensor.
And the issue is now clearly visible. When the [W]-template sensor stays too long on a zero value the following integration value is wrong. This behavior creates a jump in the curve (see red marking).