fix: scope EVC cumulative-energy big word order to GEN1 only - #2235
Closed
Bl00d-B0b wants to merge 1 commit into
Closed
fix: scope EVC cumulative-energy big word order to GEN1 only#2235Bl00d-B0b wants to merge 1 commit into
Bl00d-B0b wants to merge 1 commit into
Conversation
Contributor
|
I'd already opened a PR to fix this. |
The order32="big" override on charge_added_cum (from wills106#2178) was verified on an X3-EVC-11kW Gen1 (serial C311*, ARM v1.18): at the same instant the input copy 0x10-0x11 read [0, 3] (high-word-first) while its holding twin 0x619-0x61A read [3, 0] and decoded to the correct 0.3 kWh little-endian. Issue wills106#2230 shows the opposite population: an X3-HAC 22kW Gen2 (ARM v2.03) follows the documented little order, so the global override inflated its lifetime total by a factor of 65536 (322.6 kWh -> 21,141,913.6). The definition is now split per generation: GEN1 keeps order32="big" (hardware-verified), GEN2 returns to the documented default order. Fixes wills106#2230 (word-order part).
Bl00d-B0b
force-pushed
the
fix/evc-cum-word-order-gen1-only
branch
from
July 30, 2026 13:54
276aabf to
3679ac1
Compare
Owner
|
Does this need closing down then? |
Contributor
Author
|
@wills106 yes - closing. #2234 implements the same generational split (and covers GEN3/GEN4 explicitly, which is the better version) and is already merged; I opened this one before spotting TCWORLD's. Verified #2234 against my Gen1 unit's case: GEN1 keeps the big-endian decode it needs, the HAC Gen2 reports in #2230 get the documented order. Nothing from this PR remains needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the word-order half of #2230; follow-up to the discussion on #2178.
The
order32="big"override oncharge_added_cumwas hardware-verified on my X3-EVC-11kW Gen1 (serialC31103*, ARM v1.18, register 0x25 = 118, classified GEN1 by the plugin): at the same instant, the input copy0x10-0x11read[0, 3](high-word-first, 0.3 kWh only when decoded big) while its holding twin0x619-0x61Aread[3, 0]and decoded to the correct 0.3 kWh little-endian. On that unit the documented order is demonstrably wrong for the input copy.#2230 shows the opposite population: an X3-HAC 22kW Gen2 (ARM v2.03) follows the documented little order, so the global override inflated its lifetime total by exactly a factor of 65536 (322.6 kWh became 21,141,913.6 - the reporter's cross-check against the independent HTTP integration makes it airtight).
Fix: the definition is split per generation - GEN1 keeps
order32="big"(hardware-verified), GEN2 returns to the documented default order. If more firmware populations surface (e.g. #2213, where neither order looks plausible), the same split can be refined per firmware version.