aerosmart-modbus
A typed, async Python model of an aerosmart ventilation/heat-pump unit's Modbus registers. Backend-neutral: built on modbus-connection, so it runs over pymodbus, tmodbus, or an in-memory mock -- no Home Assistant dependency. A Home Assistant integration that consumes this library lives in a separate repository.
Features
- 137 registers across 16 sub-systems, transcribed 1:1 from a live installation's Modbus register map (address, scale, unit).
- Two Modbus units modelled as one device: unit 1 (ventilation controller,
which also aggregates most fault/request flags) and unit 2 (heat pump /
domestic hot water), read together via one
AerosmartDeviceobject. - Neutral per-field metadata (
value_kind,writable,description,source_key) -- no Home Assistant concepts leak into this layer. - Pooled block reads per unit (
ComponentGroup), not one Modbus round-trip per register. - A regression test that re-parses the original source YAML and checks every Python field's address/scale still matches it (see "Development", below -- there is no manufacturer register manual to check against instead).
Device structure
| Attribute | Unit | Sub-system |
|---|---|---|
general |
ventilation | weekday, time/date, software version, device type |
outside_temperature |
ventilation | outside air temperature + thresholds |
room_temperature |
ventilation | room air temperature + setpoint |
fans |
ventilation | fan speeds, run hours, faults |
ventilation |
ventilation | operating mode, airflow, shading/frost/de-icing |
cooling |
ventilation | cooling thresholds |
summer_bypass |
ventilation | summer bypass automation |
carbon_dioxide |
ventilation | CO2 sensor |
fine_dust_filter / coarse_dust_filter |
ventilation | filter run time / change flags |
fire_alarm |
ventilation | fire alarm system contact |
aggregate_fault |
ventilation | summary fault flags |
boost_functions_ventilation |
ventilation | HEIZUNG+ boost function (ventilation-side registers) |
hot_water_ventilation |
ventilation | hot water fault/request flags (as seen from the controller) |
utility_lockout |
heat pump | utility (EVU) lockout signals |
heat_pump |
heat pump | compressor, pressures, run hours, status |
boost_functions_heat_pump |
heat pump | BAD+ boost function (heat-pump-side registers) |
hot_water_heat_pump |
heat pump | boiler temperatures, hot water setpoint |
Basic usage
import asyncio
from modbus_connection.pymodbus import connect_tcp
from aerosmart_modbus import AerosmartDevice
async def main():
connection = await connect_tcp("192.0.2.10", port=8899)
device = AerosmartDevice(
connection.for_unit(1), # ventilation
connection.for_unit(2), # heat pump
)
await device.async_update()
print(device.outside_temperature.temp_aussenluft, "°C outside")
print(device.heat_pump.wp_status)
asyncio.run(main())
Known hardware quirk: request pacing
Live-tested against a real unit: this device sits behind a slow
RS232-to-Modbus-TCP gateway. Issuing requests back-to-back with no pacing at
all made the gateway return responses under stale/mismatched transaction IDs,
and most reads timed out. Setting unit.set_message_spacing(0.3) (300ms
between requests) on both units, plus a short (~1-2s) settle delay after
connecting and after switching which unit you address, fixed this completely
-- all 137 registers then read cleanly. This library does not set spacing
itself (it only models registers, not connection policy); a consumer talking
to the real gateway should configure it on the ModbusUnit it passes in. The
Home Assistant integrations in the sibling repos do this already.
Metadata and writes
Every field carries a DatapointMetadata (see metadata.py):
value_kind ("number" or "boolean"), writable, description (the
original German label), source_key (the original Home Assistant entity id
it was transcribed from, for traceability), and either NumberMetadata or
BooleanMetadata.
meta = device.hot_water_heat_pump.require_metadata_for("wp_brauchwasser_soll_temp")
meta.writable # True
meta.source_key # "aerosmartm_wp_brauchwasser_soll_temp"
await device.hot_water_heat_pump.write("wp_brauchwasser_soll_temp", 52.0)
Caution: writable=True here reflects a naming heuristic against an
unverified register map, not a confirmed manufacturer specification -- treat
every writable field as unverified until checked against the real unit.
Command-line query tool
python -m pip install -e ".[cli]"
python script/query.py tcp 192.0.2.10 --port 8899
Prints every sub-system's current values, plus how many Modbus reads it took. Not used by CI -- a manual diagnostic tool for probing a real unit.
Development
uv sync
uv run pytest
uv run ruff check .
uv run ruff format .
Tests run against modbus_connection's in-memory mock (no real device
needed) plus a YAML consistency check (tests/test_yaml_consistency.py)
against the original source fragments under tests/fixtures/aerosmartm/.
Tested against modbus-connection 3.4.x.
Release files for aerosmart-modbus 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aerosmart_modbus-0.2.1.tar.gz | 30.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aerosmart_modbus-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.6 kB
Release files / aerosmart_modbus-0.2.1.tar.gz
| Download URL | aerosmart_modbus-0.2.1.tar.gz |
|---|---|
| Size | 30.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec2d7721a1c7109eb0a7efa5ceadbf5dd39fa4b376f5a98f17da662c828dd61b
|
|
BLAKE2b-256 checksum How to use checksums |
65e4d6368aadff7276e5361edae963c97c171e746c66d081ec3efb68b91e8988
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency logRelease files / aerosmart_modbus-0.2.1-py3-none-any.whl
| Download URL | aerosmart_modbus-0.2.1-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cbf15c807879916cce8787759b733b2b17d2db3ff1ced4fdbb687cf9c22b4ca
|
|
BLAKE2b-256 checksum How to use checksums |
04390be0880ace9cacc8481465438bcbdca1ab47544ac86552967d58e19cef83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency log