-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duplicates ignored when using aggmode #500
Comments
seems to occur only when aggmode "avg". when using max it seems to work fine. |
Use of duplicates is only rational for energy. Not for values like voltage, current, temperature or power. Therefore i assume it's intentional. |
the value i want to avoid duplicates is the total energy consumption. and it shouldn't matter if avg or max is used, when the values are duplicates they shouldn't be written to the database. i don't agree with you. |
looking at the code, also, it does an equality comparison on floats, which is a no-no from a programming point of view: vzlogger/src/api/Volkszaehler.cpp Line 216 in 49240df
so your theory of the average aggregation breaking deduplication due to rounding is probably right. |
@astrakid: |
looks good!!! |
great! #501 is not to be merged, because it's a very naive fix. |
for vzlogger i think it should be enough to compare for 1/1000, but even if more precision would be used - if we round the results we should always get the same value which wouldn't be written to the database. |
hi,
i am not sure if this is intended, but i couldn't find it in the documentation.
when in meter's channel-section duplicates AND aggmode is configured, then data is written every time and duplicate-parameter seems to be ignored. as soon as i disable "aggmode", duplicate-parameter is used.
see below my config extract. aggmode is now commented out.
with aggmode in use these data have been written to the database, the latest datapoint was written without aggmode:
The text was updated successfully, but these errors were encountered: