Issues with difference calculations #23060
Unanswered
redm123
asked this question in
scripter / SML
Replies: 1 comment 7 replies
-
yes you are right, i will clarify this in the documentation. =D is meant for meters that do not have a momentary power but only total kWh.
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I'm having some issues with difference calculations in smart meter scripts I don't understand. Not sure, if I'm maybe missing something here or if there is some bug(s) somewhere... It seems to work overall, but going closer something looks fishy.
First of, I wonder how the difference calculation actually works... documentation of
=d
says:I read this as: it takes the input values at interval time apart and simply calculates the difference. So in my case: one value of
Total_in
, after 60s another value ofTotal_in
, and the difference thereof. But it also seems to convert the kWh to W... or something. At least the resulting values are not even close to the pure diff, but rather match the momentary W values directly from the meter... So how does this really work?Then the observations:
=d
are delayed by about 4 minutes (compared to source valuesTotal_in
, and momentary values ofPcurrent
), while the interval is only 60sTotal_in
react immediately and are sampled at about 2s intervals (at least thats how it updates in the web UI). A manual calculation of a 60s diff ofTotal_in
comes pretty close to the 4kW, so the information is there, in the data.An image to illustrate observations. The green line is delayed over the yellow and orange, and the 2-3min 4kW peak in the yellow line is completely lost.
I have the following Smart Meter Definition (slightly shortened):
Beta Was this translation helpful? Give feedback.
All reactions