Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Async Python library for Thermia heat pumps on the **Genesis** platform (Atlas,
Calibra E, Calibra Cool, Calibra RXT, Diplomat Inverter), using Modbus via
[`modbus-connection`](https://home-assistant-libs.github.io/modbus-connection/).

> **Status:** early development. Only Genesis firmware 17.1 is targeted.
> **Status:** early development. Genesis firmware 17.1 is targeted; 18.0 reads the same.

This library powers the [Thermia Genesis Home Assistant integration](https://github.com/klconsultancy/ha-thermia-genesis).

Expand Down
10 changes: 6 additions & 4 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ Domain terms are defined in [`CONTEXT.md`](../CONTEXT.md).
- Thermia heat pumps on the **Genesis** platform (Atlas, Calibra, Calibra E, Calibra Cool,
Calibra RXT, Diplomat Inverter), controlled over **Modbus**.
- Only firmware **17.1** is implemented. The register map lives in a per-version module
(`v17_1`) so other versions can be added side by side later.
- Reference hardware: Calibra 7, firmware 17.1.11, Modbus TCP, EM3 extension module with
passive cooling.
(`v17_1`) so other versions can be added side by side later. Firmware **18.0** uses the
same map: the reference pump's dump on 18.0.1 matched it address for address (errata), and
no protocol document for 18.0 is available yet.
- Reference hardware: Calibra 7, Modbus TCP, EM3 extension module with passive cooling;
firmware 17.1.11 until November 2026, then 18.0.1 (it updated itself).
- Modbus TCP first. RTU is not excluded: `modbus-connection` already supports serial and
RTU-over-TCP, so adding it is mostly config-flow work in the integration.
- Read first, then writes: the write API (#19, see Public API) covers a few settings so
Expand Down Expand Up @@ -231,7 +233,7 @@ await pump.status.write(Status.operational_mode, OperationalMode.STANDBY)
- The firmware version is read from input registers 311–313 (major, minor, micro), with
every update. `pump.firmware_version` is a `FirmwareVersion` named tuple (`str()` gives
"17.1.11", it compares as a tuple), or `None` until an update has read it.
- On a major/minor version other than 17.1 the library still uses the 17.1 map;
- On a major/minor version other than 17.1 or 18.0 the library still uses the 17.1 map;
`FirmwareVersion.supported` is then `False`, and the caller decides how to warn (the Home
Assistant integration raises a repair issue).
- Optional subsystems are detected from their "Enable ..." coils: mix valve 1 coil 11, HGW
Expand Down
1 change: 1 addition & 0 deletions docs/errata.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ field report from another pump.
| Scale 100 (chapter 2.1) | The scale table says the transmitted value is "a tenfold larger"; the worked example in the same section transmits -5 °C as -500. | Hundredfold (the worked example; the reference pump's discharge pipe reads 2667: 26.67 °C, not 266.7 °C). |
| Footnote \*5 "Should always be set to 1 i auto mode" | Printed under the coil table of chapter 3 and with the footnotes of chapter 9, but no register refers to it. | Not applied to any register. To be verified which register it belongs to. |
| Footnotes | Printed at the end of chapter 9 instead of in their own chapter (as in 17.0). | Treated as document-wide footnotes. |
| Firmware 18.0 | No protocol document for 18.0 is available. The reference pump updated itself from 17.1.11 to 18.0.1 (noticed 2026-11-18). Its dump (`tests/fixtures/calibra7-18.0.1.json`) reads the same addresses as on 17.1.11, with no failed read and no change in any holding register; the input registers that differ follow from the compressor running during the 18.0.1 dump and idle during the 17.1.11 one. | 18.0 uses the 17.1 map and counts as supported. A register 18.0 adds, or a changed meaning behind an equal value, would not show in a dump. |

## Undocumented behaviour

Expand Down
9 changes: 5 additions & 4 deletions src/thermia_genesis/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

from typing import NamedTuple

# The firmware the register map is written for; docs/design.md (Scope).
SUPPORTED = (17, 1)
# The firmware versions the register map is written for or checked against;
# docs/design.md (Scope).
SUPPORTED = frozenset({(17, 1), (18, 0)})


class FirmwareVersion(NamedTuple):
Expand All @@ -19,5 +20,5 @@ def __str__(self) -> str:

@property
def supported(self) -> bool:
"""Whether the register map is written for this major.minor version (17.1)."""
return (self.major, self.minor) == SUPPORTED
"""Whether the register map applies to this major.minor version (17.1 or 18.0)."""
return (self.major, self.minor) in SUPPORTED
Loading
Loading