#Where to correct a summation value?

1 messages · Page 1 of 1 (latest)

sturdy echo
#

Hello there, I have a HA running on a raspberry pi3 since a few years. Some time ago, I added to my home some nodon SIN 4 FP 21 devices to drive my heaters. One of them had a "glitch" where summed energy was multiplied by 1000. I have found some entries in the sql database to correct historic data (in statistics_short_term and statistics tables), and have written some commands to correct these, but when I restart home assistant, I always get the old value for last summed energy value, on this heater. Where should I look for to correct the summation once and for all please?

rancid path
#

You can correct improper entries in dev tools -> statistics

sturdy echo
sturdy echo
#

Hmmm looks like this did not do the trick, my history still shows a bump from 67kWh to 67000kWh on that day 😦

#

(and the last summation value still shows the same value as before)

sturdy echo
#

Where can this be stored?

#

In fact, the "state" value still is wrong after correcting the "sum" value. I have corrected both fields in the sql tables (statistics & statistics_short_term), but the entity still shows the wrong value... and I can't find where it is stored.

#

okay, got it, that was in the dev tools->states, where I needed to put the right value for the summation. So this is now corrected. Thanks @rancid path 🙂

sturdy echo
#

In fact, plenty of text (varchar(255)) values are stored for these in table "states", which might also need correction... 😦

rancid path
#

did you figure it out or? you just need to find the dates/times that the increase happened and correct those entries

sturdy echo
#

Nope, that did not work. I believe the sensor has a wrong value stored in itself (might have happened when I updated the firmware of the module...). So I'll have to reset it to get something "consistent"... 😦

rancid path
#

what kind of sensor is this / it was a random one time increase that messed up your sensor value but since then its been changing/increasing normally, right?

sturdy echo
rancid path
#

you should be able to click this button right here

sturdy echo
#

I did this, but the value is still wrong 😦

rancid path
#

wdym the value is wrong? you find the problem entry, click on it, change the value, click adjust

#

can you not find the value or?

sturdy echo
#

and depsite my efforts to correct it (I have even tried to write the value in the device' counter from the ZHA device attributes), it keeps showing the old one.

rancid path
#

you change it, click adjust, and then the value for the exact same timeframe is what it was before you clicked adjust?

sturdy echo
#

(that's the "summation delivered" attribute)

#

it briefly shows the value I put, then next sensor read shows the old value incremented by the consumption change.

#

so I'm pretty sure the value comes from the sensor itself

rancid path
#

perhaps its a problem with the device then. im looking at the z2m page for it, it doesnt look like the energy value can be manipulated

sturdy echo
#

yes, so I believe my only chance would be to reset the device to factory...

#

(btw, I use ZHA, not Zigbee2MQTT)

#

that is where I have tried to correct the device' value (using the "write attribute" option, of course 😉 )

rancid path
#

from z2ms side, this value cant be changed, i would imagine that the value just cant be changed at all. best you can do is see if you can try a factory reset, or simply adjust for the increased value in whatever automation/data you use it in