Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information