#Fixing some metrics

1 messages · Page 1 of 1 (latest)

elder crane
#

Greetings. I have some obviously wrong metrics in my energy devices. Is there a way to fix that afterwards?

More detailed:
Attached a screenshot of the wrong reading: its obvious that I have not put 16MWh into the grid. When looking into this i can see, that i received a reading of 0 from my sensor (faulty) and afterwards the correct reading of 16xxxkwh. (see second screenshot)

So basically i need to remove the 0 value. How do I do this? I digged into "developer tools => statistics" i see screenshot 3. There are very many 0 kwh entries?! Do i have edit them all? is there a better way? i am confused, where all these 0 values come from.

#

Update: When digging deeper i found more "broken" days. Here power import and export are broken. see screenshot for another example. I guess first i need some help debugging, what causes these spikes. any idea?

#

edit: updated screenhot

rose spindle
#

maybe a reboot and first returned is NULL and after the true power.. so this spike..

elder crane
#

hmm HA reboots only once a week at other times. The sensor has a higher uptime so this is not very likely. but yes: the spikes seem to be 0 -> actual value readings. can i get rid of all 0 values from this entity? and for future use: any way to say "0 is a invalid value and must be ignored"?

turbid hatch
#

What is the device? And via what integration?

To fix an outlier: Dev tools => Statistics => Slope with arrow next to the entity with the error.

elder crane
#

when trying to fix the falöse value i see this. s it seems there are maaaaaany "0" values. i can not reproduce what was sent via mqtt at this time, but at the moment I get every 10secs a mqtt message with the correct values (ie 16xxxkwh). The device might loose the connection as its buried in the basement in the fuse box. so its possible, that there are sent no values for a while (although my monitoring for this device reported no errors at this time)

turbid hatch
#

Sending no value isn't an issue for HA. While HA is running it will just keep the last. And after restart it will be just unknown until the first update.

But what kind of energy measuring device is connected to Tasmota? And is the Tasmota version bit recent? As I've been using Tasmota for many years and it's not standard behavior to just send a 0.

stray sparrow
#

"0" there means there was no change in that period, it's not meaning that the graph was 0.

#

You need to edit only the ones that say "16xxx kWh", those are obviously incorrect.

elder crane
#

so basically set the 16xxx values to 0?
@turbid hatch the device is reading the optical D0 output of my smartmeter/electricity meter

#

@stray sparrow can this be done autoamtically in the future? ie "remove value when larger than 100kwh" ?

turbid hatch
#

Yeah, just set it it 0 (or lower value if you know there was usage). And no, this cannot be automated. As a patch you could use a template sensor but bit hard to switch now and keep the history.

As for the D0, that's a standard bit but it should not jump to 0. So make a bug report for Tasmota. As it should not return 0 if it didn't read correctly.

elder crane
#

Okay found a way to fix the 0 readings from my tasmota device. There is a meridian filter, which can be enabled in the script parsing the message/telegram from the D0 interface. But there remains one problem: after the fixing of the wrong values as suggested, the price stays the old value and seems not to be recalculated. See screenshot. Should be something around 10€

stray sparrow
#

Cost is a separate entity/statistic

#

If you correct a consumption you would generally need to make an equivalent correction to the cost

elder crane
#

hmm found the values and fixed them, but there is still something off. as a last resort: is there a way to reset the cost and meter entity completely?

elder crane
elder crane
#

hmm i tried and clicked the button. this did strange things. now most of the daily costs values have 0€ but some have -XXXX€ (high values in the thousands). Is there a way to reset ALL statistics?

#

in other words: "starting fresh"?