Skip to content

Update data fields of the “energy” and “voltage” types - #264

Open
Guzz-T wants to merge 5 commits into
Bouni:mainfrom
Guzz-T:issue/198/datatypes
Open

Guzz-T wants to merge 5 commits into
Bouni:mainfrom
Guzz-T:issue/198/datatypes

Conversation

@Guzz-T

@Guzz-T Guzz-T commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor
  • Change the scaling factor of 'ID_Waermemenge' parameters from 0.1 to 0.01
  • Change the scaling factor of the voltage data type to 0.01

Relates to #198

@github-actions

github-actions Bot commented Mar 17, 2026 •

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
luxtronik
   __main__.py25250%3–66
   datatypes.py454199%147
   discover.py58198%63
luxtronik/cfi
   interface.py175398%167–168, 256
luxtronik/definitions
   __init__.py208199%216
luxtronik/scripts
   __init__.py35586%7–16, 51
   discover_shi.py60600%8–98
   dump_cfi.py14657%18–25, 29
   dump_shi.py15660%21–28, 32
   performance_shi.py63630%7–89
   update_screen.py1058222%6, 20–41, 46–48, 51–61, 64, 70–75, 78, 81–85, 88–92, 95–97, 100–103, 106–111, 115–116, 119–126, 129–136
   watch_cfi.py321650%36–47, 50–56, 60
   watch_shi.py331652%38–49, 52–58, 62
luxtronik/shi
   interface.py337399%438, 519, 527
TOTAL243628888% 

Tests Skipped Failures Errors Time
381 0 💤 0 ❌ 0 🔥 17.971s ⏱️

@Guzz-T
Guzz-T force-pushed the issue/198/datatypes branch from 92b0a32 to 3fd1379 Compare March 17, 2026 20:49
@Guzz-T Guzz-T closed this Mar 17, 2026
@Guzz-T Guzz-T reopened this Mar 17, 2026
@Guzz-T Guzz-T changed the title Issue/198/datatypes Update data fields of the “energy” and “voltage” types Mar 17, 2026
@Guzz-T

Guzz-T commented Mar 17, 2026

Copy link
Copy Markdown
Contributor Author

Can any of you check the values on your heat pump?

@kbabioch kbabioch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code itself looks fine to me, but let's give this some time to verify whether it fixes the issue in the real world :-).

@Guzz-T

Guzz-T commented Apr 6, 2026

Copy link
Copy Markdown
Contributor Author

Are there any findings yet?

@rhammen

rhammen commented Sep 17, 2026

Copy link
Copy Markdown

@Guzz-T sorry for the late reply. I checked the registers in this PR against the diagnostics dumps collected in the BenPru/luxtronik integration (30 heat pumps from public issue reports plus my own; firmware V1.73–V1.90, V2.88–V2.90, V3.86–V3.92). Result: the 0.01 kWh scale is confirmed for everything here except 1059, which turns out to be firmware-series dependent.

Confirmed 0.01 kWh — parameter equals the matching calculation (kWh/10) × 100, exactly

Parameter Calculation Units with data Example pairs (raw ↔ kWh)
852 ID_Waermemenge_Seit 154 ID_WEB_WMZ_Seit 9 of 9 3449447 ↔ 34494.4, 17613162 ↔ 176131.6, 835590 ↔ 8355.9
854 ID_Waermemenge_Hz 151 ID_WEB_WMZ_Heizung 26 of 27 11960251 ↔ 119602.5, 14545611 ↔ 145456.1, 6449260 ↔ 64492.6 (V1.73)
878 ID_Waermemenge_BW 152 ID_WEB_WMZ_Brauchwasser 24 of 24 2615400 ↔ 26154.0, 3004080 ↔ 30040.8, 1337833 ↔ 13378.3
879 ID_Waermemenge_SW 153 ID_WEB_WMZ_Schwimmbad 5 of 5 1565690 ↔ 15656.9, 436410 ↔ 4364.1, 104840 ↔ 1048.4

(The one exception for 854 is a ratio of 99.4 from a dump where the two blocks were evidently read a few minutes apart.) This holds on all three series. Note that on V3.88+ units calculation 154 reads 0 while 852 keeps counting — the total is apparently no longer mirrored to the calculation there.

1059 ID_Waermemenge_ZWE — scale depends on the controller series

So a single scale for 1059 is wrong for one group either way: Energy is off by 10× on V2 units, Energy2 is off by 10× on V3 units (21 of the 30 corpus units are V3). The integration currently handles this with a per-series factor on top of the library, but the library already has what's needed: the since/until fields on definitions are checked against the firmware version in Definitions.build(). I'd propose two entries for 1059:

{"index": 1059, ..., "names": ['ID_Waermemenge_ZWE'], "type": Energy2, "until": '2.99.99', "unit": 'kWh/100', ...},
{"index": 1059, ..., "names": ['ID_Waermemenge_ZWE'], "type": Energy,  "since": '3',       "unit": 'kWh/10',  ...},

with the V1 case (unverified, assumed like V2) covered by the first entry. That would make this the first version-gated parameter definition.

Two more candidates for Energy2, currently Unknown upstream and not in this PR — both display-verified in BenPru/luxtronik#752: 1135 = 410381 vs 4103.8 kWh (cooling heat quantity) and 1138 = 113191 vs 1131.9 kWh (pool energy input).
I'm happy to make PRs for both the 1059 split and the 1135/1138 additions (on top of this one, or separately once it's merged) — or if you'd rather fold them into #264 yourself, that's fine with me too; just say which.

Relates to #198.

This branch has not been deployed

No deployments
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.

3 participants