Skip to content

Implement version-dependent CFI data vectors - #86

Merged
Guzz-T merged 34 commits into
mainfrom
issue/78/cfi-version
Nov 22, 2026
Merged

Guzz-T merged 34 commits into
mainfrom
issue/78/cfi-version

Conversation

@Guzz-T

@Guzz-T Guzz-T commented Nov 22, 2026

Copy link
Copy Markdown
Owner

The data fields of the config interface change from version to version. Until now, this could largely be ignored, since in most cases only fields were added. In #78, it turned out that for some fields, the data type has also changed. Therefore, we must interpret the fields differently depending on the version. To do this, we use the same mechanism that is already used for SHI.

See #79, #80, #81, #82, #83, #84 and #85

Relates to #78

Guzz-T and others added 30 commits November 18, 2026 08:35
This simplifies the version detection by being able to use different fields in the same way.
Move and extract common functions from the SHI so that they can also be used by the CFI
The names must be unique; otherwise, the fields/methods will be overwritten when derived to `LuxtronikInterface`.
…_VERSION as default version

LATEST is just a snapshot and usually isn't the right choice. IGNORE is most similar to how it was in earlier releases.
But, there are still some functions/constructors that uses LUXTRONIK_VERSION_DETECT.
…on method

This is a more general approach to detect the version
Revise the version-dependent generation of SHI components
…mplementation of calculations.get_firmware_version()
Improve some common version-related methods
…DataVector class

This enables the version-dependent creation for the CFI data vector.
Expand the CFI data vector so that only fields that match the version are created
Support version-dependent data vector collections
Note:
    These classes are grouped with together in the Luxtronik section.
    Use only unique identifiers (e.g., using name mangling like `self.__version`;
    this is checked by pytest) for methods and fields and do not use public
    methods internally (e.g., `self.version`). Otherwise, the correct function
    might not be called.
Support a version-dependent CFI interface
Guzz-T and others added 4 commits November 22, 2026 15:59
…erfaces

This simplifies and standardizes the debug info output.
…LuxtronikSmartHomeInterface can be combined to the LuxtronikInterface without problems

Same applies for LuxtronikData and LuxtronikSmartHomeData to LuxtronikAllData
Create version-dependend CFI and SHI interfaces within the LuxtronikInterface
@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
luxtronik
   __init__.py117893%100–117, 120, 192, 195
   __main__.py25250%3–66
   datatypes.py462199%147
   discover.py58198%63
   interface.py43881%14, 41, 54, 65, 88, 103, 118, 136
   version.py122596%122, 235, 237, 245, 284
luxtronik/cfi
   interface.py230897%155–156, 177, 232, 342–343, 431, 464
luxtronik/definitions
   __init__.py219199%209
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
   inputs.py17194%38
   interface.py376599%101, 177, 533, 614, 622
TOTAL270331788% 
Tests Skipped Failures Errors Time
472 0 💤 0 ❌ 0 🔥 20.636s ⏱️

@Guzz-T
Guzz-T merged commit 7092eb1 into main Nov 22, 2026
5 checks passed
@Guzz-T
Guzz-T deleted the issue/78/cfi-version branch November 22, 2026 15:37
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.

1 participant