Skip to content
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

make DZG workaround more specific #136

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

jmberg
Copy link

@jmberg jmberg commented Nov 17, 2023

In #132 and volkszaehler/vzlogger#533 it was reported that there are DZG meters that fall into the range currently deemed broken (all DZG meters with serial numbers before 6000 0000), but aren't actually broken. The reason for this seemed to be that they're a different type than mine that was broken.

Further inquiry with DZG revealed that indeed only DVS74 meters are affected by the encoding issue, and then those only for serial numbers before 6000 0000. They also said that (currently) the serial number ranges

  • 4200 0000 to 4899 9999, and
  • 5500 0000 to 5899 9999 are reserved for DVS74 meters.

As such, make the workaround detection more specific, and we no longer need to have the check for 6000 0000 either, just need to have a list of affected ranges. To achieve that, refactor the code into a separate function that actually decodes the serial number to an integer, so we can make the comparison more easily and have the list of affected numbers more clearly in the code.

This should fix #132 since the serial number there starts with 4005, so it's clearly not in the affected ranges, as explained by my contact at DZG. For volkszaehler/vzlogger#533 I don't have the serial number, but it's the same type of meter as in #132.

sml/src/sml_list.c Outdated Show resolved Hide resolved
sml/src/sml_list.c Outdated Show resolved Hide resolved
@r00t-
Copy link
Collaborator

r00t- commented Nov 27, 2023

can't test, but LGTM!
thanks for your contributions again!

i'd leave you some time to address my comments (if you like), then i'd merge.

(we really want units-tests for this kind of stuff, but that's beyond the scope of this fix.)

@jmberg
Copy link
Author

jmberg commented Nov 27, 2023

I pushed but github seems to think about it for a long time

@r00t-
Copy link
Collaborator

r00t- commented Dec 1, 2023

i haven't the slightest idea why github is refusing to run the workflow...
there is no way to run it manually.
i suggest you re-push occasionally to check if it's working again.

@jmberg
Copy link
Author

jmberg commented Dec 1, 2023

It did eventually (after about an hour) show that I force-pushed, so it should be updated now.

@r00t-
Copy link
Collaborator

r00t- commented Dec 10, 2023

there's still no pipeline run and no option for me to start one 😕
can you try to force-push to a different hash (just add whitespace to the commit message or whatever)?

In volkszaehler#132 and volkszaehler/vzlogger#533 it was reported that there
are DZG meters that fall into the range currently deemed broken
(all DZG meters with serial numbers before 6000 0000), but aren't
actually broken. The reason for this seemed to be that they're a
different type than mine that was broken.

Further inquiry with DZG revealed that indeed only DVS74 meters
are affected by the encoding issue, and then _those_ only for
serial numbers before 6000 0000. They also said that (currently)
the serial number ranges
 - 4200 0000 to 4899 9999, and
 - 5500 0000 to 5899 9999
are reserved for DVS74 meters.

As such, make the workaround detection more specific, and we no
longer need to have the check for 6000 0000 either, just need to
have a list of affected ranges. To achieve that, refactor the
code into a separate function that actually decodes the serial
number to an integer, so we can make the comparison more easily
and have the list of affected numbers more clearly in the code.

This should fix volkszaehler#132 since the serial number there starts with
4005, so it's clearly not in the affected ranges, as explained
by my contact at DZG. For volkszaehler/vzlogger#533 I don't have
the serial number, but it's the same type of meter as in volkszaehler#132.
@jmberg
Copy link
Author

jmberg commented Dec 11, 2023

Looks better now, perhaps? I pushed a new version w/o any changes.

@r00t-
Copy link
Collaborator

r00t- commented Dec 11, 2023

@jmberg jmberg force-pushed the dzg-dvs74 branch from 5ea032b to 49426e1

https://github.com/volkszaehler/libsml/pull/136/checks

make DZG workaround more specific 49426e1
succeeded 9 hours ago in 17s

🎉

@r00t- r00t- merged commit 0051da9 into volkszaehler:master Dec 11, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Odd readings from DWSB20.2TH: Display shows power -195W, vzlogger reports 460W
2 participants